Stephen Smalley | 6670f53 | 2012-02-02 13:31:21 -0500 | [diff] [blame] | 1 | ifeq ($(HAVE_SELINUX), true) |
| 2 | |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 3 | LOCAL_PATH:= $(call my-dir) |
| 4 | |
| 5 | common_SRC_FILES := \ |
| 6 | src/booleans.c \ |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 7 | src/canonicalize_context.c \ |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 8 | src/disable.c \ |
| 9 | src/enabled.c \ |
| 10 | src/fgetfilecon.c \ |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 11 | src/fsetfilecon.c \ |
| 12 | src/getenforce.c \ |
| 13 | src/getfilecon.c \ |
| 14 | src/getpeercon.c \ |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 15 | src/lgetfilecon.c \ |
| 16 | src/load_policy.c \ |
| 17 | src/lsetfilecon.c \ |
| 18 | src/policyvers.c \ |
| 19 | src/procattr.c \ |
| 20 | src/setenforce.c \ |
| 21 | src/setfilecon.c \ |
| 22 | src/context.c \ |
| 23 | src/mapping.c \ |
| 24 | src/stringrep.c \ |
| 25 | src/compute_create.c \ |
| 26 | src/compute_av.c \ |
| 27 | src/avc.c \ |
| 28 | src/avc_internal.c \ |
| 29 | src/avc_sidtab.c \ |
| 30 | src/get_initial_context.c \ |
| 31 | src/checkAccess.c |
| 32 | |
Stephen Smalley | cc3d76d | 2012-01-24 08:33:20 -0500 | [diff] [blame] | 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 \ |
Stephen Smalley | 35b0108 | 2012-04-04 10:06:13 -0400 | [diff] [blame^] | 39 | src/label_file.c \ |
| 40 | src/label_android_property.c |
Stephen Smalley | cc3d76d | 2012-01-24 08:33:20 -0500 | [diff] [blame] | 41 | |
| 42 | |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 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) |
Stephen Smalley | cc3d76d | 2012-01-24 08:33:20 -0500 | [diff] [blame] | 47 | LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 48 | LOCAL_MODULE:= libselinux |
| 49 | LOCAL_MODULE_TAGS := eng |
| 50 | include $(BUILD_STATIC_LIBRARY) |
| 51 | |
| 52 | include $(CLEAR_VARS) |
| 53 | LOCAL_CFLAGS := -DHOST |
Stephen Smalley | cc3d76d | 2012-01-24 08:33:20 -0500 | [diff] [blame] | 54 | |
| 55 | ifeq ($(HOST_OS),darwin) |
| 56 | LOCAL_CFLAGS += -DDARWIN |
| 57 | endif |
| 58 | |
| 59 | LOCAL_SRC_FILES := $(common_HOST_FILES) |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 60 | LOCAL_MODULE:= libselinux |
| 61 | LOCAL_MODULE_TAGS := eng |
| 62 | LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) |
Stephen Smalley | d409de2 | 2012-01-24 10:56:26 -0500 | [diff] [blame] | 63 | LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 64 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 65 | |
| 66 | include $(CLEAR_VARS) |
Stephen Smalley | cc3d76d | 2012-01-24 08:33:20 -0500 | [diff] [blame] | 67 | LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c |
Stephen Smalley | f074036 | 2012-01-04 12:30:47 -0500 | [diff] [blame] | 68 | LOCAL_MODULE:= libselinux |
| 69 | LOCAL_MODULE_TAGS := eng |
| 70 | LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) |
| 71 | LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) |
| 72 | LOCAL_PRELINK_MODULE := false |
| 73 | include $(BUILD_SHARED_LIBRARY) |
Stephen Smalley | 6670f53 | 2012-02-02 13:31:21 -0500 | [diff] [blame] | 74 | |
| 75 | endif # ifeq ($(HAVE_SELINUX, true) |