| Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 1 | # 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 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
| 17 | # TODO(avakulenko): Remove this condition when libchromeos can be built on |
| 18 | # non-Linux host. |
| 19 | ifeq ($(HOST_OS),linux) |
| 20 | |
| 21 | # Common variables |
| 22 | # ======================================================== |
| 23 | |
| 24 | buffetCommonCppExtension := .cc |
| 25 | buffetCommonCFlags := -D__BRILLO__ -Wall -Werror \ |
| 26 | -Wno-char-subscripts -Wno-missing-field-initializers \ |
| 27 | -Wno-unused-function -Wno-unused-parameter |
| 28 | |
| 29 | buffetCommonCppFlags := \ |
| 30 | -Wno-deprecated-register \ |
| 31 | -Wno-sign-compare \ |
| 32 | -Wno-sign-promo \ |
| 33 | -Wno-non-virtual-dtor \ |
| 34 | |
| 35 | buffetCommonCIncludes := \ |
| 36 | $(LOCAL_PATH)/.. \ |
| 37 | $(LOCAL_PATH)/dbus-proxies \ |
| 38 | external/gtest/include \ |
| 39 | |
| 40 | buffetSharedLibraries := \ |
| 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 | # ======================================================== |
| 52 | include $(CLEAR_VARS) |
| 53 | LOCAL_MODULE := buffet-common |
| 54 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 55 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 56 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 57 | LOCAL_C_INCLUDES := $(buffetCommonCIncludes) |
| 58 | LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries) |
| 59 | LOCAL_STATIC_LIBRARIES := |
| 60 | LOCAL_RTTI_FLAG := -frtti |
| 61 | LOCAL_CLANG := true |
| 62 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 63 | |
| 64 | LOCAL_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 Vakulenko | 8473fb7 | 2015-08-18 00:55:40 +0000 | [diff] [blame] | 76 | # buffet/shill_client.cc \ |
| Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 77 | # buffet/webserv_client.cc \ |
| 78 | |
| 79 | include $(BUILD_STATIC_LIBRARY) |
| 80 | |
| 81 | # buffet |
| 82 | # ======================================================== |
| 83 | include $(CLEAR_VARS) |
| 84 | LOCAL_MODULE := weaved |
| Alex Vakulenko | 8473fb7 | 2015-08-18 00:55:40 +0000 | [diff] [blame] | 85 | LOCAL_REQUIRED_MODULES := init.weaved.rc |
| Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 86 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 87 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 88 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 89 | LOCAL_C_INCLUDES := $(buffetCommonCIncludes) |
| 90 | LOCAL_SHARED_LIBRARIES := $(buffetSharedLibraries) |
| 91 | LOCAL_WHOLE_STATIC_LIBRARIES := buffet-common |
| 92 | LOCAL_CLANG := true |
| 93 | LOCAL_RTTI_FLAG := -frtti |
| 94 | |
| 95 | LOCAL_SRC_FILES := \ |
| 96 | buffet/main.cc |
| 97 | |
| 98 | include $(BUILD_EXECUTABLE) |
| 99 | |
| Gilad Arnold | c1b676c | 2015-08-18 10:30:48 -0700 | [diff] [blame^] | 100 | ifdef INITRC_TEMPLATE |
| Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 101 | include $(CLEAR_VARS) |
| 102 | LOCAL_MODULE := init.weaved.rc |
| 103 | LOCAL_MODULE_CLASS := ETC |
| 104 | LOCAL_MODULE_PATH := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_INITRCD) |
| 105 | |
| Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 106 | include $(BUILD_SYSTEM)/base_rules.mk |
| 107 | |
| Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 108 | $(LOCAL_BUILT_MODULE): $(INITRC_TEMPLATE) |
| Gilad Arnold | c1b676c | 2015-08-18 10:30:48 -0700 | [diff] [blame^] | 109 | $(call generate-initrc-file,weaved) |
| Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 110 | endif |
| 111 | |
| 112 | # buffet_testrunner |
| 113 | # ======================================================== |
| 114 | include $(CLEAR_VARS) |
| 115 | LOCAL_MODULE := buffet_testrunner |
| 116 | LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension) |
| 117 | LOCAL_CFLAGS := $(buffetCommonCFlags) |
| 118 | LOCAL_CPPFLAGS := $(buffetCommonCppFlags) |
| 119 | LOCAL_C_INCLUDES := \ |
| 120 | $(buffetCommonCIncludes) \ |
| 121 | external/gmock/include \ |
| 122 | |
| 123 | LOCAL_SHARED_LIBRARIES := \ |
| 124 | $(buffetSharedLibraries) \ |
| 125 | |
| 126 | LOCAL_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 | |
| 135 | LOCAL_RTTI_FLAG := -frtti |
| 136 | LOCAL_CLANG := true |
| 137 | |
| 138 | LOCAL_SRC_FILES := \ |
| 139 | buffet/buffet_testrunner.cc \ |
| 140 | buffet/dbus_command_proxy_unittest.cc \ |
| 141 | buffet/dbus_conversion_unittest.cc \ |
| 142 | |
| 143 | include $(BUILD_NATIVE_TEST) |
| 144 | |
| Alex Vakulenko | d78756d | 2015-08-11 12:32:02 -0700 | [diff] [blame] | 145 | endif # HOST_OS == linux |