| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2015 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | webservd_root := $(my-dir) |
| 18 | |
| Christopher Wiley | ff0ff95 | 2016-01-04 13:11:36 -0800 | [diff] [blame^] | 19 | system_webservd_use_dbus := true |
| 20 | system_webservd_use_binder := |
| 21 | |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 22 | # Definitions applying to all targets. $(eval) this last. |
| 23 | define webservd_common |
| 24 | LOCAL_CPP_EXTENSION := .cc |
| Christopher Wiley | 016df0a | 2016-01-04 08:41:41 -0800 | [diff] [blame] | 25 | LOCAL_CFLAGS += -Wall -Werror |
| Christopher Wiley | ff0ff95 | 2016-01-04 13:11:36 -0800 | [diff] [blame^] | 26 | ifeq ($(system_webservd_use_dbus),true) |
| 27 | LOCAL_CFLAGS += -DWEBSERV_USE_DBUS |
| 28 | endif |
| 29 | ifeq ($(system_webservd_use_binder),true) |
| 30 | LOCAL_CFLAGS += -DWEBSERV_USE_BINDER |
| 31 | endif |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 32 | |
| Alex Vakulenko | 7dee8db | 2015-10-27 11:47:54 -0700 | [diff] [blame] | 33 | # libbrillo's secure_blob.h calls "using Blob::vector" to expose its base |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 34 | # class's constructors. This causes a "conflicts with version inherited from |
| 35 | # 'std::__1::vector<unsigned char>'" error when building with GCC. |
| 36 | LOCAL_CLANG := true |
| 37 | |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 38 | LOCAL_C_INCLUDES += \ |
| 39 | $(webservd_root) \ |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 40 | external/gtest/include \ |
| 41 | |
| Christopher Wiley | ff0ff95 | 2016-01-04 13:11:36 -0800 | [diff] [blame^] | 42 | endef # webserv_common |
| 43 | |
| 44 | define webservd_common_libraries |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 45 | LOCAL_SHARED_LIBRARIES += \ |
| Alex Vakulenko | 7dee8db | 2015-10-27 11:47:54 -0700 | [diff] [blame] | 46 | libbrillo \ |
| Alex Vakulenko | 7dee8db | 2015-10-27 11:47:54 -0700 | [diff] [blame] | 47 | libbrillo-http \ |
| 48 | libbrillo-stream \ |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 49 | libchrome \ |
| Christopher Wiley | ff0ff95 | 2016-01-04 13:11:36 -0800 | [diff] [blame^] | 50 | libmicrohttpd |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 51 | |
| Christopher Wiley | ff0ff95 | 2016-01-04 13:11:36 -0800 | [diff] [blame^] | 52 | # TODO(wiley) Uncomment these guards once firewalld moves to binder |
| 53 | # b/25932807 |
| 54 | # ifeq ($(system_webservd_use_dbus),true) |
| 55 | LOCAL_SHARED_LIBRARIES += \ |
| 56 | libbrillo-dbus \ |
| 57 | libchrome-dbus \ |
| 58 | libdbus |
| 59 | # endif |
| 60 | ifeq ($(system_webservd_use_binder),true) |
| 61 | LOCAL_SHARED_LIBRARIES += \ |
| 62 | libbrillo-binder \ |
| 63 | libcutils \ |
| 64 | libutils \ |
| 65 | libbinder |
| 66 | endif |
| 67 | |
| 68 | endef # webserv_common_libraries |
| Daniel Erat | 35f6587 | 2015-08-17 20:59:29 -0600 | [diff] [blame] | 69 | |
| 70 | include $(call all-subdir-makefiles) |