From 4bf3b0d8043c6b05df2560b563f1eeaadb21d1a5 Mon Sep 17 00:00:00 2001 From: Dees Troy Date: Wed, 11 Sep 2013 19:12:49 +0000 Subject: Make SELinux automatic if present --- Android.mk | 8 +++++--- libtar/Android.mk | 2 +- minzip/Android.mk | 2 +- prebuilt/Android.mk | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Android.mk b/Android.mk index 4cee5c7cb..8fc99b2ac 100644 --- a/Android.mk +++ b/Android.mk @@ -79,13 +79,15 @@ ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) LOCAL_C_INCLUDES += system/extras/ext4_utils LOCAL_SHARED_LIBRARIES += libext4_utils endif - -ifeq ($(HAVE_SELINUX), true) +ifneq ($(wildcard external/libselinux/Android.mk),) + TWHAVE_SELINUX := true +endif +ifeq ($(TWHAVE_SELINUX), true) #LOCAL_C_INCLUDES += external/libselinux/include #LOCAL_STATIC_LIBRARIES += libselinux #LOCAL_CFLAGS += -DHAVE_SELINUX -g endif # HAVE_SELINUX -ifeq ($(HAVE_SELINUX), true) +ifeq ($(TWHAVE_SELINUX), true) LOCAL_C_INCLUDES += external/libselinux/include LOCAL_SHARED_LIBRARIES += libselinux LOCAL_CFLAGS += -DHAVE_SELINUX -g diff --git a/libtar/Android.mk b/libtar/Android.mk index 9070f7033..f936e96ff 100644 --- a/libtar/Android.mk +++ b/libtar/Android.mk @@ -11,7 +11,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH) \ external/zlib LOCAL_SHARED_LIBRARIES += libz libc -ifeq ($(HAVE_SELINUX), true) +ifeq ($(TWHAVE_SELINUX), true) LOCAL_C_INCLUDES += external/libselinux/include LOCAL_SHARED_LIBRARIES += libselinux LOCAL_CFLAGS += -DHAVE_SELINUX diff --git a/minzip/Android.mk b/minzip/Android.mk index 3dd97ff04..68485abe1 100644 --- a/minzip/Android.mk +++ b/minzip/Android.mk @@ -35,7 +35,7 @@ LOCAL_C_INCLUDES += \ external/zlib \ external/safe-iop/include -ifeq ($(HAVE_SELINUX),true) +ifeq ($(TWHAVE_SELINUX),true) LOCAL_C_INCLUDES += external/libselinux/include LOCAL_STATIC_LIBRARIES += libselinux LOCAL_CFLAGS += -DHAVE_SELINUX diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index 08e09aca7..0169fb89d 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -51,7 +51,7 @@ ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) endif RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so -ifeq ($(HAVE_SELINUX), true) +ifeq ($(TWHAVE_SELINUX), true) RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so ifneq ($(TARGET_USERIMAGES_USE_EXT4), true) RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so -- cgit v1.2.3