1LOCAL_PATH:= $(call my-dir) 2 3common_src_files := \ 4 src/assertion.c \ 5 src/avrule_block.c \ 6 src/avtab.c \ 7 src/boolean_record.c \ 8 src/booleans.c \ 9 src/conditional.c \ 10 src/constraint.c \ 11 src/context.c \ 12 src/context_record.c \ 13 src/debug.c \ 14 src/ebitmap.c \ 15 src/expand.c \ 16 src/genbools.c \ 17 src/genusers.c \ 18 src/handle.c \ 19 src/hashtab.c \ 20 src/hierarchy.c \ 21 src/iface_record.c \ 22 src/interfaces.c \ 23 src/link.c \ 24 src/mls.c \ 25 src/module.c \ 26 src/node_record.c \ 27 src/nodes.c \ 28 src/polcaps.c \ 29 src/policydb.c \ 30 src/policydb_convert.c \ 31 src/policydb_public.c \ 32 src/port_record.c \ 33 src/ports.c \ 34 src/roles.c \ 35 src/services.c \ 36 src/sidtab.c \ 37 src/symtab.c \ 38 src/user_record.c \ 39 src/users.c \ 40 src/util.c \ 41 src/write.c 42 43common_cflags := \ 44 -Wall -W -Wundef \ 45 -Wshadow -Wmissing-noreturn \ 46 -Wmissing-format-attribute 47 48ifeq ($(HOST_OS), darwin) 49common_cflags += -DDARWIN 50endif 51 52common_includes := \ 53 $(LOCAL_PATH)/include/ \ 54 $(LOCAL_PATH)/src/ 55 56## 57# libsepol.so 58# 59include $(CLEAR_VARS) 60 61LOCAL_MODULE := libsepol 62LOCAL_MODULE_TAGS := optional 63LOCAL_C_INCLUDES := $(common_includes) 64LOCAL_CFLAGS := $(common_cflags) 65LOCAL_SRC_FILES := $(common_src_files) 66LOCAL_MODULE_CLASS := SHARED_LIBRARIES 67 68include $(BUILD_HOST_SHARED_LIBRARY) 69 70## 71# libsepol.a 72# 73include $(CLEAR_VARS) 74 75LOCAL_MODULE := libsepol 76LOCAL_MODULE_TAGS := optional 77LOCAL_C_INCLUDES := $(common_includes) 78LOCAL_CFLAGS := $(common_cflags) 79LOCAL_SRC_FILES := $(common_src_files) 80LOCAL_MODULE_CLASS := STATIC_LIBRARIES 81 82include $(BUILD_HOST_STATIC_LIBRARY) 83 84## 85# chkcon 86# 87include $(CLEAR_VARS) 88 89LOCAL_MODULE := chkcon 90LOCAL_MODULE_TAGS := optional 91LOCAL_C_INCLUDES := $(common_includes) 92LOCAL_CFLAGS := $(common_cflags) 93LOCAL_SRC_FILES := utils/chkcon.c 94LOCAL_SHARED_LIBRARIES := libsepol 95LOCAL_MODULE_CLASS := EXECUTABLES 96 97include $(BUILD_HOST_EXECUTABLE) 98