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)/.. \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 33 | external/cros/system_api \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 34 | external/gtest/include \ |
| 35 | |
| 36 | buffetSharedLibraries := \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 37 | libapmanager-client \ |
Robert Ginda | cf92c66 | 2015-08-20 09:30:11 -0700 | [diff] [blame] | 38 | libavahi-common \ |
Casey Dahlin | 494b724 | 2015-12-14 11:42:47 -0800 | [diff] [blame] | 39 | libavahi-client \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 40 | libbinder \ |
| 41 | libbinderwrapper \ |
Alex Vakulenko | 2e32e93 | 2015-10-27 11:47:43 -0700 | [diff] [blame] | 42 | libbrillo \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 43 | libbrillo-binder \ |
Alex Vakulenko | 2e32e93 | 2015-10-27 11:47:43 -0700 | [diff] [blame] | 44 | libbrillo-dbus \ |
| 45 | libbrillo-http \ |
| 46 | libbrillo-stream \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 47 | libchrome \ |
| 48 | libchrome-dbus \ |
Alex Vakulenko | 790643f | 2015-11-19 14:38:30 -0800 | [diff] [blame] | 49 | libcutils \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 50 | libdbus \ |
Alex Vakulenko | 0371fea | 2016-01-07 14:46:25 -0800 | [diff] [blame] | 51 | libnativepower \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 52 | libshill-client \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 53 | libutils \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 54 | libweave \ |
Alex Vakulenko | 1642bec | 2015-08-19 09:34:58 -0700 | [diff] [blame] | 55 | libwebserv \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 56 | |
Alex Vakulenko | df38164 | 2015-10-08 07:34:23 -0700 | [diff] [blame] | 57 | ifdef BRILLO |
| 58 | |
| 59 | buffetSharedLibraries += \ |
| 60 | libkeymaster_messages \ |
| 61 | libkeystore_binder \ |
| 62 | |
| 63 | endif |
| 64 | |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 65 | # weave-common |
| 66 | # Code shared between weaved daemon and libweaved client library |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 67 | # ======================================================== |
| 68 | include $(CLEAR_VARS) |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 69 | LOCAL_MODULE := weave-common |
| 70 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 71 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 72 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 73 | LOCAL_C_INCLUDES := $(buffetCommonCIncludes) |
| 74 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/brillo |
| 75 | LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries) |
| 76 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 77 | LOCAL_CLANG := true |
| 78 | |
| 79 | LOCAL_SRC_FILES := \ |
| 80 | brillo/android/weave/IWeaveClient.aidl \ |
| 81 | brillo/android/weave/IWeaveCommand.aidl \ |
| 82 | brillo/android/weave/IWeaveService.aidl \ |
| 83 | brillo/android/weave/IWeaveServiceManager.aidl \ |
| 84 | brillo/android/weave/IWeaveServiceManagerNotificationListener.aidl \ |
| 85 | common/binder_constants.cc \ |
| 86 | common/binder_utils.cc \ |
| 87 | common/data_conversion.cc \ |
| 88 | |
| 89 | include $(BUILD_STATIC_LIBRARY) |
| 90 | |
| 91 | # weave-daemon-common |
| 92 | # Code shared between weaved daemon and unit test runner. |
| 93 | # This is essentially the implementation of weaved in a static library format. |
| 94 | # ======================================================== |
| 95 | include $(CLEAR_VARS) |
| 96 | LOCAL_MODULE := weave-daemon-common |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 97 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 98 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
Alex Vakulenko | 14b3e6e | 2015-12-10 10:01:36 -0800 | [diff] [blame] | 99 | # TODO(avakulenko): Remove -Wno-deprecated-declarations when legacy libweave |
| 100 | # APIs are removed (see: b/25917708). |
| 101 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) -Wno-deprecated-declarations |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 102 | LOCAL_C_INCLUDES := $(buffetCommonCIncludes) |
| 103 | LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries) |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 104 | LOCAL_STATIC_LIBRARIES := weave-common |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 105 | LOCAL_CLANG := true |
| 106 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 107 | |
| 108 | LOCAL_SRC_FILES := \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 109 | brillo/weaved_system_properties.cc \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 110 | buffet/ap_manager_client.cc \ |
| 111 | buffet/avahi_mdns_client.cc \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 112 | buffet/binder_command_proxy.cc \ |
| 113 | buffet/binder_weave_service.cc \ |
Alex Vakulenko | 0bc967f | 2015-08-18 11:22:07 -0700 | [diff] [blame] | 114 | buffet/buffet_config.cc \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 115 | buffet/dbus_constants.cc \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 116 | buffet/flouride_socket_bluetooth_client.cc \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 117 | buffet/http_transport_client.cc \ |
| 118 | buffet/manager.cc \ |
Peter Qiu | 786a906 | 2015-10-02 11:45:01 -0700 | [diff] [blame] | 119 | buffet/shill_client.cc \ |
Alex Vakulenko | 0bc967f | 2015-08-18 11:22:07 -0700 | [diff] [blame] | 120 | buffet/socket_stream.cc \ |
Alex Vakulenko | 1642bec | 2015-08-19 09:34:58 -0700 | [diff] [blame] | 121 | buffet/webserv_client.cc \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 122 | |
Darren Krahn | 3119685 | 2015-10-19 20:24:56 +0000 | [diff] [blame] | 123 | ifdef BRILLO |
| 124 | LOCAL_SRC_FILES += buffet/keystore_encryptor.cc |
| 125 | else |
Alex Vakulenko | df38164 | 2015-10-08 07:34:23 -0700 | [diff] [blame] | 126 | LOCAL_SRC_FILES += buffet/fake_encryptor.cc |
Darren Krahn | 3119685 | 2015-10-19 20:24:56 +0000 | [diff] [blame] | 127 | endif |
Alex Vakulenko | df38164 | 2015-10-08 07:34:23 -0700 | [diff] [blame] | 128 | |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 129 | include $(BUILD_STATIC_LIBRARY) |
| 130 | |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 131 | # weaved |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 132 | # The main binary of the weave daemon. |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 133 | # ======================================================== |
| 134 | include $(CLEAR_VARS) |
| 135 | LOCAL_MODULE := weaved |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 136 | LOCAL_REQUIRED_MODULES := \ |
Robert Ginda | cf92c66 | 2015-08-20 09:30:11 -0700 | [diff] [blame] | 137 | avahi-daemon \ |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 138 | libweaved \ |
Alex Vakulenko | 1642bec | 2015-08-19 09:34:58 -0700 | [diff] [blame] | 139 | webservd \ |
Alex Vakulenko | f0f5534 | 2015-08-18 15:51:40 -0700 | [diff] [blame] | 140 | |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 141 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 142 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 143 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 144 | LOCAL_C_INCLUDES := $(buffetCommonCIncludes) |
Jorge Lucangeli Obes | 87df55b | 2015-09-28 11:21:57 -0700 | [diff] [blame] | 145 | LOCAL_INIT_RC := weaved.rc |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 146 | LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries) |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 147 | LOCAL_STATIC_LIBRARIES := weave-common \ |
| 148 | |
| 149 | LOCAL_WHOLE_STATIC_LIBRARIES := weave-daemon-common |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 150 | LOCAL_CLANG := true |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 151 | |
| 152 | LOCAL_SRC_FILES := \ |
| 153 | buffet/main.cc |
| 154 | |
| 155 | include $(BUILD_EXECUTABLE) |
| 156 | |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 157 | # libweaved |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 158 | # The client library for the weave daemon. You should link to libweaved, |
| 159 | # if you need to communicate with weaved. |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 160 | # ======================================================== |
| 161 | include $(CLEAR_VARS) |
| 162 | LOCAL_MODULE := libweaved |
| 163 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 164 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 165 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 166 | LOCAL_C_INCLUDES := external/gtest/include |
| 167 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 168 | LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries) |
| 169 | LOCAL_STATIC_LIBRARIES := weave-common |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 170 | |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 171 | LOCAL_CLANG := true |
| 172 | |
| 173 | LOCAL_SRC_FILES := \ |
| 174 | libweaved/command.cc \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 175 | libweaved/service.cc \ |
Alex Vakulenko | abbcdea | 2015-10-09 19:33:15 -0700 | [diff] [blame] | 176 | |
| 177 | include $(BUILD_SHARED_LIBRARY) |
| 178 | |
Alex Vakulenko | 8a808bc | 2015-11-12 15:50:11 -0800 | [diff] [blame] | 179 | # weaved_test |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 180 | # ======================================================== |
| 181 | include $(CLEAR_VARS) |
Alex Vakulenko | 8a808bc | 2015-11-12 15:50:11 -0800 | [diff] [blame] | 182 | LOCAL_MODULE := weaved_test |
| 183 | LOCAL_MODULE_TAGS := debug |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 184 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 185 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 186 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 187 | LOCAL_C_INCLUDES := \ |
| 188 | $(buffetCommonCIncludes) \ |
| 189 | external/gmock/include \ |
| 190 | |
| 191 | LOCAL_SHARED_LIBRARIES := \ |
| 192 | $(buffetSharedLibraries) \ |
| 193 | |
| 194 | LOCAL_STATIC_LIBRARIES := \ |
Alex Vakulenko | 2e32e93 | 2015-10-27 11:47:43 -0700 | [diff] [blame] | 195 | libbrillo-test-helpers \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 196 | libchrome_test_helpers \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 197 | libgtest \ |
| 198 | libgmock \ |
| 199 | libweave-test \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 200 | weave-daemon-common \ |
| 201 | weave-common \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 202 | |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 203 | LOCAL_CLANG := true |
| 204 | |
| 205 | LOCAL_SRC_FILES := \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 206 | buffet/binder_command_proxy_unittest.cc \ |
Alex Vakulenko | df38164 | 2015-10-08 07:34:23 -0700 | [diff] [blame] | 207 | buffet/buffet_config_unittest.cc \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 208 | buffet/buffet_testrunner.cc \ |
Alex Vakulenko | ae29f7d | 2015-12-21 16:30:37 -0800 | [diff] [blame] | 209 | common/data_conversion_unittest.cc \ |
Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 210 | |
| 211 | include $(BUILD_NATIVE_TEST) |