1LOCAL_PATH:= $(call my-dir) 2 3common_SRC_FILES := \ 4 src/booleans.c \ 5 src/canonicalize_context.c \ 6 src/disable.c \ 7 src/enabled.c \ 8 src/fgetfilecon.c \ 9 src/fsetfilecon.c \ 10 src/getenforce.c \ 11 src/getfilecon.c \ 12 src/getpeercon.c \ 13 src/lgetfilecon.c \ 14 src/load_policy.c \ 15 src/lsetfilecon.c \ 16 src/policyvers.c \ 17 src/procattr.c \ 18 src/setenforce.c \ 19 src/setfilecon.c \ 20 src/context.c \ 21 src/mapping.c \ 22 src/stringrep.c \ 23 src/compute_create.c \ 24 src/compute_av.c \ 25 src/avc.c \ 26 src/avc_internal.c \ 27 src/avc_sidtab.c \ 28 src/get_initial_context.c \ 29 src/checkAccess.c \ 30 src/sestatus.c \ 31 src/deny_unknown.c 32 33common_HOST_FILES := \ 34 src/callbacks.c \ 35 src/check_context.c \ 36 src/freecon.c \ 37 src/init.c \ 38 src/label.c \ 39 src/label_file.c \ 40 src/label_android_property.c 41 42 43common_COPY_HEADERS_TO := selinux 44common_COPY_HEADERS := include/selinux/selinux.h include/selinux/label.h include/selinux/context.h include/selinux/avc.h include/selinux/android.h 45 46include $(CLEAR_VARS) 47LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c 48LOCAL_MODULE:= libselinux 49LOCAL_MODULE_TAGS := eng 50LOCAL_STATIC_LIBRARIES := libmincrypt 51LOCAL_C_INCLUDES := external/pcre 52LOCAL_WHOLE_STATIC_LIBRARIES := libpcre 53# 1003 corresponds to auditd, from system/core/logd/event.logtags 54LOCAL_CFLAGS := -DAUDITD_LOG_TAG=1003 55# mapping.c has redundant check of array p_in->perms. 56LOCAL_CLANG_CFLAGS += -Wno-pointer-bool-conversion 57 58include $(BUILD_STATIC_LIBRARY) 59 60include $(CLEAR_VARS) 61LOCAL_CFLAGS := -DHOST 62 63ifeq ($(HOST_OS),darwin) 64LOCAL_CFLAGS += -DDARWIN 65endif 66 67LOCAL_SRC_FILES := $(common_HOST_FILES) 68LOCAL_MODULE:= libselinux 69LOCAL_MODULE_TAGS := eng 70LOCAL_WHOLE_STATIC_LIBRARIES := libpcre 71LOCAL_C_INCLUDES := external/pcre 72include $(BUILD_HOST_STATIC_LIBRARY) 73 74include $(CLEAR_VARS) 75LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c 76LOCAL_MODULE:= libselinux 77LOCAL_MODULE_TAGS := eng 78LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) 79LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) 80LOCAL_STATIC_LIBRARIES := libmincrypt 81LOCAL_C_INCLUDES := external/pcre 82LOCAL_SHARED_LIBRARIES := liblog libpcre 83# 1003 corresponds to auditd, from system/core/logd/event.logtags 84LOCAL_CFLAGS := -DAUDITD_LOG_TAG=1003 85# mapping.c has redundant check of array p_in->perms. 86LOCAL_CLANG_CFLAGS += -Wno-pointer-bool-conversion 87 88include $(BUILD_SHARED_LIBRARY) 89 90include $(CLEAR_VARS) 91LOCAL_CFLAGS := -DHOST 92 93ifeq ($(HOST_OS),darwin) 94LOCAL_CFLAGS += -DDARWIN 95endif 96 97LOCAL_SRC_FILES := $(common_HOST_FILES) 98LOCAL_MODULE:= libselinux 99LOCAL_MODULE_TAGS := eng 100LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) 101LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) 102LOCAL_WHOLE_STATIC_LIBRARIES := libpcre 103LOCAL_C_INCLUDES := external/pcre 104include $(BUILD_HOST_SHARED_LIBRARY) 105