• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_PATH:= $(call my-dir)
2
3common_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
31common_HOST_FILES := \
32	src/callbacks.c \
33	src/check_context.c \
34	src/freecon.c \
35	src/init.c \
36	src/label.c \
37	src/label_file.c \
38	src/label_android_property.c
39
40
41common_COPY_HEADERS_TO := selinux
42common_COPY_HEADERS := include/selinux/selinux.h include/selinux/label.h include/selinux/context.h include/selinux/avc.h include/selinux/android.h
43
44include $(CLEAR_VARS)
45LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c
46LOCAL_MODULE:= libselinux
47LOCAL_MODULE_TAGS := eng
48include $(BUILD_STATIC_LIBRARY)
49
50include $(CLEAR_VARS)
51LOCAL_CFLAGS := -DHOST
52
53ifeq ($(HOST_OS),darwin)
54LOCAL_CFLAGS += -DDARWIN
55endif
56
57LOCAL_SRC_FILES := $(common_HOST_FILES)
58LOCAL_MODULE:= libselinux
59LOCAL_MODULE_TAGS := eng
60LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
61LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
62include $(BUILD_HOST_STATIC_LIBRARY)
63
64include $(CLEAR_VARS)
65LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c
66LOCAL_MODULE:= libselinux
67LOCAL_MODULE_TAGS := eng
68LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
69LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
70LOCAL_PRELINK_MODULE := false
71include $(BUILD_SHARED_LIBRARY)
72