From 776434aae9a2c5c56efccdbc949c2a33bbe2f486 Mon Sep 17 00:00:00 2001 From: Jeffrey Vander Stoep Date: Thu, 14 May 2015 17:53:33 +0000 Subject: [PATCH] Revert "Move host functionality to common selinux dir" This change breaks the Mac build due to no stdio_ext.h This reverts commit 527d945abcade67b4fde9f144dde90db60aed5f6. Change-Id: Ifdaba985207932690e34a479541c7619b78d6aad --- Android.mk | 2 +- libselinux/Android.mk | 65 ------------------ libsepol/Android.mk | 153 ++++++++++++++++++------------------------ 3 files changed, 66 insertions(+), 154 deletions(-) delete mode 100644 libselinux/Android.mk diff --git a/Android.mk b/Android.mk index 941335a3..4be2ae8c 100644 --- a/Android.mk +++ b/Android.mk @@ -1 +1 @@ -include $(call all-named-subdir-makefiles, libsepol checkpolicy libselinux) +include $(call all-named-subdir-makefiles, libsepol checkpolicy) diff --git a/libselinux/Android.mk b/libselinux/Android.mk deleted file mode 100644 index 578f3120..00000000 --- a/libselinux/Android.mk +++ /dev/null @@ -1,65 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -common_HOST_FILES := \ - src/enabled.c \ - src/setrans_client.c \ - src/callbacks.c \ - src/check_context.c \ - src/freecon.c \ - src/init.c \ - src/label.c \ - src/lgetfilecon.c \ - src/canonicalize_context.c \ - src/matchpathcon.c \ - src/label_media.c \ - src/label_x.c \ - src/label_db.c \ - src/seusers.c \ - src/load_policy.c \ - src/policyvers.c \ - src/selinux_config.c \ - src/label_file.c \ - src/lsetfilecon.c \ - src/disable.c \ - src/booleans.c \ - src/getenforce.c \ - src/setenforce.c \ - src/label_android_property.c - -common_COPY_HEADERS_TO := selinux -common_COPY_HEADERS := \ - include/selinux/selinux.h \ - include/selinux/label.h \ - include/selinux/context.h \ - include/selinux/avc.h \ - include/selinux/get_default_type.h - -include $(CLEAR_VARS) -LOCAL_CFLAGS := -DHOST -D_GNU_SOURCE - -ifeq ($(HOST_OS),darwin) -LOCAL_CFLAGS += -DDARWIN -endif - -LOCAL_SRC_FILES := $(common_HOST_FILES) -LOCAL_MODULE:= libselinux -LOCAL_MODULE_TAGS := eng -LOCAL_WHOLE_STATIC_LIBRARIES := libpcre libsepol -LOCAL_C_INCLUDES := external/pcre -include $(BUILD_HOST_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_CFLAGS := -DHOST -D_GNU_SOURCE - -ifeq ($(HOST_OS),darwin) -LOCAL_CFLAGS += -DDARWIN -endif - -LOCAL_SRC_FILES := $(common_HOST_FILES) -LOCAL_MODULE:= libselinux -LOCAL_MODULE_TAGS := eng -LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) -LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) -LOCAL_WHOLE_STATIC_LIBRARIES := libpcre libsepol -LOCAL_C_INCLUDES := external/pcre -include $(BUILD_HOST_SHARED_LIBRARY) diff --git a/libsepol/Android.mk b/libsepol/Android.mk index ff7c687c..730fac3e 100644 --- a/libsepol/Android.mk +++ b/libsepol/Android.mk @@ -1,94 +1,71 @@ LOCAL_PATH:= $(call my-dir) common_src_files := \ - src/assertion.c \ - src/avrule_block.c \ - src/avtab.c \ - src/boolean_record.c \ - src/booleans.c \ - src/conditional.c \ - src/constraint.c \ - src/context.c \ - src/context_record.c \ - src/debug.c \ - src/ebitmap.c \ - src/expand.c \ - src/genbools.c \ - src/genusers.c \ - src/handle.c \ - src/hashtab.c \ - src/hierarchy.c \ - src/iface_record.c \ - src/interfaces.c \ - src/link.c \ - src/mls.c \ - src/module.c \ - src/module_to_cil.c \ - src/node_record.c \ - src/nodes.c \ - src/polcaps.c \ - src/policydb.c \ - src/policydb_convert.c \ - src/policydb_public.c \ - src/port_record.c \ - src/ports.c \ - src/roles.c \ - src/services.c \ - src/sidtab.c \ - src/symtab.c \ - src/user_record.c \ - src/users.c \ - src/util.c \ - src/write.c + src/assertion.c \ + src/avrule_block.c \ + src/avtab.c \ + src/boolean_record.c \ + src/booleans.c \ + src/conditional.c \ + src/constraint.c \ + src/context.c \ + src/context_record.c \ + src/debug.c \ + src/ebitmap.c \ + src/expand.c \ + src/genbools.c \ + src/genusers.c \ + src/handle.c \ + src/hashtab.c \ + src/hierarchy.c \ + src/iface_record.c \ + src/interfaces.c \ + src/link.c \ + src/mls.c \ + src/module.c \ + src/module_to_cil.c \ + src/node_record.c \ + src/nodes.c \ + src/polcaps.c \ + src/policydb.c \ + src/policydb_convert.c \ + src/policydb_public.c \ + src/port_record.c \ + src/ports.c \ + src/roles.c \ + src/services.c \ + src/sidtab.c \ + src/symtab.c \ + src/user_record.c \ + src/users.c \ + src/util.c \ + src/write.c cil_src_files := \ - cil/src/cil_binary.c \ - cil/src/cil_build_ast.c \ - cil/src/cil.c \ - cil/src/cil_copy_ast.c \ - cil/src/cil_fqn.c \ - cil/src/cil_lexer.l \ - cil/src/cil_list.c \ - cil/src/cil_log.c \ - cil/src/cil_mem.c \ - cil/src/cil_parser.c \ - cil/src/cil_policy.c \ - cil/src/cil_post.c \ - cil/src/cil_reset_ast.c \ - cil/src/cil_resolve_ast.c \ - cil/src/cil_stack.c \ - cil/src/cil_strpool.c \ - cil/src/cil_symtab.c \ - cil/src/cil_tree.c \ - cil/src/cil_verify.c + cil/src/cil_binary.c \ + cil/src/cil_build_ast.c \ + cil/src/cil.c \ + cil/src/cil_copy_ast.c \ + cil/src/cil_fqn.c \ + cil/src/cil_lexer.l \ + cil/src/cil_list.c \ + cil/src/cil_log.c \ + cil/src/cil_mem.c \ + cil/src/cil_parser.c \ + cil/src/cil_policy.c \ + cil/src/cil_post.c \ + cil/src/cil_reset_ast.c \ + cil/src/cil_resolve_ast.c \ + cil/src/cil_stack.c \ + cil/src/cil_strpool.c \ + cil/src/cil_symtab.c \ + cil/src/cil_tree.c \ + cil/src/cil_verify.c common_cflags := \ - -Wall -W -Wundef \ - -Wshadow -Wmissing-noreturn \ - -Wmissing-format-attribute - -common_COPY_HEADERS := \ - include/sepol/handle.h \ - include/sepol/policydb.h \ - cil/include/cil/cil.h \ - include/sepol/sepol.h \ - include/sepol/policydb.h \ - include/sepol/user_record.h \ - include/sepol/context_record.h \ - include/sepol/iface_record.h \ - include/sepol/port_record.h \ - include/sepol/boolean_record.h \ - include/sepol/node_record.h \ - include/sepol/booleans.h \ - include/sepol/interfaces.h \ - include/sepol/ports.h \ - include/sepol/nodes.h \ - include/sepol/users.h \ - include/sepol/handle.h \ - include/sepol/debug.h \ - include/sepol/policydb.h \ - include/sepol/module.h \ - include/sepol/context.h + -Wall -W -Wundef \ + -Wshadow -Wmissing-noreturn \ + -Wmissing-format-attribute ifeq ($(HOST_OS), darwin) common_cflags += -DDARWIN @@ -114,8 +91,8 @@ include $(CLEAR_VARS) LOCAL_MODULE := libsepol LOCAL_MODULE_TAGS := optional LOCAL_COPY_HEADERS_TO := sepol -LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) -LOCAL_C_INCLUDES := $(common_includes) +LOCAL_COPY_HEADERS := include/sepol/handle.h include/sepol/policydb.h cil/include/cil/cil.h +LOCAL_C_INCLUDES := $(common_includes) LOCAL_CFLAGS := $(yacc_flags) $(common_cflags) LOCAL_SRC_FILES := $(common_src_files) $(cil_src_files) LOCAL_MODULE_CLASS := SHARED_LIBRARIES @@ -129,7 +106,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := libsepol LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := $(common_includes) +LOCAL_C_INCLUDES := $(common_includes) LOCAL_CFLAGS := $(yacc_flags) $(common_cflags) LOCAL_SRC_FILES := $(common_src_files) $(cil_src_files) LOCAL_MODULE_CLASS := STATIC_LIBRARIES @@ -143,7 +120,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := chkcon LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := $(common_includes) +LOCAL_C_INCLUDES := $(common_includes) LOCAL_CFLAGS := $(common_cflags) LOCAL_SRC_FILES := utils/chkcon.c LOCAL_SHARED_LIBRARIES := libsepol