summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CleanSpec.mk15
-rw-r--r--kexec_tools/Android.bp23
-rw-r--r--kexec_tools/Android.mk24
-rw-r--r--ksmutils/Android.bp26
-rw-r--r--ksmutils/Android.mk24
-rw-r--r--latencytop/Android.bp25
-rw-r--r--latencytop/Android.mk28
-rw-r--r--libfec/Android.mk5
-rw-r--r--libfec/test/Android.bp40
-rw-r--r--libfec/test/Android.mk31
-rw-r--r--memcpy-perf/Android.bp18
-rw-r--r--memcpy-perf/Android.mk10
-rw-r--r--memory_replay/Android.bp65
-rw-r--r--memory_replay/Android.mk82
-rw-r--r--memtrack/Android.bp53
-rw-r--r--memtrack/Android.mk58
-rw-r--r--micro_bench/Android.bp33
-rw-r--r--micro_bench/Android.mk30
-rw-r--r--mmap-perf/Android.bp38
-rw-r--r--mmap-perf/Android.mk30
-rw-r--r--multinetwork/Android.bp46
-rw-r--r--multinetwork/Android.mk29
-rwxr-xr-xmultinetwork/quick_test.sh4
-rw-r--r--pagecache/Android.bp12
-rw-r--r--pagecache/Android.mk14
-rw-r--r--preopt2cachename/Android.bp31
-rw-r--r--preopt2cachename/Android.mk32
-rw-r--r--puncture_fs/Android.bp29
-rw-r--r--puncture_fs/Android.mk32
-rw-r--r--runconuid/Android.bp12
-rw-r--r--runconuid/Android.mk15
-rw-r--r--sane_schedstat/Android.bp11
-rw-r--r--sane_schedstat/Android.mk12
-rw-r--r--showslab/Android.bp11
-rw-r--r--showslab/Android.mk16
-rw-r--r--sound/Android.bp9
-rw-r--r--sound/Android.mk8
-rw-r--r--taskstats/Android.bp14
-rw-r--r--taskstats/Android.mk17
-rw-r--r--tests/Android.bp3
-rw-r--r--verity/Android.bp85
-rw-r--r--verity/Android.mk57
-rw-r--r--verity/fec/Android.bp33
-rw-r--r--verity/fec/Android.mk22
-rw-r--r--zram-perf/Android.bp12
-rw-r--r--zram-perf/Android.mk8
46 files changed, 643 insertions, 589 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 37ef3daa..9d90de59 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -49,6 +49,21 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/taskstats_intermedi
$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/anrd)
$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/cpustats)
$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/crypto)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/kexecload)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/ksminfo)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/latencytop)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/memtrack_share)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/memtrack)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/micro_bench)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/micro_bench_static)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/dnschk)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/httpurl)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/dumpcache)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/puncture_fs)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/runconuid)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/sane_schedstat)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/showslab)
+$(call add-clean-step, rm -f $(TARGET_OUT_OPTIONAL_EXECUTABLES)/taskstats)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/kexec_tools/Android.bp b/kexec_tools/Android.bp
new file mode 100644
index 00000000..bcfc2ee6
--- /dev/null
+++ b/kexec_tools/Android.bp
@@ -0,0 +1,23 @@
+// Copyright (C) 2013 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.
+// Copyright The Android Open Source Project
+
+cc_binary {
+ name: "kexecload",
+ srcs: ["kexecload.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/kexec_tools/Android.mk b/kexec_tools/Android.mk
deleted file mode 100644
index c8a49321..00000000
--- a/kexec_tools/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (C) 2013 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.
-# Copyright The Android Open Source Project
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := kexecload
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := eng
-LOCAL_SRC_FILES := kexecload.c
-LOCAL_CFLAGS := -Wall -Werror
-include $(BUILD_EXECUTABLE)
diff --git a/ksmutils/Android.bp b/ksmutils/Android.bp
new file mode 100644
index 00000000..248743c9
--- /dev/null
+++ b/ksmutils/Android.bp
@@ -0,0 +1,26 @@
+// Copyright (C) 2013 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 {
+ name: "ksminfo",
+ srcs: [
+ "ksminfo.c",
+ "lookup3.c",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ shared_libs: ["libpagemap"],
+}
diff --git a/ksmutils/Android.mk b/ksmutils/Android.mk
deleted file mode 100644
index 2be4ddf2..00000000
--- a/ksmutils/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (C) 2013 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := ksminfo.c lookup3.c
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_SHARED_LIBRARIES := libpagemap
-LOCAL_MODULE := ksminfo
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-include $(BUILD_EXECUTABLE)
diff --git a/latencytop/Android.bp b/latencytop/Android.bp
new file mode 100644
index 00000000..fab36312
--- /dev/null
+++ b/latencytop/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2008 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 {
+ name: "latencytop",
+
+ srcs: ["latencytop.c"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+}
diff --git a/latencytop/Android.mk b/latencytop/Android.mk
deleted file mode 100644
index 6649a83b..00000000
--- a/latencytop/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2008 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.
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := latencytop.c
-
-LOCAL_MODULE := latencytop
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-
-LOCAL_MODULE_TAGS := debug
-
-LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
-
-include $(BUILD_EXECUTABLE)
diff --git a/libfec/Android.mk b/libfec/Android.mk
deleted file mode 100644
index 12974bc5..00000000
--- a/libfec/Android.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright 2015 The Android Open Source Project
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(LOCAL_PATH)/test/Android.mk
diff --git a/libfec/test/Android.bp b/libfec/test/Android.bp
new file mode 100644
index 00000000..5cc6d86d
--- /dev/null
+++ b/libfec/test/Android.bp
@@ -0,0 +1,40 @@
+cc_defaults {
+ name: "fec_test_defaults",
+
+ gtest: false,
+ sanitize: {
+ misc_undefined: ["integer"],
+ },
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-D_GNU_SOURCE",
+ ],
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_test_host {
+ name: "fec_test_read",
+ defaults: ["fec_test_defaults"],
+ srcs: ["test_read.cpp"],
+ static_libs: [
+ "libfec",
+ "libfec_rs",
+ "libcrypto_utils",
+ "libcrypto",
+ "libext4_utils",
+ "libsquashfs_utils",
+ "libbase",
+ ],
+}
+
+cc_test_host {
+ name: "fec_test_rs",
+ defaults: ["fec_test_defaults"],
+ srcs: ["test_rs.c"],
+ static_libs: ["libfec_rs"],
+}
diff --git a/libfec/test/Android.mk b/libfec/test/Android.mk
deleted file mode 100644
index 0d5e248f..00000000
--- a/libfec/test/Android.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-ifeq ($(HOST_OS),linux)
-
-include $(CLEAR_VARS)
-LOCAL_SANITIZE := integer
-LOCAL_MODULE := fec_test_read
-LOCAL_SRC_FILES := test_read.cpp
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_LIBRARIES := \
- libfec \
- libfec_rs \
- libcrypto_utils \
- libcrypto \
- libext4_utils \
- libsquashfs_utils \
- libbase
-LOCAL_CFLAGS := -Wall -Werror -D_GNU_SOURCE
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_SANITIZE := integer
-LOCAL_MODULE := fec_test_rs
-LOCAL_SRC_FILES := test_rs.c
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_LIBRARIES := libfec_rs
-LOCAL_CFLAGS := -Wall -Werror -D_GNU_SOURCE
-LOCAL_C_INCLUDES += external/fec
-include $(BUILD_HOST_EXECUTABLE)
-
-endif # HOST_OS == linux
diff --git a/memcpy-perf/Android.bp b/memcpy-perf/Android.bp
new file mode 100644
index 00000000..0fbbf2f8
--- /dev/null
+++ b/memcpy-perf/Android.bp
@@ -0,0 +1,18 @@
+cc_binary {
+ name: "memcpy-perf",
+ cflags: [
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-Wno-missing-field-initializers",
+ "-Wno-sign-compare",
+ "-O3",
+ ],
+ srcs: [
+ "memcpy-perf.cpp",
+ "test-funcs.cpp",
+ ],
+ static_executable: true,
+ stl: "libc++_static",
+ static_libs: ["libc"],
+}
diff --git a/memcpy-perf/Android.mk b/memcpy-perf/Android.mk
deleted file mode 100644
index a2b3399a..00000000
--- a/memcpy-perf/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := memcpy-perf
-LOCAL_CFLAGS += -g -Wall -Werror -Wno-missing-field-initializers -Wno-sign-compare -O3
-LOCAL_SRC_FILES := memcpy-perf.cpp test-funcs.cpp
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_CXX_STL := libc++_static
-LOCAL_STATIC_LIBRARIES := libc
-include $(BUILD_EXECUTABLE)
diff --git a/memory_replay/Android.bp b/memory_replay/Android.bp
new file mode 100644
index 00000000..824ac125
--- /dev/null
+++ b/memory_replay/Android.bp
@@ -0,0 +1,65 @@
+cc_defaults {
+ name: "memory_replay_defaults",
+ host_supported: true,
+
+ srcs: [
+ "Action.cpp",
+ "LineBuffer.cpp",
+ "NativeInfo.cpp",
+ "Pointers.cpp",
+ "Thread.cpp",
+ "Threads.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+ shared_libs: ["libbase"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+
+ compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
+
+}
+
+cc_binary {
+ name: "memory_replay",
+ defaults: ["memory_replay_defaults"],
+
+ srcs: ["main.cpp"],
+}
+
+cc_test {
+ name: "memory_replay_tests",
+ defaults: ["memory_replay_defaults"],
+
+ srcs: [
+ "tests/ActionTest.cpp",
+ "tests/LineBufferTest.cpp",
+ "tests/NativeInfoTest.cpp",
+ "tests/PointersTest.cpp",
+ "tests/ThreadTest.cpp",
+ "tests/ThreadsTest.cpp",
+ ],
+
+ local_include_dirs: ["tests"],
+
+ target: {
+ android: {
+ test_suites: ["device-tests"],
+ },
+ },
+}
diff --git a/memory_replay/Android.mk b/memory_replay/Android.mk
deleted file mode 100644
index b72f0061..00000000
--- a/memory_replay/Android.mk
+++ /dev/null
@@ -1,82 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-memory_replay_src_files := \
- Action.cpp \
- LineBuffer.cpp \
- NativeInfo.cpp \
- Pointers.cpp \
- Thread.cpp \
- Threads.cpp \
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(memory_replay_src_files) main.cpp
-LOCAL_CFLAGS := -Wall -Wextra -Werror
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := memory_replay
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
-LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-LOCAL_SHARED_LIBRARIES := libbase
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(memory_replay_src_files) main.cpp
-LOCAL_CFLAGS := -Wall -Wextra -Werror
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := memory_replay
-LOCAL_MODULE_HOST_OS := linux
-LOCAL_LDLIBS := -lrt
-LOCAL_SHARED_LIBRARIES := libbase
-include $(BUILD_HOST_EXECUTABLE)
-
-memory_replay_test_src_files := \
- tests/ActionTest.cpp \
- tests/LineBufferTest.cpp \
- tests/NativeInfoTest.cpp \
- tests/PointersTest.cpp \
- tests/ThreadTest.cpp \
- tests/ThreadsTest.cpp \
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- $(memory_replay_src_files) \
- $(memory_replay_test_src_files) \
-
-LOCAL_CFLAGS := -Wall -Wextra -Werror
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/tests
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := memory_replay_tests
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-LOCAL_SHARED_LIBRARIES := libbase
-
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
-LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-include $(BUILD_NATIVE_TEST)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- $(memory_replay_src_files) \
- $(memory_replay_test_src_files) \
-
-LOCAL_CFLAGS := -Wall -Wextra -Werror
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/tests
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := memory_replay_tests
-LOCAL_MODULE_HOST_OS := linux
-
-LOCAL_SHARED_LIBRARIES := libbase
-LOCAL_LDLIBS := -lrt
-
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
-LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-include $(BUILD_HOST_NATIVE_TEST)
-
-memory_replay_src_files :=
-memory_replay_test_src_files :=
diff --git a/memtrack/Android.bp b/memtrack/Android.bp
new file mode 100644
index 00000000..3f445b71
--- /dev/null
+++ b/memtrack/Android.bp
@@ -0,0 +1,53 @@
+// Copyright (C) 2013 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: "memtrack_defaults",
+
+ srcs: ["memtrack.cpp"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-error=unused-value",
+ ],
+}
+
+cc_binary {
+ name: "memtrack_share",
+ defaults: ["memtrack_defaults"],
+
+ shared_libs: ["liblog"],
+}
+
+cc_binary {
+ name: "memtrack",
+ defaults: ["memtrack_defaults"],
+
+ static_executable: true,
+ static_libs: [
+ "libc",
+ "liblog",
+ "libc++abi",
+ "libdl",
+ ],
+
+ stl: "libc++_static",
+
+ // Bug: 18389563 - Today, libc++_static and libgcc have duplicate sybols for
+ // __aeabi_uidiv(). Allowing multiple definitions lets the build proceed, but
+ // updating compiler-rt to be a superset of libgcc will allow this WAR to be
+ // removed.
+ ldflags: ["-Wl,-z,muldefs"],
+}
diff --git a/memtrack/Android.mk b/memtrack/Android.mk
deleted file mode 100644
index cd99b6cc..00000000
--- a/memtrack/Android.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (C) 2013 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-src_files := \
- memtrack.cpp
-
-include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-
-LOCAL_SRC_FILES := $(src_files)
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE := memtrack_share
-LOCAL_CFLAGS := -Wall -Werror -Wno-error=unused-value
-
-LOCAL_C_INCLUDES += $(includes)
-LOCAL_SHARED_LIBRARIES := \
- liblog \
-
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-
-LOCAL_SRC_FILES := $(src_files)
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE := memtrack
-LOCAL_CFLAGS := -Wall -Werror -Wno-error=unused-value
-
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_STATIC_LIBRARIES := \
- libc \
- liblog \
- libc++abi \
- libdl \
-
-LOCAL_CXX_STL := libc++_static
-
-# Bug: 18389563 - Today, libc++_static and libgcc have duplicate sybols for
-# __aeabi_uidiv(). Allowing multiple definitions lets the build proceed, but
-# updating compiler-rt to be a superset of libgcc will allow this WAR to be
-# removed.
-LOCAL_LDFLAGS := -Wl,-z,muldefs
-
-include $(BUILD_EXECUTABLE)
diff --git a/micro_bench/Android.bp b/micro_bench/Android.bp
new file mode 100644
index 00000000..ba9db53b
--- /dev/null
+++ b/micro_bench/Android.bp
@@ -0,0 +1,33 @@
+cc_defaults {
+ name: "micro_bench_defaults",
+ srcs: ["micro_bench.cpp"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-error=unused-variable",
+ ],
+
+ compile_multilib: "both",
+ multilib: {
+ lib64: {
+ suffix: "64",
+ },
+ },
+}
+
+cc_binary {
+ name: "micro_bench",
+ defaults: ["micro_bench_defaults"],
+}
+
+cc_binary {
+ name: "micro_bench_static",
+ defaults: ["micro_bench_defaults"],
+
+ static_libs: [
+ "libc",
+ "libm",
+ ],
+ static_executable: true,
+}
diff --git a/micro_bench/Android.mk b/micro_bench/Android.mk
deleted file mode 100644
index 843a2e5e..00000000
--- a/micro_bench/Android.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := micro_bench.cpp
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := micro_bench
-LOCAL_CFLAGS := -Wall -Werror -Wno-error=unused-variable
-
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)
-LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := micro_bench.cpp
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := micro_bench_static
-LOCAL_CFLAGS := -Wall -Werror -Wno-error=unused-variable
-LOCAL_STATIC_LIBRARIES = libc libm
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)
-LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-include $(BUILD_EXECUTABLE)
diff --git a/mmap-perf/Android.bp b/mmap-perf/Android.bp
new file mode 100644
index 00000000..4841bee1
--- /dev/null
+++ b/mmap-perf/Android.bp
@@ -0,0 +1,38 @@
+//
+// Copyright (C) 2014 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_benchmark {
+ name: "mmapPerf",
+
+ srcs: ["mmapPerf.cpp"],
+ test_suites: ["device-tests"],
+ multilib: {
+ lib64: {
+ suffix: "64",
+ },
+ },
+ cflags: [
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-Wno-missing-field-initializers",
+ "-Wno-sign-compare",
+ "-O3",
+ ],
+ static_executable: true,
+ stl: "libc++_static",
+ static_libs: ["libc"],
+}
diff --git a/mmap-perf/Android.mk b/mmap-perf/Android.mk
deleted file mode 100644
index 96de5ea5..00000000
--- a/mmap-perf/Android.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2014 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.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := mmapPerf.cpp
-LOCAL_MODULE := mmapPerf
-LOCAL_COMPATIBILITY_SUITE := device-tests
-LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)
-LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-LOCAL_CFLAGS += -g -Wall -Werror -Wno-missing-field-initializers -Wno-sign-compare -O3
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_CXX_STL := libc++_static
-LOCAL_STATIC_LIBRARIES := libc
-include $(BUILD_NATIVE_BENCHMARK)
diff --git a/multinetwork/Android.bp b/multinetwork/Android.bp
new file mode 100644
index 00000000..e2b4be0e
--- /dev/null
+++ b/multinetwork/Android.bp
@@ -0,0 +1,46 @@
+cc_defaults {
+ name: "multinetwork_defaults",
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ include_dirs: [
+ "frameworks/native/include",
+ ],
+
+ srcs: [
+ "common.cpp",
+ ],
+
+ shared_libs: [
+ "libandroid",
+ "libbase",
+ ],
+
+ product_variables: {
+ // The PDK build does not have access to frameworks/native elements.
+ pdk: {
+ enabled: false,
+ },
+ },
+}
+
+// Sample util binaries.
+cc_binary {
+ name: "dnschk",
+ defaults: ["multinetwork_defaults"],
+
+ srcs: [
+ "dnschk.cpp",
+ ],
+}
+
+cc_binary {
+ name: "httpurl",
+ defaults: ["multinetwork_defaults"],
+
+ srcs: [
+ "httpurl.cpp",
+ ],
+}
diff --git a/multinetwork/Android.mk b/multinetwork/Android.mk
deleted file mode 100644
index db046871..00000000
--- a/multinetwork/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-# The PDK build does not have access to frameworks/native elements.
-ifneq ($(TARGET_BUILD_PDK), true)
-
-# Sample util binaries.
-include $(CLEAR_VARS)
-LOCAL_MODULE := dnschk
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES += frameworks/native/include external/libcxx/include
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_SHARED_LIBRARIES := libandroid libbase libc++
-LOCAL_SRC_FILES := dnschk.cpp common.cpp
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := httpurl
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES += frameworks/native/include external/libcxx/include
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_SHARED_LIBRARIES := libandroid libbase libc++
-LOCAL_SRC_FILES := httpurl.cpp common.cpp
-include $(BUILD_EXECUTABLE)
-
-endif # ifneq ($(TARGET_BUILD_PDK), true)
diff --git a/multinetwork/quick_test.sh b/multinetwork/quick_test.sh
index f586bae8..acc52396 100755
--- a/multinetwork/quick_test.sh
+++ b/multinetwork/quick_test.sh
@@ -35,7 +35,7 @@ echo "$PREFIX Using nethandle $nethandle ($(toHex $nethandle))"
echo ""
readonly IPADDRESSES=$(
- adb shell /system/xbin/dnschk --nethandle $nethandle $TEST_HOST |
+ adb shell /system/bin/dnschk --nethandle $nethandle $TEST_HOST |
sed -e 's/#.*//' -e '/^$/d')
@@ -43,6 +43,6 @@ for host in $TEST_HOST $IPADDRESSES; do
urls=$(getUrls $host)
for url in $urls; do
echo "$PREFIX Checking $url" >&2
- adb shell /system/xbin/httpurl --nethandle $nethandle "$url"
+ adb shell /system/bin/httpurl --nethandle $nethandle "$url"
done
done
diff --git a/pagecache/Android.bp b/pagecache/Android.bp
new file mode 100644
index 00000000..40fc4449
--- /dev/null
+++ b/pagecache/Android.bp
@@ -0,0 +1,12 @@
+// Copyright 2015 The Android Open Source Project
+
+cc_binary {
+ name: "dumpcache",
+
+ srcs: ["dumpcache.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ shared_libs: ["libcutils"],
+}
diff --git a/pagecache/Android.mk b/pagecache/Android.mk
deleted file mode 100644
index 7861273a..00000000
--- a/pagecache/Android.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2015 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= dumpcache.c
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_SHARED_LIBRARIES := libcutils
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE:= dumpcache
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/preopt2cachename/Android.bp b/preopt2cachename/Android.bp
new file mode 100644
index 00000000..63fea15d
--- /dev/null
+++ b/preopt2cachename/Android.bp
@@ -0,0 +1,31 @@
+// Copyright 2016 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 {
+ name: "preopt2cachename",
+
+ srcs: ["preopt2cachename.cpp"],
+
+ shared_libs: [
+ "libsysutils",
+ "liblog",
+ "libcutils",
+ "libbase",
+ ],
+
+ cflags: [
+ "-Werror",
+ "-Wall",
+ ],
+}
diff --git a/preopt2cachename/Android.mk b/preopt2cachename/Android.mk
deleted file mode 100644
index b5a51d99..00000000
--- a/preopt2cachename/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2016 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= preopt2cachename
-
-LOCAL_SRC_FILES := \
- preopt2cachename.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libsysutils \
- liblog \
- libcutils \
- libbase
-
-LOCAL_CFLAGS := -Werror -Wall
-
-include $(BUILD_EXECUTABLE)
diff --git a/puncture_fs/Android.bp b/puncture_fs/Android.bp
new file mode 100644
index 00000000..194f78f6
--- /dev/null
+++ b/puncture_fs/Android.bp
@@ -0,0 +1,29 @@
+// Copyright (C) 2014 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 {
+ name: "puncture_fs",
+
+ srcs: ["puncture_fs.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ shared_libs: [
+ "libc",
+ "liblog",
+ "liblogwrap",
+ ],
+}
diff --git a/puncture_fs/Android.mk b/puncture_fs/Android.mk
deleted file mode 100644
index 2c72ed8a..00000000
--- a/puncture_fs/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2014 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := puncture_fs.c
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES += system/core/logwrapper/include
-
-LOCAL_SHARED_LIBRARIES := libc liblog liblogwrap
-
-LOCAL_MODULE := puncture_fs
-
-LOCAL_MODULE_TAGS := debug
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-
-include $(BUILD_EXECUTABLE)
diff --git a/runconuid/Android.bp b/runconuid/Android.bp
new file mode 100644
index 00000000..59fb9ca1
--- /dev/null
+++ b/runconuid/Android.bp
@@ -0,0 +1,12 @@
+cc_binary {
+ name: "runconuid",
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ srcs: ["runconuid.cpp"],
+
+ shared_libs: ["libselinux"],
+}
diff --git a/runconuid/Android.mk b/runconuid/Android.mk
deleted file mode 100644
index 79cd192b..00000000
--- a/runconuid/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_SRC_FILES:= runconuid.cpp
-
-LOCAL_MODULE:= runconuid
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-
-LOCAL_SHARED_LIBRARIES := libselinux
-
-include $(BUILD_EXECUTABLE)
diff --git a/sane_schedstat/Android.bp b/sane_schedstat/Android.bp
new file mode 100644
index 00000000..68adc743
--- /dev/null
+++ b/sane_schedstat/Android.bp
@@ -0,0 +1,11 @@
+cc_binary {
+ name: "sane_schedstat",
+
+ srcs: ["sane_schedstat.c"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+}
diff --git a/sane_schedstat/Android.mk b/sane_schedstat/Android.mk
deleted file mode 100644
index 5351ea6a..00000000
--- a/sane_schedstat/Android.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := sane_schedstat.c
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := sane_schedstat
-LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
-
-include $(BUILD_EXECUTABLE)
diff --git a/showslab/Android.bp b/showslab/Android.bp
new file mode 100644
index 00000000..d84004e5
--- /dev/null
+++ b/showslab/Android.bp
@@ -0,0 +1,11 @@
+// Copyright 2007 The Android Open Source Project
+
+cc_binary {
+ name: "showslab",
+
+ srcs: ["showslab.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/showslab/Android.mk b/showslab/Android.mk
deleted file mode 100644
index f48c52cb..00000000
--- a/showslab/Android.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2007 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= showslab.c
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_SHARED_LIBRARIES :=
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-
-LOCAL_MODULE_TAGS := debug
-
-LOCAL_MODULE:= showslab
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/sound/Android.bp b/sound/Android.bp
new file mode 100644
index 00000000..9c6b1905
--- /dev/null
+++ b/sound/Android.bp
@@ -0,0 +1,9 @@
+cc_binary {
+ name: "sound",
+ srcs: ["playwav.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+}
diff --git a/sound/Android.mk b/sound/Android.mk
deleted file mode 100644
index 860c4958..00000000
--- a/sound/Android.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := sound
-LOCAL_SRC_FILES := playwav.c
-LOCAL_CFLAGS := -Wall -Werror -Wno-unused-parameter
-include $(BUILD_EXECUTABLE)
-
diff --git a/taskstats/Android.bp b/taskstats/Android.bp
new file mode 100644
index 00000000..3f2a5732
--- /dev/null
+++ b/taskstats/Android.bp
@@ -0,0 +1,14 @@
+// Copyright 2013 The Android Open Source Project
+
+cc_binary {
+ name: "taskstats",
+
+ srcs: ["taskstats.c"],
+
+ shared_libs: ["libnl"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/taskstats/Android.mk b/taskstats/Android.mk
deleted file mode 100644
index 38044f08..00000000
--- a/taskstats/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 2013 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- taskstats.c
-
-LOCAL_SHARED_LIBRARIES := \
- libnl
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE:= taskstats
-LOCAL_CFLAGS:= -Wall -Werror
-
-include $(BUILD_EXECUTABLE)
diff --git a/tests/Android.bp b/tests/Android.bp
deleted file mode 100644
index 1e0d8c8f..00000000
--- a/tests/Android.bp
+++ /dev/null
@@ -1,3 +0,0 @@
-subdirs = [
- "lib",
-]
diff --git a/verity/Android.bp b/verity/Android.bp
new file mode 100644
index 00000000..2c7cda73
--- /dev/null
+++ b/verity/Android.bp
@@ -0,0 +1,85 @@
+cc_binary_host {
+ name: "generate_verity_key",
+ srcs: ["generate_verity_key.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ shared_libs: [
+ "libcrypto_utils",
+ "libcrypto",
+ ],
+}
+
+java_library_host {
+ name: "VeritySigner",
+ srcs: [
+ "VeritySigner.java",
+ "Utils.java",
+ ],
+ manifest: "VeritySigner.mf",
+
+ static_libs: ["bouncycastle"],
+}
+
+java_library_host {
+ name: "BootSignature",
+ srcs: [
+ "BootSignature.java",
+ "VeritySigner.java",
+ "Utils.java",
+ ],
+ manifest: "BootSignature.mf",
+
+ static_libs: ["bouncycastle"],
+}
+
+cc_binary_host {
+ name: "verity_verifier",
+ srcs: ["verity_verifier.cpp"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+
+ sanitize: {
+ misc_undefined: ["integer"],
+ },
+ static_libs: [
+ "libfec",
+ "libfec_rs",
+ "libcrypto_utils",
+ "libcrypto",
+ "libext4_utils",
+ "libsparse",
+ "libsquashfs_utils",
+ "libbase",
+ "libz",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
+
+cc_binary_host {
+ name: "build_verity_tree",
+ srcs: ["build_verity_tree.cpp"],
+
+ static_libs: [
+ "libsparse",
+ "libz",
+ ],
+ shared_libs: [
+ "libcrypto",
+ "libbase",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/verity/Android.mk b/verity/Android.mk
index 2e4ac273..4cf136a0 100644
--- a/verity/Android.mk
+++ b/verity/Android.mk
@@ -1,52 +1,6 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE := generate_verity_key
-LOCAL_SRC_FILES := generate_verity_key.c
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_TAGS := optional
-LOCAL_SHARED_LIBRARIES := libcrypto_utils libcrypto
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := VeritySigner.java Utils.java
-LOCAL_MODULE := VeritySigner
-LOCAL_JAR_MANIFEST := VeritySigner.mf
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_JAVA_LIBRARIES := bouncycastle-host
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := BootSignature.java VeritySigner.java Utils.java
-LOCAL_MODULE := BootSignature
-LOCAL_JAR_MANIFEST := BootSignature.mf
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_JAVA_LIBRARIES := bouncycastle-host
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := verity_verifier.cpp
-LOCAL_MODULE := verity_verifier
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_HOST_OS := linux
-LOCAL_IS_HOST_MODULE := true
-LOCAL_MODULE_TAGS := optional
-LOCAL_SANITIZE := integer
-LOCAL_STATIC_LIBRARIES := \
- libfec \
- libfec_rs \
- libcrypto_utils \
- libcrypto \
- libext4_utils \
- libsparse \
- libsquashfs_utils \
- libbase \
- libz
-LOCAL_CFLAGS := -Wall -Werror
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
LOCAL_SRC_FILES := verity_signer
LOCAL_MODULE := verity_signer
LOCAL_MODULE_CLASS := EXECUTABLES
@@ -71,14 +25,3 @@ LOCAL_SRC_FILES := build_verity_metadata.py
LOCAL_IS_HOST_MODULE := true
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := build_verity_tree
-LOCAL_SRC_FILES := build_verity_tree.cpp
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_LIBRARIES := libsparse libz
-LOCAL_SHARED_LIBRARIES := libcrypto libbase
-LOCAL_CFLAGS += -Wall -Werror
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(call first-makefiles-under,$(LOCAL_PATH))
diff --git a/verity/fec/Android.bp b/verity/fec/Android.bp
new file mode 100644
index 00000000..823404b1
--- /dev/null
+++ b/verity/fec/Android.bp
@@ -0,0 +1,33 @@
+cc_binary_host {
+ name: "fec",
+
+ target: {
+ linux_glibc: {
+ sanitize: {
+ misc_undefined: ["integer"],
+ },
+ },
+ },
+
+ srcs: [
+ "main.cpp",
+ "image.cpp",
+ ],
+
+ static_libs: [
+ "libsparse",
+ "libz",
+ "libcrypto_utils",
+ "libcrypto",
+ "libfec",
+ "libfec_rs",
+ "libext4_utils",
+ "libsquashfs_utils",
+ ],
+ shared_libs: ["libbase"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-O3",
+ ],
+}
diff --git a/verity/fec/Android.mk b/verity/fec/Android.mk
deleted file mode 100644
index 8273d0d1..00000000
--- a/verity/fec/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-ifeq ($(HOST_OS),linux)
-LOCAL_SANITIZE := integer
-endif
-LOCAL_MODULE := fec
-LOCAL_SRC_FILES := main.cpp image.cpp
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_LIBRARIES := \
- libsparse \
- libz \
- libcrypto_utils \
- libcrypto \
- libfec \
- libfec_rs \
- libext4_utils \
- libsquashfs_utils
-LOCAL_SHARED_LIBRARIES := libbase
-LOCAL_CFLAGS += -Wall -Werror -O3
-LOCAL_C_INCLUDES += external/fec
-include $(BUILD_HOST_EXECUTABLE)
diff --git a/zram-perf/Android.bp b/zram-perf/Android.bp
new file mode 100644
index 00000000..7b20537a
--- /dev/null
+++ b/zram-perf/Android.bp
@@ -0,0 +1,12 @@
+cc_binary {
+ name: "zram-perf",
+ cflags: [
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-Wno-missing-field-initializers",
+ "-Wno-sign-compare",
+ "-Wno-unused-parameter",
+ ],
+ srcs: ["zram-perf.cpp"],
+}
diff --git a/zram-perf/Android.mk b/zram-perf/Android.mk
deleted file mode 100644
index 581c7590..00000000
--- a/zram-perf/Android.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := zram-perf
-LOCAL_CFLAGS += -g -Wall -Werror -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter
-LOCAL_SRC_FILES := \
- zram-perf.cpp
-include $(BUILD_EXECUTABLE)