• 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	src/sestatus.c \
31	src/deny_unknown.c
32
33common_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
43common_COPY_HEADERS_TO := selinux
44common_COPY_HEADERS := include/selinux/selinux.h include/selinux/label.h include/selinux/context.h include/selinux/avc.h include/selinux/android.h
45
46include $(CLEAR_VARS)
47LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c
48LOCAL_MODULE:= libselinux
49LOCAL_MODULE_TAGS := eng
50include $(BUILD_STATIC_LIBRARY)
51
52include $(CLEAR_VARS)
53LOCAL_CFLAGS := -DHOST
54
55ifeq ($(HOST_OS),darwin)
56LOCAL_CFLAGS += -DDARWIN
57endif
58
59LOCAL_SRC_FILES := $(common_HOST_FILES)
60LOCAL_MODULE:= libselinux
61LOCAL_MODULE_TAGS := eng
62LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
63LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
64include $(BUILD_HOST_STATIC_LIBRARY)
65
66include $(CLEAR_VARS)
67LOCAL_SRC_FILES := $(common_SRC_FILES) $(common_HOST_FILES) src/android.c
68LOCAL_MODULE:= libselinux
69LOCAL_MODULE_TAGS := eng
70LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
71LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
72LOCAL_PRELINK_MODULE := false
73include $(BUILD_SHARED_LIBRARY)
74