summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-07-11 18:00:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-07-11 18:00:16 +0000
commit49afb55b059e7b2a411cc7caae78d6c4f6b8b64e (patch)
tree305401d22e084c8178da389107c59cc8f0db41db
parent73e7572055c0a8fcd8b252b00ef400e36e6579b5 (diff)
parent531c9e3f882a0ad72eab37fafb87e5ee573abf5f (diff)
downloadcontexthub-49afb55b059e7b2a411cc7caae78d6c4f6b8b64e.tar.gz
Merge "Make contexthubhal build with the VNDK."
-rw-r--r--Android.bp3
-rw-r--r--contexthubhal/Android.mk5
-rw-r--r--contexthubhal/nanohubhal.cpp2
-rw-r--r--contexthubhal/nanohubhal_default.cpp2
-rw-r--r--contexthubhal/system_comms.cpp2
-rw-r--r--contexthubhal/test/main.cpp2
-rw-r--r--lib/Android.bp5
-rw-r--r--lib/Android.mk14
8 files changed, 16 insertions, 19 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 00000000..1e0d8c8f
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,3 @@
+subdirs = [
+ "lib",
+]
diff --git a/contexthubhal/Android.mk b/contexthubhal/Android.mk
index 1600e1b6..be27d470 100644
--- a/contexthubhal/Android.mk
+++ b/contexthubhal/Android.mk
@@ -14,7 +14,10 @@ LOCAL_MODULE_OWNER := google
# Include target-specific files.
LOCAL_SRC_FILES += nanohubhal_default.cpp
-LOCAL_STATIC_LIBRARIES += libnanohub_common
+LOCAL_HEADER_LIBRARIES := \
+ libhardware_headers \
+ libnanohub_common_headers \
+ libutils_headers
LOCAL_MODULE := context_hub.default
LOCAL_MODULE_TAGS := optional
diff --git a/contexthubhal/nanohubhal.cpp b/contexthubhal/nanohubhal.cpp
index 7764253b..21b63746 100644
--- a/contexthubhal/nanohubhal.cpp
+++ b/contexthubhal/nanohubhal.cpp
@@ -26,8 +26,8 @@
#include <hardware/context_hub.h>
#include <hardware/hardware.h>
-#include <utils/Log.h>
#include <cutils/properties.h>
+#include <log/log.h>
#include <nanohub/nanohub.h>
diff --git a/contexthubhal/nanohubhal_default.cpp b/contexthubhal/nanohubhal_default.cpp
index 2645c612..fb5231e3 100644
--- a/contexthubhal/nanohubhal_default.cpp
+++ b/contexthubhal/nanohubhal_default.cpp
@@ -18,7 +18,7 @@
#include <hardware/context_hub.h>
#include "nanohub_perdevice.h"
#include "nanohubhal.h"
-#include <utils/Log.h>
+#include <log/log.h>
namespace android {
diff --git a/contexthubhal/system_comms.cpp b/contexthubhal/system_comms.cpp
index c4e9b621..4a67a669 100644
--- a/contexthubhal/system_comms.cpp
+++ b/contexthubhal/system_comms.cpp
@@ -24,7 +24,7 @@
#include <vector>
-#include <utils/Log.h>
+#include <log/log.h>
#include <endian.h>
diff --git a/contexthubhal/test/main.cpp b/contexthubhal/test/main.cpp
index fe21e998..f8399cef 100644
--- a/contexthubhal/test/main.cpp
+++ b/contexthubhal/test/main.cpp
@@ -16,8 +16,8 @@
#include <signal.h>
#include <unistd.h>
+#include <log/log.h>
#include <sys/endian.h>
-#include <utils/Log.h>
#include <hardware/hardware.h>
#include <hardware/context_hub.h>
diff --git a/lib/Android.bp b/lib/Android.bp
new file mode 100644
index 00000000..828d29ed
--- /dev/null
+++ b/lib/Android.bp
@@ -0,0 +1,5 @@
+cc_library_headers {
+ name: "libnanohub_common_headers",
+ vendor_available: true,
+ export_include_dirs: ["include"],
+}
diff --git a/lib/Android.mk b/lib/Android.mk
index e88b9757..0caa1234 100644
--- a/lib/Android.mk
+++ b/lib/Android.mk
@@ -58,20 +58,6 @@ LOCAL_MULTILIB := both
include $(BUILD_HOST_STATIC_LIBRARY)
-include $(CLEAR_VARS)
-
-# now-empty static library to export include files for other projects
-LOCAL_MODULE := libnanohub_common
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_C_INCLUDES := \
- $(src_includes)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(src_includes)
-
-include $(BUILD_STATIC_LIBRARY)
-
include $(call first-makefiles-under, $(LOCAL_PATH))
src_files :=