blob: a54cd091264e2e689c62e86cb4be05ea6cdc6a7d [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
51# buffet-common
52# ========================================================
53include $(CLEAR_VARS)
54LOCAL_MODULE := buffet-common
55LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
56LOCAL_CFLAGS := $(buffetCommonCFlags)
57LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
58LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
59LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
60LOCAL_STATIC_LIBRARIES :=
61LOCAL_RTTI_FLAG := -frtti
62LOCAL_CLANG := true
63LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
64
65LOCAL_SRC_FILES := \
Peter Qiu786a9062015-10-02 11:45:01 -070066 buffet/ap_manager_client.cc \
67 buffet/avahi_mdns_client.cc \
Alex Vakulenko0bc967f2015-08-18 11:22:07 -070068 buffet/buffet_config.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070069 buffet/dbus_command_dispatcher.cc \
70 buffet/dbus_command_proxy.cc \
71 buffet/dbus_conversion.cc \
72 buffet/dbus_constants.cc \
Peter Qiu786a9062015-10-02 11:45:01 -070073 buffet/flouride_socket_bluetooth_client.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070074 buffet/http_transport_client.cc \
75 buffet/manager.cc \
Peter Qiu786a9062015-10-02 11:45:01 -070076 buffet/shill_client.cc \
Alex Vakulenko0bc967f2015-08-18 11:22:07 -070077 buffet/socket_stream.cc \
Alex Vakulenko1642bec2015-08-19 09:34:58 -070078 buffet/webserv_client.cc \
Christopher Wileyc21ae072015-08-19 13:46:58 -070079 buffet/dbus_bindings/dbus-service-config.json \
Christopher Wiley892a5c42015-08-21 13:41:43 -070080 buffet/dbus_bindings/com.android.Weave.Command.dbus-xml \
81 buffet/dbus_bindings/com.android.Weave.Manager.dbus-xml \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070082
Alex Vakulenkod78756d2015-08-11 12:32:02 -070083include $(BUILD_STATIC_LIBRARY)
84
85# buffet
86# ========================================================
87include $(CLEAR_VARS)
88LOCAL_MODULE := weaved
Alex Vakulenkof0f55342015-08-18 15:51:40 -070089LOCAL_REQUIRED_MODULES := \
Robert Gindacf92c662015-08-20 09:30:11 -070090 avahi-daemon \
Alex Vakulenko63bdf082015-08-21 09:27:12 -070091 com.android.Weave.conf \
Alex Vakulenko1642bec2015-08-19 09:34:58 -070092 webservd \
Alex Vakulenkof0f55342015-08-18 15:51:40 -070093
Alex Vakulenkod78756d2015-08-11 12:32:02 -070094LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
95LOCAL_CFLAGS := $(buffetCommonCFlags)
96LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
97LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
Jorge Lucangeli Obes87df55b2015-09-28 11:21:57 -070098LOCAL_INIT_RC := weaved.rc
Alex Vakulenkod78756d2015-08-11 12:32:02 -070099LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
100LOCAL_WHOLE_STATIC_LIBRARIES := buffet-common
101LOCAL_CLANG := true
102LOCAL_RTTI_FLAG := -frtti
103
104LOCAL_SRC_FILES := \
105 buffet/main.cc
106
107include $(BUILD_EXECUTABLE)
108
Alex Vakulenkoee805c42015-08-20 10:37:49 -0700109# libweaved-client
110# ========================================================
111include $(CLEAR_VARS)
112LOCAL_MODULE := libweaved-client
113LOCAL_DBUS_PROXY_PREFIX := buffet
114
115LOCAL_SRC_FILES := \
116 buffet/dbus_bindings/dbus-service-config.json \
Christopher Wiley892a5c42015-08-21 13:41:43 -0700117 buffet/dbus_bindings/com.android.Weave.Command.dbus-xml \
118 buffet/dbus_bindings/com.android.Weave.Manager.dbus-xml \
Alex Vakulenkoee805c42015-08-20 10:37:49 -0700119
120include $(BUILD_SHARED_LIBRARY)
121
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700122# buffet_testrunner
123# ========================================================
124include $(CLEAR_VARS)
125LOCAL_MODULE := buffet_testrunner
126LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
127LOCAL_CFLAGS := $(buffetCommonCFlags)
128LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
129LOCAL_C_INCLUDES := \
130 $(buffetCommonCIncludes) \
131 external/gmock/include \
132
133LOCAL_SHARED_LIBRARIES := \
134 $(buffetSharedLibraries) \
135
136LOCAL_STATIC_LIBRARIES := \
137 buffet-common \
138 libchrome_dbus_test_helpers \
139 libchrome_test_helpers \
140 libchromeos-test-helpers \
141 libgtest \
142 libgmock \
143 libweave-test \
144
145LOCAL_RTTI_FLAG := -frtti
146LOCAL_CLANG := true
147
148LOCAL_SRC_FILES := \
149 buffet/buffet_testrunner.cc \
150 buffet/dbus_command_proxy_unittest.cc \
151 buffet/dbus_conversion_unittest.cc \
152
153include $(BUILD_NATIVE_TEST)
154
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700155# DBus config files for /etc/dbus-1
156# ========================================================
157include $(CLEAR_VARS)
Alex Vakulenko63bdf082015-08-21 09:27:12 -0700158LOCAL_MODULE := com.android.Weave.conf
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700159LOCAL_MODULE_CLASS := ETC
160LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/dbus-1
Alex Vakulenko63bdf082015-08-21 09:27:12 -0700161LOCAL_SRC_FILES := buffet/etc/dbus-1/com.android.Weave.conf
Alex Vakulenkof0f55342015-08-18 15:51:40 -0700162include $(BUILD_PREBUILT)