Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 1 | # Copyright (C) 2015 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 17 | # Common variables |
| 18 | # ======================================================== |
| 19 | |
| 20 | buffetCommonCppExtension := .cc |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 21 | buffetCommonCFlags := -DBUFFET_USE_WIFI_BOOTSTRAPPING -Wall -Werror \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 22 | -Wno-char-subscripts -Wno-missing-field-initializers \ |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 23 | -Wno-unused-function -Wno-unused-parameter \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 24 | |
| 25 | buffetCommonCppFlags := \ |
| 26 | -Wno-deprecated-register \ |
| 27 | -Wno-sign-compare \ |
| 28 | -Wno-sign-promo \ |
| 29 | -Wno-non-virtual-dtor \ |
| 30 | |
| 31 | buffetCommonCIncludes := \ |
| 32 | $(LOCAL_PATH)/.. \ |
| 33 | $(LOCAL_PATH)/dbus-proxies \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 34 | external/cros/system_api \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 35 | external/gtest/include \ |
| 36 | |
| 37 | buffetSharedLibraries := \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 38 | libapmanager-client \ |
Robert Ginda | cf92c66 | 2015-08-20 09:30:11 -0700 | [diff] [blame] | 39 | libavahi-common \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 40 | libchrome \ |
| 41 | libchrome-dbus \ |
| 42 | libchromeos \ |
| 43 | libchromeos-dbus \ |
| 44 | libchromeos-http \ |
| 45 | libchromeos-stream \ |
| 46 | libdbus \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 47 | libshill-client \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 48 | libweave \ |
Alex Vakulenko | 1642bec | 2015-08-19 09:34:58 -0700 | [diff] [blame] | 49 | libwebserv \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 50 | |
Alex Vakulenko | df38164 | 2015-10-08 07:34:23 -0700 | [diff] [blame] | 51 | ifdef BRILLO |
| 52 | |
| 53 | buffetSharedLibraries += \ |
| 54 | libkeymaster_messages \ |
| 55 | libkeystore_binder \ |
| 56 | |
| 57 | endif |
| 58 | |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 59 | # buffet-common |
| 60 | # ======================================================== |
| 61 | include $(CLEAR_VARS) |
| 62 | LOCAL_MODULE := buffet-common |
| 63 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 64 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 65 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 66 | LOCAL_C_INCLUDES := $(buffetCommonCIncludes) |
| 67 | LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries) |
| 68 | LOCAL_STATIC_LIBRARIES := |
| 69 | LOCAL_RTTI_FLAG := -frtti |
| 70 | LOCAL_CLANG := true |
| 71 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 72 | |
| 73 | LOCAL_SRC_FILES := \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 74 | buffet/ap_manager_client.cc \ |
| 75 | buffet/avahi_mdns_client.cc \ |
Alex Vakulenko | 0bc967f | 2015-08-18 11:22:07 -0700 | [diff] [blame] | 76 | buffet/buffet_config.cc \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 77 | buffet/dbus_command_dispatcher.cc \ |
| 78 | buffet/dbus_command_proxy.cc \ |
| 79 | buffet/dbus_conversion.cc \ |
| 80 | buffet/dbus_constants.cc \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 81 | buffet/flouride_socket_bluetooth_client.cc \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 82 | buffet/http_transport_client.cc \ |
| 83 | buffet/manager.cc \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 84 | buffet/shill_client.cc \ |
Alex Vakulenko | 0bc967f | 2015-08-18 11:22:07 -0700 | [diff] [blame] | 85 | buffet/socket_stream.cc \ |
Alex Vakulenko | 1642bec | 2015-08-19 09:34:58 -0700 | [diff] [blame] | 86 | buffet/webserv_client.cc \ |
Christopher Wiley | c21ae07 | 2015-08-19 13:46:58 -0700 | [diff] [blame] | 87 | buffet/dbus_bindings/dbus-service-config.json \ |
Christopher Wiley | 892a5c4 | 2015-08-21 13:41:43 -0700 | [diff] [blame] | 88 | buffet/dbus_bindings/com.android.Weave.Command.dbus-xml \ |
| 89 | buffet/dbus_bindings/com.android.Weave.Manager.dbus-xml \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 90 | |
Alex Vakulenko | df38164 | 2015-10-08 07:34:23 -0700 | [diff] [blame] | 91 | ifdef BRILLO |
| 92 | LOCAL_SRC_FILES += buffet/keystore_encryptor.cc |
| 93 | else |
| 94 | LOCAL_SRC_FILES += buffet/fake_encryptor.cc |
| 95 | endif |
| 96 | |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 97 | include $(BUILD_STATIC_LIBRARY) |
| 98 | |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 99 | # weaved |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 100 | # ======================================================== |
| 101 | include $(CLEAR_VARS) |
| 102 | LOCAL_MODULE := weaved |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 103 | LOCAL_REQUIRED_MODULES := \ |
Robert Ginda | cf92c66 | 2015-08-20 09:30:11 -0700 | [diff] [blame] | 104 | avahi-daemon \ |
Alex Vakulenko | 63bdf08 | 2015-08-21 09:27:12 -0700 | [diff] [blame] | 105 | com.android.Weave.conf \ |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 106 | libweaved \ |
Alex Vakulenko | 1642bec | 2015-08-19 09:34:58 -0700 | [diff] [blame] | 107 | webservd \ |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 108 | |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 109 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 110 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 111 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 112 | LOCAL_C_INCLUDES := $(buffetCommonCIncludes) |
Jorge Lucangeli Obes | 87df55b | 2015-09-28 11:21:57 -0700 | [diff] [blame] | 113 | LOCAL_INIT_RC := weaved.rc |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 114 | LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries) |
| 115 | LOCAL_WHOLE_STATIC_LIBRARIES := buffet-common |
| 116 | LOCAL_CLANG := true |
| 117 | LOCAL_RTTI_FLAG := -frtti |
| 118 | |
| 119 | LOCAL_SRC_FILES := \ |
| 120 | buffet/main.cc |
| 121 | |
| 122 | include $(BUILD_EXECUTABLE) |
| 123 | |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 124 | # libweaved-internal |
Alex Vakulenko | ee805c4 | 2015-08-20 10:37:49 -0700 | [diff] [blame] | 125 | # ======================================================== |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 126 | # You do not want to depend on this. Depend on libweaved instead. |
| 127 | # libweaved abstracts and helps you consume this interface. |
Alex Vakulenko | ee805c4 | 2015-08-20 10:37:49 -0700 | [diff] [blame] | 128 | include $(CLEAR_VARS) |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 129 | LOCAL_MODULE := libweaved-internal |
Alex Vakulenko | ee805c4 | 2015-08-20 10:37:49 -0700 | [diff] [blame] | 130 | LOCAL_DBUS_PROXY_PREFIX := buffet |
| 131 | |
| 132 | LOCAL_SRC_FILES := \ |
| 133 | buffet/dbus_bindings/dbus-service-config.json \ |
Christopher Wiley | 892a5c4 | 2015-08-21 13:41:43 -0700 | [diff] [blame] | 134 | buffet/dbus_bindings/com.android.Weave.Command.dbus-xml \ |
| 135 | buffet/dbus_bindings/com.android.Weave.Manager.dbus-xml \ |
Alex Vakulenko | ee805c4 | 2015-08-20 10:37:49 -0700 | [diff] [blame] | 136 | |
| 137 | include $(BUILD_SHARED_LIBRARY) |
| 138 | |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 139 | # libweaved |
| 140 | # ======================================================== |
| 141 | include $(CLEAR_VARS) |
| 142 | LOCAL_MODULE := libweaved |
| 143 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 144 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 145 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 146 | LOCAL_C_INCLUDES := external/gtest/include |
| 147 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 148 | LOCAL_SHARED_LIBRARIES := \ |
| 149 | $(buffetSharedLibraries) \ |
| 150 | libweaved-internal \ |
| 151 | |
| 152 | LOCAL_STATIC_LIBRARIES := |
| 153 | LOCAL_RTTI_FLAG := -frtti |
| 154 | LOCAL_CLANG := true |
| 155 | |
| 156 | LOCAL_SRC_FILES := \ |
| 157 | libweaved/command.cc \ |
| 158 | libweaved/device.cc \ |
| 159 | |
| 160 | include $(BUILD_SHARED_LIBRARY) |
| 161 | |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 162 | # buffet_testrunner |
| 163 | # ======================================================== |
| 164 | include $(CLEAR_VARS) |
| 165 | LOCAL_MODULE := buffet_testrunner |
| 166 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 167 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 168 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 169 | LOCAL_C_INCLUDES := \ |
| 170 | $(buffetCommonCIncludes) \ |
| 171 | external/gmock/include \ |
| 172 | |
| 173 | LOCAL_SHARED_LIBRARIES := \ |
| 174 | $(buffetSharedLibraries) \ |
| 175 | |
| 176 | LOCAL_STATIC_LIBRARIES := \ |
| 177 | buffet-common \ |
| 178 | libchrome_dbus_test_helpers \ |
| 179 | libchrome_test_helpers \ |
| 180 | libchromeos-test-helpers \ |
| 181 | libgtest \ |
| 182 | libgmock \ |
| 183 | libweave-test \ |
| 184 | |
| 185 | LOCAL_RTTI_FLAG := -frtti |
| 186 | LOCAL_CLANG := true |
| 187 | |
| 188 | LOCAL_SRC_FILES := \ |
Alex Vakulenko | df38164 | 2015-10-08 07:34:23 -0700 | [diff] [blame] | 189 | buffet/buffet_config_unittest.cc \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 190 | buffet/buffet_testrunner.cc \ |
| 191 | buffet/dbus_command_proxy_unittest.cc \ |
| 192 | buffet/dbus_conversion_unittest.cc \ |
| 193 | |
| 194 | include $(BUILD_NATIVE_TEST) |
| 195 | |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 196 | # DBus config files for /etc/dbus-1 |
| 197 | # ======================================================== |
| 198 | include $(CLEAR_VARS) |
Alex Vakulenko | 63bdf08 | 2015-08-21 09:27:12 -0700 | [diff] [blame] | 199 | LOCAL_MODULE := com.android.Weave.conf |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 200 | LOCAL_MODULE_CLASS := ETC |
| 201 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/dbus-1 |
Alex Vakulenko | 63bdf08 | 2015-08-21 09:27:12 -0700 | [diff] [blame] | 202 | LOCAL_SRC_FILES := buffet/etc/dbus-1/com.android.Weave.conf |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 203 | include $(BUILD_PREBUILT) |