Build sepolicy tools with Android.bp.

am: 594488f8b0

Change-Id: Ifb78919e6add04bbdcf673231a3c208980c25183
This commit is contained in:
Tri Vo 2018-05-07 14:33:15 -07:00 committed by android-build-merger
commit 98e7cdf408
5 changed files with 86 additions and 76 deletions

View File

@ -1,4 +0,0 @@
subdirs = [
"tests",
"build",
]

60
tools/Android.bp Normal file
View File

@ -0,0 +1,60 @@
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
cc_defaults {
name: "sepolicy_tools_defaults",
cflags: [
"-Wall",
"-Werror",
],
static_libs: ["libsepol"],
stl: "none",
tags: ["optional"],
}
cc_binary_host {
name: "checkseapp",
defaults: ["sepolicy_tools_defaults"],
srcs: ["check_seapp.c"],
whole_static_libs: ["libpcre2"],
cflags: ["-DLINK_SEPOL_STATIC"],
}
cc_binary_host {
name: "checkfc",
defaults: ["sepolicy_tools_defaults"],
srcs: ["checkfc.c"],
static_libs: ["libselinux"],
}
cc_binary_host {
name: "sepolicy-check",
defaults: ["sepolicy_tools_defaults"],
srcs: ["sepolicy-check.c"],
}
cc_binary_host {
name: "version_policy",
defaults: ["sepolicy_tools_defaults"],
srcs: ["version_policy.c"],
}
cc_prebuilt_binary {
name: "insertkeys.py",
srcs: ["insertkeys.py"],
tags: ["optional"],
host_supported: true,
}

View File

@ -1,62 +1,3 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := checkseapp
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -DLINK_SEPOL_STATIC -Wall -Werror
LOCAL_SRC_FILES := check_seapp.c
LOCAL_STATIC_LIBRARIES := libsepol
LOCAL_WHOLE_STATIC_LIBRARIES := libpcre2
LOCAL_CXX_STL := none
include $(BUILD_HOST_EXECUTABLE)
###################################
include $(CLEAR_VARS)
LOCAL_MODULE := checkfc
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wall -Werror
LOCAL_SRC_FILES := checkfc.c
LOCAL_STATIC_LIBRARIES := libsepol libselinux
LOCAL_CXX_STL := none
include $(BUILD_HOST_EXECUTABLE)
##################################
include $(CLEAR_VARS)
LOCAL_MODULE := insertkeys.py
LOCAL_SRC_FILES := insertkeys.py
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_IS_HOST_MODULE := true
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)
###################################
include $(CLEAR_VARS)
LOCAL_MODULE := sepolicy-check
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wall -Werror
LOCAL_SRC_FILES := sepolicy-check.c
LOCAL_STATIC_LIBRARIES := libsepol
LOCAL_CXX_STL := none
include $(BUILD_HOST_EXECUTABLE)
###################################
include $(CLEAR_VARS)
LOCAL_MODULE := version_policy
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS := -Wall -Werror
LOCAL_SRC_FILES := version_policy.c
LOCAL_SHARED_LIBRARIES := libsepol
LOCAL_CXX_STL := none
include $(BUILD_HOST_EXECUTABLE)
include $(call all-makefiles-under,$(LOCAL_PATH))

26
tools/fc_sort/Android.bp Normal file
View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
cc_binary_host {
name: "fc_sort",
srcs: ["fc_sort.c"],
stl: "none",
tags: ["optional"],
cflags: [
"-Wall",
"-Werror",
],
}

View File

@ -1,13 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := fc_sort
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := fc_sort.c
LOCAL_CFLAGS := -Wall -Werror
LOCAL_CXX_STL := none
include $(BUILD_HOST_EXECUTABLE)
###################################