blob: c2459398e6e0e819704f5023fff8055eed39a4e9 [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)/.. \
33 $(LOCAL_PATH)/dbus-proxies \
Peter Qiu786a9062015-10-02 11:45:01 -070034 external/cros/system_api \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070035 external/gtest/include \
36
37buffetSharedLibraries := \
Peter Qiu786a9062015-10-02 11:45:01 -070038 libapmanager-client \
Robert Gindacf92c662015-08-20 09:30:11 -070039 libavahi-common \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070040 libchrome \
41 libchrome-dbus \
42 libchromeos \
43 libchromeos-dbus \
44 libchromeos-http \
45 libchromeos-stream \
46 libdbus \
Peter Qiu786a9062015-10-02 11:45:01 -070047 libshill-client \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070048 libweave \
Alex Vakulenko1642bec2015-08-19 09:34:58 -070049 libwebserv \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070050
Alex Vakulenkodf381642015-10-08 07:34:23 -070051ifdef BRILLO
52
53buffetSharedLibraries += \
54 libkeymaster_messages \
55 libkeystore_binder \
56
57endif
58
Alex Vakulenkod78756d2015-08-11 12:32:02 -070059# buffet-common
60# ========================================================
61include $(CLEAR_VARS)
62LOCAL_MODULE := buffet-common
63LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
64LOCAL_CFLAGS := $(buffetCommonCFlags)
65LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
66LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
67LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
68LOCAL_STATIC_LIBRARIES :=
69LOCAL_RTTI_FLAG := -frtti
70LOCAL_CLANG := true
71LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
72
73LOCAL_SRC_FILES := \
Peter Qiu786a9062015-10-02 11:45:01 -070074 buffet/ap_manager_client.cc \
75 buffet/avahi_mdns_client.cc \
Alex Vakulenko0bc967f2015-08-18 11:22:07 -070076 buffet/buffet_config.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070077 buffet/dbus_command_dispatcher.cc \
78 buffet/dbus_command_proxy.cc \
79 buffet/dbus_conversion.cc \
80 buffet/dbus_constants.cc \
Peter Qiu786a9062015-10-02 11:45:01 -070081 buffet/flouride_socket_bluetooth_client.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070082 buffet/http_transport_client.cc \
83 buffet/manager.cc \
Peter Qiu786a9062015-10-02 11:45:01 -070084 buffet/shill_client.cc \
Alex Vakulenko0bc967f2015-08-18 11:22:07 -070085 buffet/socket_stream.cc \
Alex Vakulenko1642bec2015-08-19 09:34:58 -070086 buffet/webserv_client.cc \
Christopher Wileyc21ae072015-08-19 13:46:58 -070087 buffet/dbus_bindings/dbus-service-config.json \
Christopher Wiley892a5c42015-08-21 13:41:43 -070088 buffet/dbus_bindings/com.android.Weave.Command.dbus-xml \
89 buffet/dbus_bindings/com.android.Weave.Manager.dbus-xml \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070090
Alex Vakulenkodf381642015-10-08 07:34:23 -070091ifdef BRILLO
92LOCAL_SRC_FILES += buffet/keystore_encryptor.cc
93else
94LOCAL_SRC_FILES += buffet/fake_encryptor.cc
95endif
96
97
Alex Vakulenkod78756d2015-08-11 12:32:02 -070098include $(BUILD_STATIC_LIBRARY)
99
100# buffet
101# ========================================================
102include $(CLEAR_VARS)
103LOCAL_MODULE := weaved
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700104LOCAL_REQUIRED_MODULES := \
Robert Gindacf92c662015-08-20 09:30:11 -0700105 avahi-daemon \
Alex Vakulenko63bdf082015-08-21 09:27:12 -0700106 com.android.Weave.conf \
Alex Vakulenko1642bec2015-08-19 09:34:58 -0700107 webservd \
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700108
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700109LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
110LOCAL_CFLAGS := $(buffetCommonCFlags)
111LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
112LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
Jorge Lucangeli Obes87df55b2015-09-28 11:21:57 -0700113LOCAL_INIT_RC := weaved.rc
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700114LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
115LOCAL_WHOLE_STATIC_LIBRARIES := buffet-common
116LOCAL_CLANG := true
117LOCAL_RTTI_FLAG := -frtti
118
119LOCAL_SRC_FILES := \
120 buffet/main.cc
121
122include $(BUILD_EXECUTABLE)
123
Alex Vakulenkoee805c42015-08-20 10:37:49 -0700124# libweaved-client
125# ========================================================
126include $(CLEAR_VARS)
127LOCAL_MODULE := libweaved-client
128LOCAL_DBUS_PROXY_PREFIX := buffet
129
130LOCAL_SRC_FILES := \
131 buffet/dbus_bindings/dbus-service-config.json \
Christopher Wiley892a5c42015-08-21 13:41:43 -0700132 buffet/dbus_bindings/com.android.Weave.Command.dbus-xml \
133 buffet/dbus_bindings/com.android.Weave.Manager.dbus-xml \
Alex Vakulenkoee805c42015-08-20 10:37:49 -0700134
135include $(BUILD_SHARED_LIBRARY)
136
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700137# buffet_testrunner
138# ========================================================
139include $(CLEAR_VARS)
140LOCAL_MODULE := buffet_testrunner
141LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
142LOCAL_CFLAGS := $(buffetCommonCFlags)
143LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
144LOCAL_C_INCLUDES := \
145 $(buffetCommonCIncludes) \
146 external/gmock/include \
147
148LOCAL_SHARED_LIBRARIES := \
149 $(buffetSharedLibraries) \
150
151LOCAL_STATIC_LIBRARIES := \
152 buffet-common \
153 libchrome_dbus_test_helpers \
154 libchrome_test_helpers \
155 libchromeos-test-helpers \
156 libgtest \
157 libgmock \
158 libweave-test \
159
160LOCAL_RTTI_FLAG := -frtti
161LOCAL_CLANG := true
162
163LOCAL_SRC_FILES := \
Alex Vakulenkodf381642015-10-08 07:34:23 -0700164 buffet/buffet_config_unittest.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700165 buffet/buffet_testrunner.cc \
166 buffet/dbus_command_proxy_unittest.cc \
167 buffet/dbus_conversion_unittest.cc \
168
169include $(BUILD_NATIVE_TEST)
170
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700171# DBus config files for /etc/dbus-1
172# ========================================================
173include $(CLEAR_VARS)
Alex Vakulenko63bdf082015-08-21 09:27:12 -0700174LOCAL_MODULE := com.android.Weave.conf
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700175LOCAL_MODULE_CLASS := ETC
176LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/dbus-1
Alex Vakulenko63bdf082015-08-21 09:27:12 -0700177LOCAL_SRC_FILES := buffet/etc/dbus-1/com.android.Weave.conf
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700178include $(BUILD_PREBUILT)