summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-10-31 10:28:01 -0700
committerDan Willemsen <dwillemsen@google.com>2018-10-31 10:30:35 -0700
commit4810da91a885ee129fa10cd3e98a5face1ac31b9 (patch)
treeb4ab6f9cc62151affb166289f56ba30e204bdbcc
parent391faa08ae35a592d5b0d4759447efce0bb3ad39 (diff)
downloadapf-nougat-iot-release.tar.gz
See build/soong/README.md for more information. Test: cd hardware/google/apf; mma Change-Id: I67e3ac7199cc70126504436c8b47beb6f9d292ad
-rw-r--r--Android.bp33
-rw-r--r--Android.mk38
2 files changed, 33 insertions, 38 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..cddf41e
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,33 @@
+// Copyright 2016 The Android Open Source Project
+
+cc_defaults {
+ name: "apf_defaults",
+
+ cflags: [
+ "-DAPF_FRAME_HEADER_SIZE=14",
+ "-Wall",
+ "-Werror",
+ ],
+}
+
+cc_library_static {
+ name: "libapf",
+ defaults: ["apf_defaults"],
+ srcs: ["apf_interpreter.c"],
+
+}
+
+cc_binary_host {
+ name: "apf_disassembler",
+ defaults: ["apf_defaults"],
+ srcs: ["apf_disassembler.c"],
+}
+
+cc_binary_host {
+ name: "apf_run",
+ defaults: ["apf_defaults"],
+ srcs: [
+ "apf_run.c",
+ "apf_interpreter.c",
+ ],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index ca3bc69..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 2016 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-
-APF_CFLAGS := -DAPF_FRAME_HEADER_SIZE=14 \
- -Wall \
- -Werror
-
-include $(CLEAR_VARS)
-
-LOCAL_INCLUDES += $(LOCAL_PATH)
-
-LOCAL_CFLAGS += $(APF_CFLAGS)
-
-LOCAL_SRC_FILES += apf_interpreter.c
-
-LOCAL_MODULE:= libapf
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS += $(APF_CFLAGS)
-LOCAL_SRC_FILES += apf_disassembler.c
-LOCAL_MODULE := apf_disassembler
-LOCAL_MODULE_TAGS := debug
-
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS += $(APF_CFLAGS)
-LOCAL_SRC_FILES += apf_run.c apf_interpreter.c
-LOCAL_MODULE := apf_run
-LOCAL_MODULE_TAGS := debug
-
-include $(BUILD_HOST_EXECUTABLE)