summaryrefslogtreecommitdiffstats
path: root/toolbox
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-05-25 13:19:49 -0700
committerDan Willemsen <dwillemsen@google.com>2016-06-01 13:41:23 -0700
commitee2da03e2666dcb01721b55aa4767e371120f4fb (patch)
treeb628830902bfb84f00c39cb391971e608a640252 /toolbox
parent58ea31cc9013b8aab168cb828571ffc44721d9ef (diff)
downloadsystem_core-ee2da03e2666dcb01721b55aa4767e371120f4fb.tar.gz
system_core-ee2da03e2666dcb01721b55aa4767e371120f4fb.tar.bz2
system_core-ee2da03e2666dcb01721b55aa4767e371120f4fb.zip
Remove invalid uses of -l and -I
LOCAL_LDLIBS should only be used with -l flags for NDK and some host libraries. Other uses should use LOCAL_SHARED_LIBRARIES. LOCAL_LDFLAGS should not contain -l entries, they should be in LOCAL_LDLIBS instead. LOCAL_CFLAGS should not contain -I entries, those should use LOCAL_C_INCLUDES instead. Change-Id: Ic901aa14651572ac682166becd4f0cd86baecc34
Diffstat (limited to 'toolbox')
-rw-r--r--toolbox/Android.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index d151ad6bc..ba04364b3 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -3,7 +3,6 @@ LOCAL_PATH:= $(call my-dir)
common_cflags := \
-Werror -Wno-unused-parameter -Wno-unused-const-variable \
- -I$(LOCAL_PATH)/upstream-netbsd/include/ \
-include bsd-compatibility.h \
@@ -21,6 +20,7 @@ LOCAL_SRC_FILES := \
upstream-netbsd/lib/libc/string/swab.c \
upstream-netbsd/lib/libutil/raise_default_signal.c
LOCAL_CFLAGS += $(common_cflags) -Dmain=dd_main -DNO_CONV
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_MODULE := libtoolbox_dd
include $(BUILD_STATIC_LIBRARY)
@@ -49,6 +49,7 @@ LOCAL_SRC_FILES := \
$(patsubst %,%.c,$(OUR_TOOLS)) \
LOCAL_CFLAGS += $(common_cflags)
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_CONLYFLAGS += -std=gnu99
LOCAL_SHARED_LIBRARIES := \
@@ -95,6 +96,7 @@ $(INPUT_H_LABELS_H):
include $(CLEAR_VARS)
LOCAL_SRC_FILES := r.c
LOCAL_CFLAGS += $(common_cflags)
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_MODULE := r
LOCAL_MODULE_TAGS := debug
include $(BUILD_EXECUTABLE)
@@ -109,6 +111,7 @@ LOCAL_SRC_FILES := \
upstream-netbsd/usr.bin/grep/queue.c \
upstream-netbsd/usr.bin/grep/util.c
LOCAL_CFLAGS += $(common_cflags)
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
LOCAL_MODULE := grep
LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,egrep fgrep,ln -sf grep $(TARGET_OUT)/bin/$(t);)
include $(BUILD_EXECUTABLE)