blob: 3a59f7290fe7dc25c7c50b44b42cc3151fe1a12a [file] [log] [blame]
Alex Vakulenkod78756d2015-08-11 12:32:02 -07001# 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
15LOCAL_PATH := $(call my-dir)
16
Alex Vakulenkod78756d2015-08-11 12:32:02 -070017# Common variables
18# ========================================================
19
20buffetCommonCppExtension := .cc
Alex Vakulenkof0f55342015-08-18 15:51:40 -070021buffetCommonCFlags := -DBUFFET_USE_WIFI_BOOTSTRAPPING -Wall -Werror \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070022 -Wno-char-subscripts -Wno-missing-field-initializers \
Alex Vakulenkof0f55342015-08-18 15:51:40 -070023 -Wno-unused-function -Wno-unused-parameter \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070024
25buffetCommonCppFlags := \
26 -Wno-deprecated-register \
27 -Wno-sign-compare \
28 -Wno-sign-promo \
29 -Wno-non-virtual-dtor \
30
31buffetCommonCIncludes := \
32 $(LOCAL_PATH)/.. \
Peter Qiu786a9062015-10-02 11:45:01 -070033 external/cros/system_api \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070034 external/gtest/include \
35
36buffetSharedLibraries := \
Peter Qiu786a9062015-10-02 11:45:01 -070037 libapmanager-client \
Robert Gindacf92c662015-08-20 09:30:11 -070038 libavahi-common \
Casey Dahlin494b7242015-12-14 11:42:47 -080039 libavahi-client \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -080040 libbinder \
41 libbinderwrapper \
Alex Vakulenko2e32e932015-10-27 11:47:43 -070042 libbrillo \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -080043 libbrillo-binder \
Alex Vakulenko2e32e932015-10-27 11:47:43 -070044 libbrillo-dbus \
45 libbrillo-http \
46 libbrillo-stream \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070047 libchrome \
48 libchrome-dbus \
Alex Vakulenko790643f2015-11-19 14:38:30 -080049 libcutils \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070050 libdbus \
Alex Vakulenko0371fea2016-01-07 14:46:25 -080051 libnativepower \
Peter Qiu786a9062015-10-02 11:45:01 -070052 libshill-client \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -080053 libutils \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070054 libweave \
Alex Vakulenko1642bec2015-08-19 09:34:58 -070055 libwebserv \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070056
Alex Vakulenkodf381642015-10-08 07:34:23 -070057ifdef BRILLO
58
59buffetSharedLibraries += \
60 libkeymaster_messages \
61 libkeystore_binder \
62
63endif
64
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -080065# weave-common
66# Code shared between weaved daemon and libweaved client library
Alex Vakulenkod78756d2015-08-11 12:32:02 -070067# ========================================================
68include $(CLEAR_VARS)
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -080069LOCAL_MODULE := weave-common
70LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
71LOCAL_CFLAGS := $(buffetCommonCFlags)
72LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
73LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
74LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/brillo
75LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
76LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
77LOCAL_CLANG := true
78
79LOCAL_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 \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -080087
88include $(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# ========================================================
94include $(CLEAR_VARS)
95LOCAL_MODULE := weave-daemon-common
Alex Vakulenkod78756d2015-08-11 12:32:02 -070096LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
97LOCAL_CFLAGS := $(buffetCommonCFlags)
Alex Vakulenko14b3e6e2015-12-10 10:01:36 -080098# TODO(avakulenko): Remove -Wno-deprecated-declarations when legacy libweave
99# APIs are removed (see: b/25917708).
100LOCAL_CPPFLAGS := $(buffetCommonCppFlags) -Wno-deprecated-declarations
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700101LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
102LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800103LOCAL_STATIC_LIBRARIES := weave-common
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700104LOCAL_CLANG := true
105LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
106
107LOCAL_SRC_FILES := \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800108 brillo/weaved_system_properties.cc \
Peter Qiu786a9062015-10-02 11:45:01 -0700109 buffet/ap_manager_client.cc \
110 buffet/avahi_mdns_client.cc \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800111 buffet/binder_command_proxy.cc \
112 buffet/binder_weave_service.cc \
Alex Vakulenko0bc967f2015-08-18 11:22:07 -0700113 buffet/buffet_config.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700114 buffet/dbus_constants.cc \
Peter Qiu786a9062015-10-02 11:45:01 -0700115 buffet/flouride_socket_bluetooth_client.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700116 buffet/http_transport_client.cc \
117 buffet/manager.cc \
Peter Qiu786a9062015-10-02 11:45:01 -0700118 buffet/shill_client.cc \
Alex Vakulenko0bc967f2015-08-18 11:22:07 -0700119 buffet/socket_stream.cc \
Alex Vakulenko1642bec2015-08-19 09:34:58 -0700120 buffet/webserv_client.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700121
Darren Krahn31196852015-10-19 20:24:56 +0000122ifdef BRILLO
123LOCAL_SRC_FILES += buffet/keystore_encryptor.cc
124else
Alex Vakulenkodf381642015-10-08 07:34:23 -0700125LOCAL_SRC_FILES += buffet/fake_encryptor.cc
Darren Krahn31196852015-10-19 20:24:56 +0000126endif
Alex Vakulenkodf381642015-10-08 07:34:23 -0700127
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700128include $(BUILD_STATIC_LIBRARY)
129
Alex Vakulenkoabbcdea2015-10-09 19:33:15 -0700130# weaved
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800131# The main binary of the weave daemon.
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700132# ========================================================
133include $(CLEAR_VARS)
134LOCAL_MODULE := weaved
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700135LOCAL_REQUIRED_MODULES := \
Robert Gindacf92c662015-08-20 09:30:11 -0700136 avahi-daemon \
Alex Vakulenkoabbcdea2015-10-09 19:33:15 -0700137 libweaved \
Alex Vakulenko1642bec2015-08-19 09:34:58 -0700138 webservd \
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700139
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700140LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
141LOCAL_CFLAGS := $(buffetCommonCFlags)
142LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
143LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
Jorge Lucangeli Obes87df55b2015-09-28 11:21:57 -0700144LOCAL_INIT_RC := weaved.rc
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700145LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800146LOCAL_STATIC_LIBRARIES := weave-common \
147
148LOCAL_WHOLE_STATIC_LIBRARIES := weave-daemon-common
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700149LOCAL_CLANG := true
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700150
151LOCAL_SRC_FILES := \
152 buffet/main.cc
153
154include $(BUILD_EXECUTABLE)
155
Alex Vakulenkoabbcdea2015-10-09 19:33:15 -0700156# libweaved
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800157# The client library for the weave daemon. You should link to libweaved,
158# if you need to communicate with weaved.
Alex Vakulenkoabbcdea2015-10-09 19:33:15 -0700159# ========================================================
160include $(CLEAR_VARS)
161LOCAL_MODULE := libweaved
162LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
163LOCAL_CFLAGS := $(buffetCommonCFlags)
164LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
165LOCAL_C_INCLUDES := external/gtest/include
166LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
Alex Vakulenkoe9a83852016-01-28 14:34:04 -0800167LOCAL_SHARED_LIBRARIES := \
168 libbinder \
169 libbinderwrapper \
170 libbrillo \
171 libchrome \
172 libutils \
173
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800174LOCAL_STATIC_LIBRARIES := weave-common
Alex Vakulenkoabbcdea2015-10-09 19:33:15 -0700175
Alex Vakulenkoabbcdea2015-10-09 19:33:15 -0700176LOCAL_CLANG := true
177
178LOCAL_SRC_FILES := \
179 libweaved/command.cc \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800180 libweaved/service.cc \
Alex Vakulenkoabbcdea2015-10-09 19:33:15 -0700181
182include $(BUILD_SHARED_LIBRARY)
183
Alex Vakulenko8a808bc2015-11-12 15:50:11 -0800184# weaved_test
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700185# ========================================================
186include $(CLEAR_VARS)
Alex Vakulenko8a808bc2015-11-12 15:50:11 -0800187LOCAL_MODULE := weaved_test
Jorge Lucangeli Obes4e4f70b2016-02-04 14:13:53 -0800188LOCAL_MODULE_TAGS := eng
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700189LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
190LOCAL_CFLAGS := $(buffetCommonCFlags)
191LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
192LOCAL_C_INCLUDES := \
193 $(buffetCommonCIncludes) \
194 external/gmock/include \
195
196LOCAL_SHARED_LIBRARIES := \
197 $(buffetSharedLibraries) \
198
199LOCAL_STATIC_LIBRARIES := \
Alex Vakulenko2e32e932015-10-27 11:47:43 -0700200 libbrillo-test-helpers \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700201 libchrome_test_helpers \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700202 libgtest \
203 libgmock \
204 libweave-test \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800205 weave-daemon-common \
206 weave-common \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700207
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700208LOCAL_CLANG := true
209
210LOCAL_SRC_FILES := \
Alex Vakulenkoae29f7d2015-12-21 16:30:37 -0800211 buffet/binder_command_proxy_unittest.cc \
Alex Vakulenkodf381642015-10-08 07:34:23 -0700212 buffet/buffet_config_unittest.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700213 buffet/buffet_testrunner.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700214
215include $(BUILD_NATIVE_TEST)