blob: f5b7b4adf5e1ca3de46df682f2e3e20604520920 [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 := \
65 buffet/dbus_command_dispatcher.cc \
66 buffet/dbus_command_proxy.cc \
67 buffet/dbus_conversion.cc \
68 buffet/dbus_constants.cc \
69 buffet/http_transport_client.cc \
70 buffet/manager.cc \
71
72# buffet/dbus_bindings/org.chromium.Buffet.Command.xml \
73# buffet/dbus_bindings/org.chromium.Buffet.Manager.xml \
74# buffet/ap_manager_client.cc \
75# buffet/peerd_client.cc \
Alex Vakulenko8473fb72015-08-18 00:55:40 +000076# buffet/shill_client.cc \
Alex Vakulenkod78756d2015-08-11 12:32:02 -070077# buffet/webserv_client.cc \
78
79include $(BUILD_STATIC_LIBRARY)
80
81# buffet
82# ========================================================
83include $(CLEAR_VARS)
84LOCAL_MODULE := weaved
Alex Vakulenko8473fb72015-08-18 00:55:40 +000085LOCAL_REQUIRED_MODULES := init.weaved.rc
Alex Vakulenkod78756d2015-08-11 12:32:02 -070086LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
87LOCAL_CFLAGS := $(buffetCommonCFlags)
88LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
89LOCAL_C_INCLUDES := $(buffetCommonCIncludes)
90LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries)
91LOCAL_WHOLE_STATIC_LIBRARIES := buffet-common
92LOCAL_CLANG := true
93LOCAL_RTTI_FLAG := -frtti
94
95LOCAL_SRC_FILES := \
96 buffet/main.cc
97
98include $(BUILD_EXECUTABLE)
99
Gilad Arnoldc1b676c2015-08-18 10:30:48 -0700100ifdef INITRC_TEMPLATE
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700101include $(CLEAR_VARS)
102LOCAL_MODULE := init.weaved.rc
103LOCAL_MODULE_CLASS := ETC
104LOCAL_MODULE_PATH := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_INITRCD)
105
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700106include $(BUILD_SYSTEM)/base_rules.mk
107
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700108$(LOCAL_BUILT_MODULE): $(INITRC_TEMPLATE)
Gilad Arnoldc1b676c2015-08-18 10:30:48 -0700109 $(call generate-initrc-file,weaved)
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700110endif
111
112# buffet_testrunner
113# ========================================================
114include $(CLEAR_VARS)
115LOCAL_MODULE := buffet_testrunner
116LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
117LOCAL_CFLAGS := $(buffetCommonCFlags)
118LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
119LOCAL_C_INCLUDES := \
120 $(buffetCommonCIncludes) \
121 external/gmock/include \
122
123LOCAL_SHARED_LIBRARIES := \
124 $(buffetSharedLibraries) \
125
126LOCAL_STATIC_LIBRARIES := \
127 buffet-common \
128 libchrome_dbus_test_helpers \
129 libchrome_test_helpers \
130 libchromeos-test-helpers \
131 libgtest \
132 libgmock \
133 libweave-test \
134
135LOCAL_RTTI_FLAG := -frtti
136LOCAL_CLANG := true
137
138LOCAL_SRC_FILES := \
139 buffet/buffet_testrunner.cc \
140 buffet/dbus_command_proxy_unittest.cc \
141 buffet/dbus_conversion_unittest.cc \
142
143include $(BUILD_NATIVE_TEST)
144
Alex Vakulenkod78756d2015-08-11 12:32:02 -0700145endif # HOST_OS == linux