summaryrefslogtreecommitdiffstats
path: root/toolbox/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'toolbox/Android.mk')
-rw-r--r--toolbox/Android.mk23
1 files changed, 17 insertions, 6 deletions
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index dbbce06..086ba0d 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -57,7 +57,11 @@ TOOLS := \
touch \
lsof \
du \
- md5 \
+ md5
+
+ifeq ($(HAVE_SELINUX),true)
+
+TOOLS += \
getenforce \
setenforce \
chcon \
@@ -67,6 +71,9 @@ TOOLS := \
setsebool \
load_policy
+endif
+
+
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
TOOLS += r
endif
@@ -83,13 +90,17 @@ LOCAL_SRC_FILES := \
cp/cp.c cp/utils.c \
grep/grep.c grep/fastgrep.c grep/file.c grep/queue.c grep/util.c
+LOCAL_SHARED_LIBRARIES := libcutils libc libusbhost
+
LOCAL_C_INCLUDES := bionic/libc/bionic
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libc \
- libusbhost \
- libselinux
+ifeq ($(HAVE_SELINUX),true)
+
+LOCAL_CFLAGS += -DHAVE_SELINUX
+LOCAL_SHARED_LIBRARIES += libselinux
+LOCAL_C_INCLUDES += external/libselinux/include
+
+endif
LOCAL_MODULE := toolbox