Home | History | Annotate | Download | only in libsepol
      1 LOCAL_PATH:= $(call my-dir)
      2 
      3 common_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 
     43 common_cflags := \
     44 	-Wall -W -Wundef \
     45 	-Wshadow -Wmissing-noreturn \
     46 	-Wmissing-format-attribute
     47 
     48 ifeq ($(HOST_OS), darwin)
     49 common_cflags += -DDARWIN
     50 endif
     51 
     52 common_includes := \
     53 	$(LOCAL_PATH)/include/ \
     54 	$(LOCAL_PATH)/src/
     55 
     56 ##
     57 # libsepol.so
     58 #
     59 include $(CLEAR_VARS)
     60 
     61 LOCAL_MODULE := libsepol
     62 LOCAL_MODULE_TAGS := optional
     63 LOCAL_C_INCLUDES := $(common_includes) 
     64 LOCAL_CFLAGS := $(common_cflags)
     65 LOCAL_SRC_FILES := $(common_src_files)
     66 LOCAL_MODULE_CLASS := SHARED_LIBRARIES
     67 
     68 include $(BUILD_HOST_SHARED_LIBRARY)
     69 
     70 ##
     71 # libsepol.a
     72 #
     73 include $(CLEAR_VARS)
     74 
     75 LOCAL_MODULE := libsepol
     76 LOCAL_MODULE_TAGS := optional
     77 LOCAL_C_INCLUDES := $(common_includes) 
     78 LOCAL_CFLAGS := $(common_cflags)
     79 LOCAL_SRC_FILES := $(common_src_files)
     80 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
     81 
     82 include $(BUILD_HOST_STATIC_LIBRARY)
     83 
     84 ##
     85 # chkcon
     86 #
     87 include $(CLEAR_VARS)
     88 
     89 LOCAL_MODULE := chkcon
     90 LOCAL_MODULE_TAGS := optional
     91 LOCAL_C_INCLUDES := $(common_includes) 
     92 LOCAL_CFLAGS := $(common_cflags)
     93 LOCAL_SRC_FILES := utils/chkcon.c
     94 LOCAL_SHARED_LIBRARIES := libsepol
     95 LOCAL_MODULE_CLASS := EXECUTABLES
     96 
     97 include $(BUILD_HOST_EXECUTABLE)
     98