summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-05-04 18:35:50 -0700
committerDan Willemsen <dwillemsen@google.com>2018-05-04 20:25:22 -0700
commit2a904afcb32568d3c33d56971c7b1783e265c8d5 (patch)
tree2ac40ff8a86c94ba1278ec98a7c59e19e579aafd
parenta1b34a8173609094df0e124ecca19b619fc19a41 (diff)
downloadextras-2a904afcb32568d3c33d56971c7b1783e265c8d5.tar.gz
Convert to Soong
See build/soong/README.md for more information. This effectively moves some of these targets from /system/xbin to /system/bin, as Soong is not supporting xbin. I've attempted to fix and find any external dependencies to these paths. Test: m anrd app-launcher bootctrl.default bootctl cpustats crypto iotop Change-Id: I3eb58d8a260884652b5ee827ac88ece429d76448
-rw-r--r--ANRdaemon/Android.bp16
-rw-r--r--ANRdaemon/Android.mk20
-rw-r--r--Android.bp2
-rw-r--r--CleanSpec.mk3
-rw-r--r--app-launcher/Android.bp26
-rw-r--r--app-launcher/Android.mk28
-rw-r--r--boot_control_copy/Android.bp26
-rw-r--r--boot_control_copy/Android.mk14
-rw-r--r--bootctl/Android.bp17
-rw-r--r--bootctl/Android.mk16
-rw-r--r--cpustats/Android.bp8
-rw-r--r--cpustats/Android.mk11
-rw-r--r--crypto-perf/Android.bp18
-rw-r--r--crypto-perf/Android.mk13
-rw-r--r--iotop/Android.bp33
-rw-r--r--iotop/Android.mk28
16 files changed, 153 insertions, 126 deletions
diff --git a/ANRdaemon/Android.bp b/ANRdaemon/Android.bp
new file mode 100644
index 00000000..9bb9b71e
--- /dev/null
+++ b/ANRdaemon/Android.bp
@@ -0,0 +1,16 @@
+cc_binary {
+ name: "anrd",
+ srcs: ["ANRdaemon.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ shared_libs: [
+ "liblog",
+ "libbinder",
+ "libcutils",
+ "libutils",
+ "libz",
+ ],
+}
diff --git a/ANRdaemon/Android.mk b/ANRdaemon/Android.mk
deleted file mode 100644
index de5accec..00000000
--- a/ANRdaemon/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := ANRdaemon.cpp
-LOCAL_C_INCLUDES += external/zlib
-LOCAL_MODULE := anrd
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_SHARED_LIBRARIES := \
- liblog \
- libbinder \
- libcutils \
- libutils \
- libz
-include $(BUILD_EXECUTABLE)
-
-endif
diff --git a/Android.bp b/Android.bp
index f441d6e5..ac5d8b83 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,5 +12,3 @@ cc_defaults {
"-Wno-unused-const-variable",
],
}
-
-subdirs = ["*"]
diff --git a/CleanSpec.mk b/CleanSpec.mk
index ce834cff..37ef3daa 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -46,6 +46,9 @@
$(call add-clean-step, rm -f $(PRODUCT_OUT)/system.img $(PRODUCT_OUT)/userdata.img)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/taskstats_intermediates)
+$(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)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/app-launcher/Android.bp b/app-launcher/Android.bp
new file mode 100644
index 00000000..7585607e
--- /dev/null
+++ b/app-launcher/Android.bp
@@ -0,0 +1,26 @@
+cc_defaults {
+ name: "computestats-defaults",
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+}
+
+cc_binary_host {
+ name: "computestats",
+ defaults: ["computestats-defaults"],
+ srcs: ["computestats.c"],
+}
+
+cc_binary_host {
+ name: "computestatsf",
+ defaults: ["computestats-defaults"],
+ srcs: ["computestatsf.c"],
+}
diff --git a/app-launcher/Android.mk b/app-launcher/Android.mk
index cef9daaa..5df6eb9e 100644
--- a/app-launcher/Android.mk
+++ b/app-launcher/Android.mk
@@ -1,26 +1,10 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-#LOCAL_32_BIT_ONLY = true
+LOCAL_MODULE := app-launcher
+LOCAL_IS_HOST_MODULE := true
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_SRC_FILES := app-launcher
LOCAL_MODULE_HOST_OS := linux
-LOCAL_SRC_FILES := computestatsf.c
-LOCAL_MODULE := computestatsf
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_MODULE_TAGS := debug
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
-#LOCAL_32_BIT_ONLY = true
-LOCAL_MODULE_HOST_OS := linux
-LOCAL_SRC_FILES := computestats.c
-LOCAL_MODULE := computestats
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_MODULE_TAGS := debug
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_PREBUILT_EXECUTABLES := app-launcher
-LOCAL_MODULE_HOST_OS := linux
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-include $(BUILD_HOST_PREBUILT)
+LOCAL_REQUIRED_MODULES := computestats computestatsf
+include $(BUILD_PREBUILT)
diff --git a/boot_control_copy/Android.bp b/boot_control_copy/Android.bp
new file mode 100644
index 00000000..97d89c86
--- /dev/null
+++ b/boot_control_copy/Android.bp
@@ -0,0 +1,26 @@
+// Copyright 2015 The Android Open Source Project
+
+cc_library_shared {
+ name: "bootctrl.default",
+ relative_install_path: "hw",
+
+ srcs: [
+ "boot_control_copy.cpp",
+ "bootinfo.cpp",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-missing-field-initializers",
+ "-Wno-unused-parameter",
+ ],
+ header_libs: ["bootimg_headers"],
+ shared_libs: [
+ "libbase",
+ "libcutils",
+ ],
+ static_libs: [
+ "libbootloader_message",
+ "libfs_mgr",
+ ],
+}
diff --git a/boot_control_copy/Android.mk b/boot_control_copy/Android.mk
deleted file mode 100644
index 8ed3273f..00000000
--- a/boot_control_copy/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 := boot_control_copy.cpp bootinfo.cpp
-LOCAL_CFLAGS := -Wall -Werror -Wno-missing-field-initializers -Wno-unused-parameter
-LOCAL_HEADER_LIBRARIES := bootimg_headers
-LOCAL_SHARED_LIBRARIES := libbase libcutils
-LOCAL_STATIC_LIBRARIES := libbootloader_message libfs_mgr
-
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_MODULE:= bootctrl.default
-include $(BUILD_SHARED_LIBRARY)
diff --git a/bootctl/Android.bp b/bootctl/Android.bp
new file mode 100644
index 00000000..a58723c0
--- /dev/null
+++ b/bootctl/Android.bp
@@ -0,0 +1,17 @@
+// Copyright 2015 The Android Open Source Project
+
+cc_binary {
+ name: "bootctl",
+ srcs: ["bootctl.cpp"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.boot@1.0",
+ ],
+}
diff --git a/bootctl/Android.mk b/bootctl/Android.mk
deleted file mode 100644
index 7a0c526b..00000000
--- a/bootctl/Android.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2015 The Android Open Source Project
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := bootctl.cpp
-LOCAL_MODULE := bootctl
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- libutils \
- android.hardware.boot@1.0 \
-
-include $(BUILD_EXECUTABLE)
diff --git a/cpustats/Android.bp b/cpustats/Android.bp
new file mode 100644
index 00000000..6b0229be
--- /dev/null
+++ b/cpustats/Android.bp
@@ -0,0 +1,8 @@
+cc_binary {
+ name: "cpustats",
+ srcs: ["cpustats.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/cpustats/Android.mk b/cpustats/Android.mk
deleted file mode 100644
index a6db30ff..00000000
--- a/cpustats/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := cpustats.c
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := cpustats
-
-include $(BUILD_EXECUTABLE)
diff --git a/crypto-perf/Android.bp b/crypto-perf/Android.bp
new file mode 100644
index 00000000..60116891
--- /dev/null
+++ b/crypto-perf/Android.bp
@@ -0,0 +1,18 @@
+cc_binary {
+ name: "crypto",
+
+ cflags: [
+ "-O0",
+ "-march=armv8-a+crypto",
+ "-Wall",
+ "-Werror",
+ ],
+ srcs: ["crypto.cpp"],
+
+ enabled: false,
+ arch: {
+ arm64: {
+ enabled: true,
+ },
+ },
+}
diff --git a/crypto-perf/Android.mk b/crypto-perf/Android.mk
deleted file mode 100644
index 4a3cbe41..00000000
--- a/crypto-perf/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-ifeq ($(TARGET_ARCH),arm64)
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS := -O0 -march=armv8-a+crypto -Wall -Werror
-LOCAL_SRC_FILES := crypto.cpp
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE := crypto
-
-include $(BUILD_EXECUTABLE)
-endif
diff --git a/iotop/Android.bp b/iotop/Android.bp
new file mode 100644
index 00000000..9b5e40cc
--- /dev/null
+++ b/iotop/Android.bp
@@ -0,0 +1,33 @@
+// Copyright (C) 2015 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: "iotop",
+
+ srcs: [
+ "iotop.cpp",
+ "tasklist.cpp",
+ "taskstats.cpp",
+ ],
+
+ shared_libs: [
+ "libnl",
+ "libbase",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/iotop/Android.mk b/iotop/Android.mk
deleted file mode 100644
index b8a146df..00000000
--- a/iotop/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2015 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 := iotop.cpp tasklist.cpp taskstats.cpp
-
-LOCAL_MODULE := iotop
-
-LOCAL_MODULE_TAGS := debug
-
-LOCAL_SHARED_LIBRARIES := libnl libbase
-
-LOCAL_CFLAGS := -Wall -Werror
-
-include $(BUILD_EXECUTABLE)