summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Wiley <wiley@google.com>2015-08-04 09:52:44 -0700
committerChristopher Wiley <wiley@google.com>2015-08-04 09:52:44 -0700
commit643ac02b5a989b6833920caba0f1ccf659ec3b16 (patch)
treec6fc8ce291b35a00d133ba5a3d70ec6ce2493674
parent876774d281ceb2112b2487c85ef3f1da2e566598 (diff)
downloaddbus-binding-generator-643ac02b5a989b6833920caba0f1ccf659ec3b16.tar.gz
Add Android.mk
This includes support to build both the host build tool and the host unittests. Bug: 22608897 Change-Id: Iee07b18be658462fb0549d4c12cae8aae26e8d2d
-rw-r--r--Android.mk76
1 files changed, 76 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..0fdb854
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,76 @@
+# 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)
+ifeq ($(HOST_OS),linux)
+
+libdbusBindingGenCFlags := -Wno-unused-parameter
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libdbus-binding-gen-host
+LOCAL_CFLAGS := $(libdbusBindingGenCFlags)
+LOCAL_CPP_EXTENSION := .cc
+# Hack these includes, because we're not actually linking the libraries.
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(TOP)/external/dbus \
+ $(TOP)/external/gtest/include
+LOCAL_SHARED_LIBRARIES := libchromeos-host libchrome-host
+LOCAL_STATIC_LIBRARIES := libexpat
+LOCAL_SRC_FILES := \
+ chromeos-dbus-bindings/adaptor_generator.cc \
+ chromeos-dbus-bindings/dbus_signature.cc \
+ chromeos-dbus-bindings/header_generator.cc \
+ chromeos-dbus-bindings/indented_text.cc \
+ chromeos-dbus-bindings/method_name_generator.cc \
+ chromeos-dbus-bindings/name_parser.cc \
+ chromeos-dbus-bindings/proxy_generator.cc \
+ chromeos-dbus-bindings/xml_interface_parser.cc
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := dbus-binding-generator
+LOCAL_CFLAGS := $(libdbusBindingGenCFlags)
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_C_INCLUDES := $(LOCAL_PATH) $(TOP)/external/gtest/include
+LOCAL_SHARED_LIBRARIES := libchromeos-host libchrome-host
+LOCAL_SRC_FILES := chromeos-dbus-bindings/generate_chromeos_dbus_bindings.cc
+LOCAL_STATIC_LIBRARIES := libdbus-binding-gen-host libexpat
+include $(BUILD_HOST_EXECUTABLE)
+
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := dbus-binding-generator-tests
+LOCAL_CFLAGS := $(libdbusBindingGenCFlags)
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH) \
+ $(TOP)/external/dbus
+LOCAL_SHARED_LIBRARIES := libchromeos-host libchrome-host
+LOCAL_STATIC_LIBRARIES := libdbus-binding-gen-host libgmock_host libexpat
+LOCAL_SRC_FILES := \
+ chromeos-dbus-bindings/adaptor_generator_unittest.cc \
+ chromeos-dbus-bindings/dbus_signature_unittest.cc \
+ chromeos-dbus-bindings/indented_text_unittest.cc \
+ chromeos-dbus-bindings/method_name_generator_unittest.cc \
+ chromeos-dbus-bindings/name_parser_unittest.cc \
+ chromeos-dbus-bindings/proxy_generator_mock_unittest.cc \
+ chromeos-dbus-bindings/proxy_generator_unittest.cc \
+ chromeos-dbus-bindings/test_utils.cc \
+ chromeos-dbus-bindings/testrunner.cc \
+ chromeos-dbus-bindings/xml_interface_parser_unittest.cc
+include $(BUILD_HOST_NATIVE_TEST)
+
+endif # ifeq ($(HOST_OS),linux)