secilc: Migrate to soong

Bug: 37512442
Test: build and boot Marlin
Change-Id: Ie02b3dc3db0e597c9ac7e93c6684fcd7867c531e
This commit is contained in:
Jeff Vander Stoep 2017-05-08 23:05:06 -07:00 committed by Jeffrey Vander Stoep
parent c158e00746
commit dfb7841f31
4 changed files with 22 additions and 36 deletions

View file

@ -2,4 +2,5 @@ subdirs = [
"checkpolicy",
"libselinux",
"libsepol",
"secilc",
]

View file

@ -1 +1 @@
include $(call all-named-subdir-makefiles, secilc libselinux)
include $(call all-named-subdir-makefiles, libselinux)

20
secilc/Android.bp Normal file
View file

@ -0,0 +1,20 @@
common_CFLAGS = [
"-Wall",
"-Werror",
"-Wshadow",
]
cc_binary {
name: "secilc",
host_supported: true,
cflags: common_CFLAGS,
srcs: ["secilc.c"],
target: {
android: {
static_libs: ["libsepol"],
},
host: {
shared_libs: ["libsepol"],
},
},
}

View file

@ -1,35 +0,0 @@
LOCAL_PATH:= $(call my-dir)
common_src_files := secilc.c
common_cflags := \
-Wall -Wshadow -O2 \
-pipe -fno-strict-aliasing \
##
# secilc on the host.
#
include $(CLEAR_VARS)
LOCAL_MODULE := secilc
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := $(common_cflags)
LOCAL_SRC_FILES := secilc.c
LOCAL_SHARED_LIBRARIES := libsepol
LOCAL_MODULE_CLASS := EXECUTABLES
include $(BUILD_HOST_EXECUTABLE)
##
# secilc on the target.
#
include $(CLEAR_VARS)
LOCAL_MODULE := secilc
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := $(common_cflags)
LOCAL_SRC_FILES := secilc.c
LOCAL_STATIC_LIBRARIES := libsepol
LOCAL_MODULE_CLASS := EXECUTABLES
include $(BUILD_EXECUTABLE)