Re: [PATCH 1/2] libsepol, checkpolicy: Update Android.mk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+Jeffrey and Daniel

On Thu, Sep 22, 2016 at 12:48 PM, Bowgo Tsai <bowgotsai@xxxxxxxxxx> wrote:
From: bowgotsai <bowgotsai@xxxxxxxxxx>

---
 checkpolicy/Android.mk | 11 ++---------
 libsepol/Android.mk    | 16 ++++++++--------
 2 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/checkpolicy/Android.mk b/checkpolicy/Android.mk
index 3b7ff8a..ee2f158 100644
--- a/checkpolicy/Android.mk
+++ b/checkpolicy/Android.mk
@@ -18,13 +18,6 @@ common_includes := \
        $(LOCAL_PATH)/../libsepol/src/ \

 ##
-# "-x c" forces the lex/yacc files to be compiled as c the build system
-# otherwise forces them to be c++. Need to also add an explicit -std because the
-# build system will soon default C++ to -std=c++11.
-yacc_flags := -x c -std=gnu89
-
-
-##
 # checkpolicy
 #
 include $(CLEAR_VARS)
@@ -32,7 +25,7 @@ include $(CLEAR_VARS)
 LOCAL_MODULE := checkpolicy
 LOCAL_MODULE_TAGS := optional
 LOCAL_C_INCLUDES := $(common_includes)
-LOCAL_CFLAGS := $(yacc_flags) $(common_cflags)
+LOCAL_CFLAGS := $(common_cflags)
 LOCAL_SRC_FILES := $(common_src_files) checkpolicy.c
 LOCAL_STATIC_LIBRARIES := libsepol
 LOCAL_YACCFLAGS := -v
@@ -49,7 +42,7 @@ include $(CLEAR_VARS)
 LOCAL_MODULE := checkmodule
 LOCAL_MODULE_TAGS := optional
 LOCAL_C_INCLUDES := $(common_includes)
-LOCAL_CFLAGS := $(yacc_flags) $(common_cflags)
+LOCAL_CFLAGS := $(common_cflags)
 LOCAL_SRC_FILES := $(common_src_files) checkmodule.c
 LOCAL_STATIC_LIBRARIES := libsepol
 LOCAL_YACCFLAGS := -v
diff --git a/libsepol/Android.mk b/libsepol/Android.mk
index 6d89f17..e9cfeef 100644
--- a/libsepol/Android.mk
+++ b/libsepol/Android.mk
@@ -81,6 +81,7 @@ common_includes := \
 # build system will soon default C++ to -std=c++11.
 yacc_flags := -x c -std=gnu89

+
 ##
 # libsepol.so
 #
@@ -88,12 +89,11 @@ include $(CLEAR_VARS)

 LOCAL_MODULE := libsepol
 LOCAL_MODULE_TAGS := optional
-LOCAL_COPY_HEADERS_TO := sepol
-LOCAL_COPY_HEADERS := include/sepol/handle.h include/sepol/policydb.h cil/include/cil/cil.h
 LOCAL_C_INCLUDES := $(common_includes)
-LOCAL_CFLAGS := $(yacc_flags) $(common_cflags)
+LOCAL_CFLAGS := $(common_cflags)
+LOCAL_CPPFLAGS := $(yacc_flags)
 LOCAL_SRC_FILES := $(common_src_files) $(cil_src_files)
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include

 include $(BUILD_HOST_SHARED_LIBRARY)

@@ -105,9 +105,10 @@ include $(CLEAR_VARS)
 LOCAL_MODULE := libsepol
 LOCAL_MODULE_TAGS := optional
 LOCAL_C_INCLUDES := $(common_includes)
-LOCAL_CFLAGS := $(yacc_flags) $(common_cflags)
+LOCAL_CFLAGS := $(common_cflags)
+LOCAL_CPPFLAGS := $(yacc_flags)
 LOCAL_SRC_FILES := $(common_src_files) $(cil_src_files)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include

 include $(BUILD_HOST_STATIC_LIBRARY)

@@ -122,7 +123,6 @@ LOCAL_C_INCLUDES := $(common_includes)
 LOCAL_CFLAGS := $(common_cflags)
 LOCAL_SRC_FILES := utils/chkcon.c
 LOCAL_SHARED_LIBRARIES := libsepol
-LOCAL_MODULE_CLASS := EXECUTABLES

 include $(BUILD_HOST_EXECUTABLE)

@@ -133,6 +133,6 @@ LOCAL_MODULE_TAGES := optional
 LOCAL_C_INCLUDES := $(common_includes)
 LOCAL_CFLAGS := $(common_cflags)
 LOCAL_SRC_FILES := $(common_src_files)
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include

 include $(BUILD_STATIC_LIBRARY)
--
2.8.0.rc3.226.g39d4020




--

Bowgo Tsai | Engineer | bowgotsai@xxxxxxxxxx | +886 (2) 8729-6364

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux