diff options
author | Jeffrey Vander Stoep <jeffv@google.com> | 2015-05-06 21:49:11 +0000 |
---|---|---|
committer | Jeffrey Vander Stoep <jeffv@google.com> | 2015-05-06 21:49:11 +0000 |
commit | 5999eadd2446495f00e529acdabec1f019e4c762 (patch) | |
tree | 831c5fc75eb3704eb57e0048cfff946f856b994f | |
parent | 893548a33eea1fc14b58da058b0808c1140db42b (diff) | |
download | checkpolicy-5999eadd2446495f00e529acdabec1f019e4c762.tar.gz |
Revert "Move to common directory versions of selinux tools"
Darwin does not support fmemopen.
This reverts commit 893548a33eea1fc14b58da058b0808c1140db42b.
Change-Id: Id99ed8d9a6d58acbc03f20eccd34f069e1e21d83
-rw-r--r-- | Android.mk | 80 |
1 files changed, 78 insertions, 2 deletions
@@ -1,2 +1,78 @@ -# This empty Android.mk file will prevent the build system -# from building anything below this point. +LOCAL_PATH:= $(call my-dir) + +common_src_files := \ + policy_parse.y \ + policy_scan.l \ + queue.c \ + module_compiler.c \ + parse_util.c \ + policy_define.c + +common_cflags := \ + -Wall -Wshadow -O2 \ + -pipe -fno-strict-aliasing \ + -Wno-return-type + +ifeq ($(HOST_OS),darwin) +common_cflags += -DDARWIN +endif + +common_includes := \ + $(LOCAL_PATH)/ \ + $(LOCAL_PATH)/../libsepol/include/ \ + $(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) + +LOCAL_MODULE := checkpolicy +LOCAL_MODULE_TAGS := optional +LOCAL_C_INCLUDES := $(common_includes) +LOCAL_CFLAGS := $(yacc_flags) $(common_cflags) +LOCAL_SRC_FILES := $(common_src_files) checkpolicy.c +LOCAL_STATIC_LIBRARIES := libsepol +LOCAL_YACCFLAGS := -v +LOCAL_MODULE_CLASS := EXECUTABLES + +include $(BUILD_HOST_EXECUTABLE) + + +## +# checkmodule +# +include $(CLEAR_VARS) + +LOCAL_MODULE := checkmodule +LOCAL_MODULE_TAGS := optional +LOCAL_C_INCLUDES := $(common_includes) +LOCAL_CFLAGS := $(yacc_flags) $(common_cflags) +LOCAL_SRC_FILES := $(common_src_files) checkmodule.c +LOCAL_STATIC_LIBRARIES := libsepol +LOCAL_YACCFLAGS := -v +LOCAL_MODULE_CLASS := EXECUTABLES + +include $(BUILD_HOST_EXECUTABLE) + +## +# dispol +# +include $(CLEAR_VARS) + +LOCAL_MODULE := dispol +LOCAL_MODULE_TAGS := optional +LOCAL_C_INCLUDES := $(common_includes) +LOCAL_CFLAGS := $(common_cflags) +LOCAL_SRC_FILES := test/dispol.c +LOCAL_STATIC_LIBRARIES := libsepol +LOCAL_MODULE_CLASS := EXECUTABLES + +include $(BUILD_HOST_EXECUTABLE) |