Home | History | Annotate | Download | only in libselinux
      1 LOCAL_PATH:= $(call my-dir)
      2 
      3 common_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 
     33 common_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 	src/label_support.c
     42 
     43 
     44 include $(CLEAR_VARS)
     45 LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c
     46 LOCAL_MODULE:= libselinux
     47 LOCAL_MODULE_TAGS := eng
     48 LOCAL_STATIC_LIBRARIES := libcrypto_static
     49 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
     50 LOCAL_WHOLE_STATIC_LIBRARIES := libpcre libpackagelistparser
     51 # 1003 corresponds to auditd, from system/core/logd/event.logtags
     52 LOCAL_CFLAGS := -DAUDITD_LOG_TAG=1003
     53 # mapping.c has redundant check of array p_in->perms.
     54 LOCAL_CLANG_CFLAGS += -Wno-pointer-bool-conversion
     55 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
     56 
     57 include $(BUILD_STATIC_LIBRARY)
     58 
     59 include $(CLEAR_VARS)
     60 LOCAL_CFLAGS := -DHOST
     61 
     62 ifeq ($(HOST_OS),darwin)
     63 LOCAL_CFLAGS += -DDARWIN
     64 endif
     65 
     66 LOCAL_SRC_FILES := $(common_HOST_FILES)
     67 LOCAL_MODULE:= libselinux
     68 LOCAL_MODULE_TAGS := eng
     69 LOCAL_WHOLE_STATIC_LIBRARIES := libpcre
     70 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
     71 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
     72 include $(BUILD_HOST_STATIC_LIBRARY)
     73 
     74 include $(CLEAR_VARS)
     75 LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c
     76 LOCAL_MODULE:= libselinux
     77 LOCAL_MODULE_TAGS := eng
     78 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
     79 LOCAL_SHARED_LIBRARIES := libcrypto liblog libpcre libpackagelistparser
     80 # 1003 corresponds to auditd, from system/core/logd/event.logtags
     81 LOCAL_CFLAGS := -DAUDITD_LOG_TAG=1003
     82 # mapping.c has redundant check of array p_in->perms.
     83 LOCAL_CLANG_CFLAGS += -Wno-pointer-bool-conversion
     84 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
     85 
     86 include $(BUILD_SHARED_LIBRARY)
     87 
     88 include $(CLEAR_VARS)
     89 LOCAL_CFLAGS := -DHOST
     90 
     91 ifeq ($(HOST_OS),darwin)
     92 LOCAL_CFLAGS += -DDARWIN
     93 endif
     94 
     95 LOCAL_SRC_FILES := $(common_HOST_FILES)
     96 LOCAL_MODULE:= libselinux
     97 LOCAL_MODULE_TAGS := eng
     98 LOCAL_WHOLE_STATIC_LIBRARIES := libpcre
     99 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
    100 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
    101 include $(BUILD_HOST_SHARED_LIBRARY)
    102 
    103 #################################
    104 include $(CLEAR_VARS)
    105 LOCAL_CFLAGS := -DHOST
    106 
    107 ifeq ($(HOST_OS),darwin)
    108 LOCAL_CFLAGS += -DDARWIN
    109 endif
    110 
    111 LOCAL_MODULE := sefcontext_compile
    112 LOCAL_MODULE_TAGS := eng
    113 LOCAL_C_INCLUDES := ../src/label_file.h
    114 LOCAL_SRC_FILES := utils/sefcontext_compile.c
    115 LOCAL_STATIC_LIBRARIES := libselinux
    116 LOCAL_WHOLE_STATIC_LIBRARIES := libpcre
    117 LOCAL_C_INCLUDES := external/pcre
    118 include $(BUILD_HOST_EXECUTABLE)
    119