| LOCAL_PATH := $(call my-dir) |
| |
| # We're trying to mirror the structure in Android.bp |
| |
| libselinux_src_defaults := \ |
| src/booleans.c \ |
| src/callbacks.c \ |
| src/freecon.c \ |
| src/label_backends_android.c \ |
| src/label.c \ |
| src/label_support.c \ |
| src/matchpathcon.c \ |
| src/setrans_client.c \ |
| src/sha1.c |
| |
| libselinux_src_defaults_android := \ |
| src/android/android.c \ |
| src/canonicalize_context.c \ |
| src/checkAccess.c \ |
| src/check_context.c \ |
| src/deny_unknown.c \ |
| src/disable.c \ |
| src/fgetfilecon.c \ |
| src/fsetfilecon.c \ |
| src/getpeercon.c \ |
| src/lgetfilecon.c \ |
| src/lsetfilecon.c \ |
| src/policyvers.c \ |
| src/reject_unknown.c \ |
| src/sestatus.c \ |
| src/setenforce.c \ |
| src/setfilecon.c |
| |
| libselinux_src := \ |
| src/label_file.c \ |
| src/regex.c |
| |
| libselinux_src_linux_glibc := \ |
| src/android/android_host.c \ |
| src/avc.c \ |
| src/avc_internal.c \ |
| src/avc_sidtab.c \ |
| src/compute_av.c \ |
| src/compute_create.c \ |
| src/compute_member.c \ |
| src/context.c \ |
| src/enabled.c \ |
| src/fgetfilecon.c \ |
| src/getenforce.c \ |
| src/getfilecon.c \ |
| src/get_initial_context.c \ |
| src/init.c \ |
| src/lgetfilecon.c \ |
| src/load_policy.c \ |
| src/lsetfilecon.c \ |
| src/mapping.c \ |
| src/procattr.c \ |
| src/reject_unknown.c \ |
| src/setenforce.c \ |
| src/setexecfilecon.c \ |
| src/setfilecon.c \ |
| src/stringrep.c \ |
| src/validatetrans.c |
| |
| libselinux_src_linux_bionic := \ |
| src/android/android_host.c \ |
| src/avc.c \ |
| src/avc_internal.c \ |
| src/avc_sidtab.c \ |
| src/compute_av.c \ |
| src/compute_create.c \ |
| src/compute_member.c \ |
| src/context.c \ |
| src/enabled.c \ |
| src/getenforce.c \ |
| src/getfilecon.c \ |
| src/get_initial_context.c \ |
| src/init.c \ |
| src/load_policy.c \ |
| src/mapping.c \ |
| src/procattr.c \ |
| src/setexecfilecon.c \ |
| src/stringrep.c |
| |
| libselinux_src_android := src/android/android_platform.c |
| |
| libselinux_common_cflags := \ |
| -DNO_PERSISTENTLY_STORED_PATTERNS \ |
| -DDISABLE_SETRANS \ |
| -DDISABLE_BOOL \ |
| -D_GNU_SOURCE \ |
| -DNO_MEDIA_BACKEND \ |
| -DNO_X_BACKEND \ |
| -DNO_DB_BACKEND \ |
| -DUSE_PCRE2 \ |
| -DAUDITD_LOG_TAG=1003 \ |
| -Wall \ |
| -Werror \ |
| -Wno-error=missing-noreturn \ |
| -Wno-error=unused-function \ |
| -Wno-error=unused-variable |
| |
| include $(CLEAR_VARS) |
| LOCAL_MODULE := libselinux |
| LOCAL_MODULE_TAGS := optional |
| LOCAL_SRC_FILES := \ |
| $(libselinux_src_defaults) \ |
| $(libselinux_src_defaults_android) \ |
| $(libselinux_src) \ |
| $(libselinux_src_linux_bionic) |
| LOCAL_CFLAGS := -D__BIONIC__ $(libselinux_common_cflags) |
| LOCAL_WHOLE_STATIC_LIBRARIES := libpcre2 |
| LOCAL_STATIC_LIBRARIES := libcutils |
| LOCAL_C_INCLUDES := \ |
| $(LOCAL_PATH)/include \ |
| $(LOCAL_PATH)/src \ |
| external/boringssl/src/include |
| LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
| include $(BUILD_STATIC_LIBRARY) |
| |
| include $(CLEAR_VARS) |
| LOCAL_MODULE := libselinux |
| ifdef SBIN_TOOLBOX |
| LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_LIB) |
| endif |
| LOCAL_MODULE_TAGS := optional |
| LOCAL_WHOLE_STATIC_LIBRARIES := libselinux |
| LOCAL_SHARED_LIBRARIES := libcutils |
| LOCAL_EXPORT_C_INCLUDE_DIRS += $(LOCAL_PATH)/include |
| include $(BUILD_SHARED_LIBRARY) |
| |
| include $(CLEAR_VARS) |
| LOCAL_MODULE := libselinux |
| LOCAL_MODULE_TAGS := optional |
| LOCAL_SRC_FILES := \ |
| $(libselinux_src_defaults) \ |
| $(libselinux_src) \ |
| $(libselinux_src_linux_glibc) |
| LOCAL_CFLAGS := -DBUILD_HOST $(libselinux_common_cflags) |
| LOCAL_WHOLE_STATIC_LIBRARIES := libpcre2 |
| LOCAL_C_INCLUDES := \ |
| $(LOCAL_PATH)/include \ |
| $(LOCAL_PATH)/src |
| LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
| include $(BUILD_HOST_STATIC_LIBRARY) |