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