Convert to Android.bp
See build/soong/README.md for more information.
Test: cd hardware/google/apf; mma
Change-Id: I67e3ac7199cc70126504436c8b47beb6f9d292ad
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)