diff options
Diffstat (limited to 'toolbox/Android.mk')
-rw-r--r-- | toolbox/Android.mk | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/toolbox/Android.mk b/toolbox/Android.mk index be95e7c..dbbce06 100644 --- a/toolbox/Android.mk +++ b/toolbox/Android.mk @@ -56,11 +56,8 @@ TOOLS := \ ionice \ touch \ lsof \ - md5 - -ifeq ($(HAVE_SELINUX),true) - -TOOLS += \ + du \ + md5 \ getenforce \ setenforce \ chcon \ @@ -70,31 +67,31 @@ TOOLS += \ setsebool \ load_policy -endif - - ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) TOOLS += r endif -LOCAL_SRC_FILES:= \ +ALL_TOOLS = $(TOOLS) +ALL_TOOLS += \ + cp \ + grep + +LOCAL_SRC_FILES := \ dynarray.c \ toolbox.c \ - $(patsubst %,%.c,$(TOOLS)) - -LOCAL_SHARED_LIBRARIES := libcutils libc libusbhost + $(patsubst %,%.c,$(TOOLS)) \ + cp/cp.c cp/utils.c \ + grep/grep.c grep/fastgrep.c grep/file.c grep/queue.c grep/util.c LOCAL_C_INCLUDES := bionic/libc/bionic -ifeq ($(HAVE_SELINUX),true) - -LOCAL_CFLAGS += -DHAVE_SELINUX -LOCAL_SHARED_LIBRARIES += libselinux -LOCAL_C_INCLUDES += external/libselinux/include - -endif +LOCAL_SHARED_LIBRARIES := \ + libcutils \ + libc \ + libusbhost \ + libselinux -LOCAL_MODULE:= toolbox +LOCAL_MODULE := toolbox # Including this will define $(intermediates). # @@ -103,7 +100,7 @@ include $(BUILD_EXECUTABLE) $(LOCAL_PATH)/toolbox.c: $(intermediates)/tools.h TOOLS_H := $(intermediates)/tools.h -$(TOOLS_H): PRIVATE_TOOLS := $(TOOLS) +$(TOOLS_H): PRIVATE_TOOLS := $(ALL_TOOLS) $(TOOLS_H): PRIVATE_CUSTOM_TOOL = echo "/* file generated automatically */" > $@ ; for t in $(PRIVATE_TOOLS) ; do echo "TOOL($$t)" >> $@ ; done $(TOOLS_H): $(LOCAL_PATH)/Android.mk $(TOOLS_H): @@ -111,7 +108,7 @@ $(TOOLS_H): # Make #!/system/bin/toolbox launchers for each tool. # -SYMLINKS := $(addprefix $(TARGET_OUT)/bin/,$(TOOLS)) +SYMLINKS := $(addprefix $(TARGET_OUT)/bin/,$(ALL_TOOLS)) $(SYMLINKS): TOOLBOX_BINARY := $(LOCAL_MODULE) $(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk @echo "Symlink: $@ -> $(TOOLBOX_BINARY)" |