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 
     42 
     43 common_COPY_HEADERS_TO := selinux
     44 common_COPY_HEADERS := include/selinux/selinux.h include/selinux/label.h include/selinux/context.h include/selinux/avc.h include/selinux/android.h 
     45 
     46 include $(CLEAR_VARS)
     47 LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c
     48 LOCAL_MODULE:= libselinux
     49 LOCAL_MODULE_TAGS := eng
     50 LOCAL_STATIC_LIBRARIES := libmincrypt
     51 LOCAL_C_INCLUDES := external/pcre
     52 LOCAL_WHOLE_STATIC_LIBRARIES := libpcre
     53 # 1003 corresponds to auditd, from system/core/logd/event.logtags
     54 LOCAL_CFLAGS := -DAUDITD_LOG_TAG=1003
     55 include $(BUILD_STATIC_LIBRARY)
     56 
     57 include $(CLEAR_VARS)
     58 LOCAL_CFLAGS := -DHOST
     59 
     60 ifeq ($(HOST_OS),darwin)
     61 LOCAL_CFLAGS += -DDARWIN
     62 endif
     63 
     64 LOCAL_SRC_FILES := $(common_HOST_FILES)
     65 LOCAL_MODULE:= libselinux
     66 LOCAL_MODULE_TAGS := eng
     67 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
     68 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
     69 LOCAL_WHOLE_STATIC_LIBRARIES := libpcre
     70 LOCAL_C_INCLUDES := external/pcre
     71 include $(BUILD_HOST_STATIC_LIBRARY)
     72 
     73 include $(CLEAR_VARS)
     74 LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c
     75 LOCAL_MODULE:= libselinux
     76 LOCAL_MODULE_TAGS := eng
     77 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
     78 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
     79 LOCAL_PRELINK_MODULE := false
     80 LOCAL_STATIC_LIBRARIES := libmincrypt
     81 LOCAL_C_INCLUDES := external/pcre
     82 LOCAL_SHARED_LIBRARIES := liblog libpcre
     83 # 1003 corresponds to auditd, from system/core/logd/event.logtags
     84 LOCAL_CFLAGS := -DAUDITD_LOG_TAG=1003
     85 include $(BUILD_SHARED_LIBRARY)
     86