blob: 861f51025c982de7af8dad0b5948cab7c37cac12 [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
17# TODO(avakulenko): Remove this condition when libchromeos can be built on
18# non-Linux host.
19ifeq ($(HOST_OS),linux)
20
21# Common variables
22# ========================================================
23
24buffetCommonCppExtension := .cc
25buffetCommonCFlags := -D__BRILLO__ -Wall -Werror \
26 -Wno-char-subscripts -Wno-missing-field-initializers \
27 -Wno-unused-function -Wno-unused-parameter
28
29buffetCommonCppFlags := \
30 -Wno-deprecated-register \
31 -Wno-sign-compare \
32 -Wno-sign-promo \
33 -Wno-non-virtual-dtor \
34
35buffetCommonCIncludes := \
36 $(LOCAL_PATH)/.. \
37 $(LOCAL_PATH)/dbus-proxies \
38 external/gtest/include \
39
40buffetSharedLibraries := \
41 libchrome \
42 libchrome-dbus \
43 libchromeos \
44 libchromeos-dbus \
45 libchromeos-http \
46 libchromeos-stream \
47 libdbus \
48 libweave \
49
50# buffet-common
51# ========================================================
52include $(CLEAR_VARS)
53LOCAL_MODULE := buffet-common
54LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
55LOCAL_CFLAGS := $(buffetCommonCFlags)
56LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
57LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
58LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
59LOCAL_STATIC_LIBRARIES :=
60LOCAL_RTTI_FLAG := -frtti
61LOCAL_CLANG := true
62LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
63
64LOCAL_SRC_FILES := \
Alex Vakulenko0bc967f2015-08-18 11:22:07 -070065 buffet/buffet_config.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070066 buffet/dbus_command_dispatcher.cc \
67 buffet/dbus_command_proxy.cc \
68 buffet/dbus_conversion.cc \
69 buffet/dbus_constants.cc \
70 buffet/http_transport_client.cc \
71 buffet/manager.cc \
Alex Vakulenko0bc967f2015-08-18 11:22:07 -070072 buffet/socket_stream.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070073
74# buffet/dbus_bindings/org.chromium.Buffet.Command.xml \
75# buffet/dbus_bindings/org.chromium.Buffet.Manager.xml \
76# buffet/ap_manager_client.cc \
77# buffet/peerd_client.cc \
Alex Vakulenko8473fb72015-08-18 00:55:40 +000078# buffet/shill_client.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070079# buffet/webserv_client.cc \
80
81include $(BUILD_STATIC_LIBRARY)
82
83# buffet
84# ========================================================
85include $(CLEAR_VARS)
86LOCAL_MODULE := weaved
Alex Vakulenko8473fb72015-08-18 00:55:40 +000087LOCAL_REQUIRED_MODULES := init.weaved.rc
Alex Vakulenkod78756d2015-08-11 12:32:02 -070088LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
89LOCAL_CFLAGS := $(buffetCommonCFlags)
90LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
91LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
92LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
93LOCAL_WHOLE_STATIC_LIBRARIES := buffet-common
94LOCAL_CLANG := true
95LOCAL_RTTI_FLAG := -frtti
96
97LOCAL_SRC_FILES := \
98 buffet/main.cc
99
100include $(BUILD_EXECUTABLE)
101
Gilad Arnoldc1b676c2015-08-18 10:30:48 -0700102ifdef INITRC_TEMPLATE
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700103include $(CLEAR_VARS)
104LOCAL_MODULE := init.weaved.rc
105LOCAL_MODULE_CLASS := ETC
106LOCAL_MODULE_PATH := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_INITRCD)
107
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700108include $(BUILD_SYSTEM)/base_rules.mk
109
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700110$(LOCAL_BUILT_MODULE): $(INITRC_TEMPLATE)
Alex Vakulenko0bc967f2015-08-18 11:22:07 -0700111 $(call generate-initrc-file,weaved,,)
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700112endif
113
114# buffet_testrunner
115# ========================================================
116include $(CLEAR_VARS)
117LOCAL_MODULE := buffet_testrunner
118LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
119LOCAL_CFLAGS := $(buffetCommonCFlags)
120LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
121LOCAL_C_INCLUDES := \
122 $(buffetCommonCIncludes) \
123 external/gmock/include \
124
125LOCAL_SHARED_LIBRARIES := \
126 $(buffetSharedLibraries) \
127
128LOCAL_STATIC_LIBRARIES := \
129 buffet-common \
130 libchrome_dbus_test_helpers \
131 libchrome_test_helpers \
132 libchromeos-test-helpers \
133 libgtest \
134 libgmock \
135 libweave-test \
136
137LOCAL_RTTI_FLAG := -frtti
138LOCAL_CLANG := true
139
140LOCAL_SRC_FILES := \
141 buffet/buffet_testrunner.cc \
142 buffet/dbus_command_proxy_unittest.cc \
143 buffet/dbus_conversion_unittest.cc \
144
145include $(BUILD_NATIVE_TEST)
146
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700147endif # HOST_OS == linux