2012-02-23 15:14:13 +00:00
|
|
|
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 \
|
|
|
|
|
|
|
|
common_includes := \
|
|
|
|
$(LOCAL_PATH)/ \
|
|
|
|
$(LOCAL_PATH)/../libsepol/include/ \
|
|
|
|
$(LOCAL_PATH)/../libsepol/src/ \
|
|
|
|
|
|
|
|
##
|
2014-11-20 18:54:08 +00:00
|
|
|
# "-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
|
2012-02-23 15:14:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
# 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)
|
2014-04-08 19:52:06 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
# 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)
|