blob: f7012afe7ba31793080fc448503655a91d2e2408 [file] [log] [blame]
Thieu Le3426c8f2012-01-11 17:35:11 -08001# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Chris Masone96832c32011-05-03 12:23:18 -07002# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5CXX ?= g++
mukesh agrawalf60e4062011-05-27 13:13:41 -07006CXXFLAGS ?= -fno-strict-aliasing
Eric Shienbrood9a245532012-03-07 14:20:39 -05007CXXFLAGS += -Wall -Wextra -Wno-unused-parameter -Wno-unused-result \
Ben Chanbbdef5f2012-04-23 13:58:15 -07008 -Wno-missing-field-initializers \
Eric Shienbrood9a245532012-03-07 14:20:39 -05009 -Werror -Wuninitialized -Woverloaded-virtual
Darin Petkov04d46b42011-08-31 14:17:34 -070010CXXFLAGS += $(EXTRA_CXXFLAGS)
Chris Masone96832c32011-05-03 12:23:18 -070011CPPFLAGS ?= -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
Chris Masone96832c32011-05-03 12:23:18 -070012PKG_CONFIG ?= pkg-config
Chris Masone14de6e52011-05-09 09:20:59 -070013DBUSXX_XML2CPP = dbusxx-xml2cpp
Chris Masone96832c32011-05-03 12:23:18 -070014
Darin Petkov5236a8e2012-02-21 10:26:55 +010015BUILDDIR = build
16
Paul Stewart291a4732012-03-14 19:19:02 -070017LIBDIR = /usr/lib
18SCRIPTDIR = $(LIBDIR)/flimflam/scripts
19CPPFLAGS += -DSCRIPTDIR=\"$(SCRIPTDIR)\"
Jorge Lucangeli Obesad43cc62012-04-11 16:25:43 -070020BASE_LIBS = -lcares -lmobile-provider -lmetrics -lminijail
Darin Petkov5236a8e2012-02-21 10:26:55 +010021BASE_INCLUDE_DIRS = -iquote.. -iquote $(BUILDDIR)
Chris Masone96832c32011-05-03 12:23:18 -070022BASE_LIB_DIRS =
23
24LIBS = $(BASE_LIBS)
Eric Shienbrood3e20a232012-02-16 11:35:56 -050025BASE_VER = 125070
Mike Frysingeradb25142012-02-16 14:19:04 -050026PC_DEPS = dbus-c++-1 glib-2.0 gio-2.0 libchrome-$(BASE_VER) \
27 libchromeos-$(BASE_VER)
Eric Shienbroodc74cf9c2012-03-02 15:00:35 -050028INCLUDE_DIRS := $(BASE_INCLUDE_DIRS) $(shell $(PKG_CONFIG) --cflags $(PC_DEPS))
29LIB_DIRS := $(BASE_LIB_DIRS) $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
Chris Masone96832c32011-05-03 12:23:18 -070030
31TEST_LIBS = $(BASE_LIBS) -lgmock -lgtest
Chris Masone96832c32011-05-03 12:23:18 -070032TEST_LIB_DIRS = $(LIB_DIRS)
33
Darin Petkov4a09b6b2011-07-19 12:52:06 -070034DBUS_BINDINGS_DIR = dbus_bindings
Darin Petkov5236a8e2012-02-21 10:26:55 +010035BUILD_DBUS_BINDINGS_DIR = $(BUILDDIR)/shill/$(DBUS_BINDINGS_DIR)
36
37# Creating $(BUILD_DBUS_BINDINGS_DIR) will also create $(BUILDDIR).
38_CREATE_BUILDDIR := $(shell mkdir -p $(BUILD_DBUS_BINDINGS_DIR))
Darin Petkov4a09b6b2011-07-19 12:52:06 -070039
Elly Jones5211a4c2012-01-26 19:25:20 -050040DBUS_ADAPTOR_HEADERS :=
Chris Masone14de6e52011-05-09 09:20:59 -070041
Darin Petkov567a7d02011-05-26 17:15:34 -070042DBUS_PROXY_HEADERS = \
Darin Petkov3117bab2011-08-02 16:10:21 -070043 dbus-properties.h \
David Rochbergbdd0c8b2012-02-27 15:45:48 -050044 dbus-objectmanager.h \
Darin Petkov567a7d02011-05-26 17:15:34 -070045 dhcpcd.h \
Darin Petkov394b7d42011-11-03 15:48:02 +010046 power_manager.h \
Darin Petkov567a7d02011-05-26 17:15:34 -070047 supplicant-bss.h \
48 supplicant-interface.h \
49 supplicant-network.h \
mukesh agrawalab87ea42011-05-18 11:44:49 -070050 supplicant-process.h
Darin Petkov567a7d02011-05-26 17:15:34 -070051
Darin Petkovf5f61e02011-07-29 11:35:40 -070052# Generates rules for copying SYSROOT XMLs locally and updates the proxy header
53# dependencies.
54DBUS_BINDINGS_XML_SYSROOT = \
Darin Petkov096b3472012-05-15 10:26:22 +020055 org.chromium.WiMaxManager>wimax_manager \
56 org.chromium.WiMaxManager.Device>wimax_manager-device \
Darin Petkov9893d9c2012-05-17 15:27:31 -070057 org.chromium.WiMaxManager.Network>wimax_manager-network \
Darin Petkovf5f61e02011-07-29 11:35:40 -070058 org.freedesktop.ModemManager>modem_manager \
Darin Petkov1ec741c2011-08-02 10:45:27 -070059 org.freedesktop.ModemManager.Modem>modem \
Darin Petkovf5f61e02011-07-29 11:35:40 -070060 org.freedesktop.ModemManager.Modem.Cdma>modem-cdma \
61 org.freedesktop.ModemManager.Modem.Gsm.Card>modem-gsm-card \
62 org.freedesktop.ModemManager.Modem.Gsm.Network>modem-gsm-network \
Jason Glasgowee1081c2012-03-06 15:14:53 -050063 org.freedesktop.ModemManager.Modem.Simple>modem-simple \
64 org.freedesktop.ModemManager1.Modem>mm1-modem \
65 org.freedesktop.ModemManager1.Modem.Modem3gpp>mm1-modem-modem3gpp \
66 org.freedesktop.ModemManager1.Modem.ModemCdma>mm1-modem-modemcdma \
Jason Glasgow74f5ef22012-03-29 16:15:04 -040067 org.freedesktop.ModemManager1.Modem.Simple>mm1-modem-simple \
Darin Petkov096b3472012-05-15 10:26:22 +020068 org.freedesktop.ModemManager1.Sim>mm1-sim
Darin Petkovf5f61e02011-07-29 11:35:40 -070069
Elly Jones5211a4c2012-01-26 19:25:20 -050070# Rename local XML files with the names required by DBus to XML files with the
71# names required by the style guide, which will then be turned into generated
72# headers later.
73DBUS_BINDINGS_XML_LOCAL = \
74 org.chromium.flimflam.Device>flimflam-device \
75 org.chromium.flimflam.IPConfig>flimflam-ipconfig \
76 org.chromium.flimflam.Manager>flimflam-manager \
77 org.chromium.flimflam.Profile>flimflam-profile \
Darin Petkova9b1fed2012-02-29 11:49:05 +010078 org.chromium.flimflam.Service>flimflam-service \
79 org.chromium.flimflam.Task>flimflam-task
Elly Jones5211a4c2012-01-26 19:25:20 -050080
Darin Petkovf5f61e02011-07-29 11:35:40 -070081define ADD_BINDING
82$(eval _SOURCE = $(word 1,$(subst >, ,$(1))))
83$(eval _TARGET = $(word 2,$(subst >, ,$(1))))
Darin Petkovf5f61e02011-07-29 11:35:40 -070084DBUS_PROXY_HEADERS += $(_TARGET).h
Darin Petkov5236a8e2012-02-21 10:26:55 +010085$(BUILD_DBUS_BINDINGS_DIR)/$(_TARGET).xml: \
Darin Petkovf5f61e02011-07-29 11:35:40 -070086 $(SYSROOT)/usr/share/dbus-1/interfaces/$(_SOURCE).xml
87 cat $$< > $$@
88endef
89
Elly Jones5211a4c2012-01-26 19:25:20 -050090define ADD_LOCAL_BINDING
91$(eval _SOURCE = $(word 1,$(subst >, ,$(1))))
92$(eval _TARGET = $(word 2,$(subst >, ,$(1))))
Elly Jones5211a4c2012-01-26 19:25:20 -050093DBUS_ADAPTOR_HEADERS += $(_TARGET).h
Darin Petkov5236a8e2012-02-21 10:26:55 +010094$(BUILD_DBUS_BINDINGS_DIR)/$(_TARGET).xml: $(DBUS_BINDINGS_DIR)/$(_SOURCE).xml
Elly Jones5211a4c2012-01-26 19:25:20 -050095 cp $$< $$@
96endef
97
Darin Petkovf5f61e02011-07-29 11:35:40 -070098$(foreach b,$(DBUS_BINDINGS_XML_SYSROOT),$(eval $(call ADD_BINDING,$(b))))
Elly Jones5211a4c2012-01-26 19:25:20 -050099$(foreach b,$(DBUS_BINDINGS_XML_LOCAL),$(eval $(call ADD_LOCAL_BINDING,$(b))))
Darin Petkovf5f61e02011-07-29 11:35:40 -0700100
Darin Petkov4a09b6b2011-07-19 12:52:06 -0700101DBUS_ADAPTOR_BINDINGS = \
Darin Petkov5236a8e2012-02-21 10:26:55 +0100102 $(addprefix $(BUILD_DBUS_BINDINGS_DIR)/, $(DBUS_ADAPTOR_HEADERS))
103DBUS_PROXY_BINDINGS = \
104 $(addprefix $(BUILD_DBUS_BINDINGS_DIR)/, $(DBUS_PROXY_HEADERS))
Chris Masone96832c32011-05-03 12:23:18 -0700105
Darin Petkov5236a8e2012-02-21 10:26:55 +0100106SHILL_OBJS = $(addprefix $(BUILDDIR)/, \
Paul Stewartf65320c2011-10-13 14:34:52 -0700107 async_connection.o \
Paul Stewart3ecfa2b2011-07-15 10:47:42 -0700108 byte_string.o \
Chris Masone3bd3c8c2011-06-13 08:20:26 -0700109 cellular.o \
Darin Petkovdaf43862011-10-27 11:37:28 +0200110 cellular_capability.o \
111 cellular_capability_cdma.o \
Jason Glasgow82f9ab32012-04-04 14:27:19 -0400112 cellular_capability_classic.o \
Darin Petkovdaf43862011-10-27 11:37:28 +0200113 cellular_capability_gsm.o \
Jason Glasgow82f9ab32012-04-04 14:27:19 -0400114 cellular_capability_universal.o \
Eric Shienbrood5de44ab2011-12-05 10:46:27 -0500115 cellular_error.o \
Chris Masone3bd3c8c2011-06-13 08:20:26 -0700116 cellular_service.o \
Paul Stewartdd60e452011-08-08 11:38:36 -0700117 connection.o \
Darin Petkov823c47e2011-06-27 16:15:35 -0700118 crypto_des_cbc.o \
Darin Petkov86964e02011-06-29 13:49:28 -0700119 crypto_provider.o \
Darin Petkov877642b2011-06-27 13:37:22 -0700120 crypto_rot47.o \
Chris Masoned0ceb8c2011-06-02 10:05:39 -0700121 dbus_adaptor.o \
Chris Masone96832c32011-05-03 12:23:18 -0700122 dbus_control.o \
David Rochbergb8b89b12012-02-28 16:11:33 -0500123 dbus_objectmanager_proxy.o \
Darin Petkove0a312e2011-07-20 13:45:28 -0700124 dbus_properties.o \
Darin Petkov5c97ac52011-07-19 16:30:49 -0700125 dbus_properties_proxy.o \
Chris Masone88cbd5f2011-07-03 14:30:04 -0700126 default_profile.o \
Chris Masone96832c32011-05-03 12:23:18 -0700127 device.o \
Chris Masoned7732e42011-05-20 11:08:56 -0700128 device_dbus_adaptor.o \
Paul Stewart0af98bf2011-05-10 17:38:08 -0700129 device_info.o \
Darin Petkov50308cd2011-06-01 18:25:07 -0700130 dhcp_config.o \
131 dhcp_provider.o \
132 dhcpcd_proxy.o \
Paul Stewartc2350ee2011-10-19 12:28:40 -0700133 dns_client.o \
mukesh agrawalb54601c2011-06-07 17:39:22 -0700134 endpoint.o \
Chris Masone7aa5f902011-07-11 11:13:35 -0700135 ephemeral_profile.o \
Chris Masone8fe2c7e2011-06-09 15:51:19 -0700136 error.o \
Paul Stewartb50f0b92011-05-16 16:31:42 -0700137 ethernet.o \
Paul Stewartf1ce5d22011-05-19 13:10:20 -0700138 ethernet_service.o \
Paul Stewart26b327e2011-10-19 11:38:09 -0700139 event_dispatcher.o \
Darin Petkovf7897bc2011-06-08 17:13:36 -0700140 glib.o \
Paul Stewartf0aae102011-10-19 12:11:44 -0700141 glib_io_ready_handler.o \
142 glib_io_input_handler.o \
Gary Morainf80ef062012-05-16 14:57:04 -0700143 hook_table.o \
Paul Stewartf65320c2011-10-13 14:34:52 -0700144 http_proxy.o \
Paul Stewart188a84a2012-01-20 16:28:15 -0800145 http_request.o \
Paul Stewart95133562012-01-18 18:36:57 -0800146 http_url.o \
Paul Stewart1d18e8c2011-07-15 11:00:31 -0700147 ip_address.o \
Darin Petkove02b3ca2011-05-31 16:00:44 -0700148 ipconfig.o \
Chris Masonec6c6c132011-06-30 11:29:52 -0700149 ipconfig_dbus_adaptor.o \
Darin Petkov083047b2011-06-23 20:42:48 -0700150 key_file_store.o \
mukesh agrawal7a4e4002011-09-06 11:26:05 -0700151 key_value_store.o \
Darin Petkov7476a262012-04-12 16:30:46 +0200152 l2tp_ipsec_driver.o \
Chris Masone96832c32011-05-03 12:23:18 -0700153 manager.o \
Chris Masoned7732e42011-05-20 11:08:56 -0700154 manager_dbus_adaptor.o \
Thieu Le48e6d6d2011-12-06 00:40:27 +0000155 metrics.o \
Jorge Lucangeli Obesad43cc62012-04-11 16:25:43 -0700156 minijail.o \
Jason Glasgowee1081c2012-03-06 15:14:53 -0500157 mm1_modem_modem3gpp_proxy.o \
158 mm1_modem_modemcdma_proxy.o \
159 mm1_modem_proxy.o \
160 mm1_modem_simple_proxy.o \
Jason Glasgow74f5ef22012-03-29 16:15:04 -0400161 mm1_sim_proxy.o \
Darin Petkov5c97ac52011-07-19 16:30:49 -0700162 modem.o \
David Rochbergfa1d31d2012-03-20 10:38:07 -0400163 modem_1.o \
Darin Petkovbec79a22011-08-01 14:47:17 -0700164 modem_cdma_proxy.o \
David Rochbergfa1d31d2012-03-20 10:38:07 -0400165 modem_classic.o \
Darin Petkov975b5e72011-08-30 11:48:08 -0700166 modem_gsm_card_proxy.o \
Darin Petkova1e0a1c2011-08-25 15:08:33 -0700167 modem_gsm_network_proxy.o \
Darin Petkov887f2982011-07-14 16:10:17 -0700168 modem_info.o \
169 modem_manager.o \
Darin Petkovc90fe522011-07-15 13:59:47 -0700170 modem_manager_proxy.o \
Darin Petkove9d12e02011-07-27 15:09:37 -0700171 modem_proxy.o \
Darin Petkove604f702011-07-28 15:51:17 -0700172 modem_simple_proxy.o \
Darin Petkov3c5e4dc2012-04-02 14:44:27 +0200173 nss.o \
Darin Petkov33af05c2012-02-28 10:10:30 +0100174 openvpn_driver.o \
Darin Petkov1c115202012-03-22 15:35:47 +0100175 openvpn_management_server.o \
Paul Stewarte6927402012-01-23 16:11:30 -0800176 portal_detector.o \
Gary Morain43bc6272012-01-30 14:01:15 -0800177 power_manager.o \
Darin Petkov394b7d42011-11-03 15:48:02 +0100178 power_manager_proxy.o \
Chris Masone52cd19b2011-06-29 17:23:04 -0700179 profile.o \
180 profile_dbus_adaptor.o \
Paul Stewart0756db92012-01-27 08:34:47 -0800181 profile_dbus_property_exporter.o \
Chris Masoneb925cc82011-06-22 15:39:57 -0700182 property_store.o \
Darin Petkovc90fe522011-07-15 13:59:47 -0700183 proxy_factory.o \
Paul Stewart75e89d22011-08-01 10:00:02 -0700184 routing_table.o \
Paul Stewartb6063942011-08-05 10:17:29 -0700185 resolver.o \
Eric Shienbrood3e20a232012-02-16 11:35:56 -0500186 rpc_task.o \
187 rpc_task_dbus_adaptor.o \
Paul Stewartf1ce5d22011-05-19 13:10:20 -0700188 rtnl_handler.o \
189 rtnl_listener.o \
Paul Stewartdd7df792011-07-15 11:09:50 -0700190 rtnl_message.o \
Ben Chanbc49ac72012-04-10 19:59:45 -0700191 scope_logger.o \
Chris Masone96832c32011-05-03 12:23:18 -0700192 service.o \
Chris Masoned7732e42011-05-20 11:08:56 -0700193 service_dbus_adaptor.o \
Paul Stewartc2350ee2011-10-19 12:28:40 -0700194 shill_ares.o \
Chris Masone96832c32011-05-03 12:23:18 -0700195 shill_config.o \
196 shill_daemon.o \
Chris Masoneb9c00592011-10-06 13:10:39 -0700197 shill_test_config.o \
Paul Stewartc2350ee2011-10-19 12:28:40 -0700198 shill_time.o \
Darin Petkov633ac6f2011-07-08 13:56:13 -0700199 sockets.o \
Paul Stewart1062d9d2012-04-27 10:42:27 -0700200 static_ip_parameters.o \
mukesh agrawalb20776f2012-02-10 16:00:36 -0800201 supplicant_bss_proxy.o \
mukesh agrawalaf571952011-07-14 14:31:12 -0700202 supplicant_interface_proxy.o \
203 supplicant_process_proxy.o \
Paul Stewartfdd16072011-09-16 12:41:35 -0700204 technology.o \
mukesh agrawal93a29ed2012-04-17 16:13:01 -0700205 virtio_ethernet.o \
Darin Petkovf20994f2012-03-05 16:12:19 +0100206 vpn.o \
Darin Petkovb451d6e2012-04-23 11:56:41 +0200207 vpn_driver.o \
Darin Petkov33af05c2012-02-28 10:10:30 +0100208 vpn_provider.o \
209 vpn_service.o \
mukesh agrawalb54601c2011-06-07 17:39:22 -0700210 wifi.o \
211 wifi_endpoint.o \
mukesh agrawal6e277772011-09-29 15:04:23 -0700212 wifi_service.o \
Ben Chan99c8a4d2012-05-01 08:11:53 -0700213 wimax.o \
Darin Petkov096b3472012-05-15 10:26:22 +0200214 wimax_device_proxy.o \
215 wimax_manager_proxy.o \
Darin Petkov9893d9c2012-05-17 15:27:31 -0700216 wimax_network_proxy.o \
Darin Petkovb72b62e2012-05-15 16:55:36 +0200217 wimax_provider.o \
Ben Chan99c8a4d2012-05-01 08:11:53 -0700218 wimax_service.o \
Darin Petkov5236a8e2012-02-21 10:26:55 +0100219 wpa_supplicant.o \
220 )
Chris Masone96832c32011-05-03 12:23:18 -0700221
222SHILL_BIN = shill
mukesh agrawal837bb562011-11-23 01:06:01 +0000223# Broken out separately, because (unlike other SHILL_OBJS), it
224# shouldn't be linked into TEST_BIN.
Darin Petkov5236a8e2012-02-21 10:26:55 +0100225SHILL_MAIN_OBJ = $(BUILDDIR)/shill_main.o
Chris Masone96832c32011-05-03 12:23:18 -0700226
227TEST_BIN = shill_unittest
Darin Petkov5236a8e2012-02-21 10:26:55 +0100228TEST_OBJS = $(addprefix $(BUILDDIR)/, \
Paul Stewartf65320c2011-10-13 14:34:52 -0700229 async_connection_unittest.o \
Paul Stewart3ecfa2b2011-07-15 10:47:42 -0700230 byte_string_unittest.o \
Darin Petkovcb547732011-11-09 13:55:26 +0100231 cellular_capability_cdma_unittest.o \
Jason Glasgow82f9ab32012-04-04 14:27:19 -0400232 cellular_capability_classic_unittest.o \
Darin Petkovb05315f2011-11-07 10:14:25 +0100233 cellular_capability_gsm_unittest.o \
Jason Glasgowef965562012-04-10 16:12:35 -0400234 cellular_capability_universal_unittest.o \
Darin Petkovb72cf402011-11-22 14:51:39 +0100235 cellular_service_unittest.o \
Chris Masoneb925cc82011-06-22 15:39:57 -0700236 cellular_unittest.o \
Darin Petkov823c47e2011-06-27 16:15:35 -0700237 crypto_des_cbc_unittest.o \
Darin Petkov86964e02011-06-29 13:49:28 -0700238 crypto_provider_unittest.o \
Darin Petkov877642b2011-06-27 13:37:22 -0700239 crypto_rot47_unittest.o \
Paul Stewartdd60e452011-08-08 11:38:36 -0700240 connection_unittest.o \
Chris Masoned0ceb8c2011-06-02 10:05:39 -0700241 dbus_adaptor_unittest.o \
Darin Petkove0a312e2011-07-20 13:45:28 -0700242 dbus_properties_unittest.o \
Chris Masone88cbd5f2011-07-03 14:30:04 -0700243 default_profile_unittest.o \
Darin Petkove02b3ca2011-05-31 16:00:44 -0700244 device_info_unittest.o \
Darin Petkovafa6fc42011-06-21 16:21:08 -0700245 device_unittest.o \
Darin Petkove7cb7f82011-06-03 13:21:51 -0700246 dhcp_config_unittest.o \
Darin Petkov98dd6a02011-06-10 15:12:57 -0700247 dhcp_provider_unittest.o \
Paul Stewartc2350ee2011-10-19 12:28:40 -0700248 dns_client_unittest.o \
Darin Petkove4c0ace2011-08-24 10:32:46 -0700249 error_unittest.o \
Gary Morainf80ef062012-05-16 14:57:04 -0700250 hook_table_unittest.o \
Paul Stewartf65320c2011-10-13 14:34:52 -0700251 http_proxy_unittest.o \
Paul Stewart188a84a2012-01-20 16:28:15 -0800252 http_request_unittest.o \
Paul Stewart95133562012-01-18 18:36:57 -0800253 http_url_unittest.o \
Paul Stewart1d18e8c2011-07-15 11:00:31 -0700254 ip_address_unittest.o \
Darin Petkove02b3ca2011-05-31 16:00:44 -0700255 ipconfig_unittest.o \
Darin Petkov083047b2011-06-23 20:42:48 -0700256 key_file_store_unittest.o \
Darin Petkov7f060332012-03-14 11:46:47 +0100257 key_value_store_unittest.o \
Darin Petkov7476a262012-04-12 16:30:46 +0200258 l2tp_ipsec_driver_unittest.o \
Darin Petkove02b3ca2011-05-31 16:00:44 -0700259 manager_unittest.o \
Thieu Le48e6d6d2011-12-06 00:40:27 +0000260 metrics_unittest.o \
Chris Masone95207da2011-06-29 16:50:49 -0700261 mock_adaptors.o \
Paul Stewartc2350ee2011-10-19 12:28:40 -0700262 mock_ares.o \
Paul Stewartf65320c2011-10-13 14:34:52 -0700263 mock_async_connection.o \
David Rochbergfa1d31d2012-03-20 10:38:07 -0400264 mock_cellular.o \
Jason Glasgow14521872012-05-07 19:12:15 -0400265 mock_cellular_service.o \
Paul Stewartc1dec4d2011-12-08 15:25:28 -0800266 mock_connection.o \
Darin Petkove02b3ca2011-05-31 16:00:44 -0700267 mock_control.o \
David Rochberg7cb06f62012-03-05 11:23:44 -0500268 mock_dbus_objectmanager_proxy.o \
Darin Petkov1bdedf12011-08-26 13:32:11 -0700269 mock_dbus_properties_proxy.o \
Chris Masonea82b7112011-05-25 15:16:29 -0700270 mock_device.o \
Darin Petkov1bdedf12011-08-26 13:32:11 -0700271 mock_device_info.o \
272 mock_dhcp_config.o \
273 mock_dhcp_provider.o \
274 mock_dhcp_proxy.o \
Paul Stewartf65320c2011-10-13 14:34:52 -0700275 mock_dns_client.o \
Paul Stewartc2350ee2011-10-19 12:28:40 -0700276 mock_event_dispatcher.o \
Darin Petkov1bdedf12011-08-26 13:32:11 -0700277 mock_glib.o \
Paul Stewarte6927402012-01-23 16:11:30 -0800278 mock_http_request.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700279 mock_ipconfig.o \
Gary Morain8a5726a2012-05-15 10:56:49 -0700280 mock_log.o \
281 mock_log_unittest.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700282 mock_manager.o \
Thieu Le3426c8f2012-01-11 17:35:11 -0800283 mock_metrics.o \
Jorge Lucangeli Obesad43cc62012-04-11 16:25:43 -0700284 mock_minijail.o \
Jason Glasgowef965562012-04-10 16:12:35 -0400285 mock_mm1_modem_modemcdma_proxy.o \
286 mock_mm1_modem_modem3gpp_proxy.o \
287 mock_mm1_modem_proxy.o \
288 mock_mm1_modem_simple_proxy.o \
289 mock_mm1_sim_proxy.o \
David Rochbergfa1d31d2012-03-20 10:38:07 -0400290 mock_modem.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700291 mock_modem_cdma_proxy.o \
Darin Petkov975b5e72011-08-30 11:48:08 -0700292 mock_modem_gsm_card_proxy.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700293 mock_modem_gsm_network_proxy.o \
Paul Stewart8c116a92012-05-02 18:30:03 -0700294 mock_modem_info.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700295 mock_modem_manager_proxy.o \
296 mock_modem_proxy.o \
297 mock_modem_simple_proxy.o \
Darin Petkov3c5e4dc2012-04-02 14:44:27 +0200298 mock_nss.o \
Darin Petkov1c115202012-03-22 15:35:47 +0100299 mock_openvpn_driver.o \
Darin Petkov46463022012-03-29 14:57:32 +0200300 mock_openvpn_management_server.o \
Paul Stewartc681fa02012-03-02 19:40:04 -0800301 mock_portal_detector.o \
Gary Morainac1bdb42012-02-16 17:42:29 -0800302 mock_power_manager.o \
Darin Petkov394b7d42011-11-03 15:48:02 +0100303 mock_power_manager_proxy.o \
Chris Masone7aa5f902011-07-11 11:13:35 -0700304 mock_profile.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700305 mock_property_store.o \
Thieu Lefb46caf2012-03-08 11:57:15 -0800306 mock_proxy_factory.o \
Darin Petkoveac68e62011-08-26 16:24:51 -0700307 mock_resolver.o \
308 mock_routing_table.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700309 mock_rtnl_handler.o \
Chris Masonea82b7112011-05-25 15:16:29 -0700310 mock_service.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700311 mock_sockets.o \
Darin Petkoveac68e62011-08-26 16:24:51 -0700312 mock_store.o \
mukesh agrawalb20776f2012-02-10 16:00:36 -0800313 mock_supplicant_bss_proxy.o \
Darin Petkovef34f182011-08-26 14:14:40 -0700314 mock_supplicant_interface_proxy.o \
315 mock_supplicant_process_proxy.o \
Paul Stewartc2350ee2011-10-19 12:28:40 -0700316 mock_time.o \
Darin Petkov36a3ace2012-03-06 17:22:14 +0100317 mock_vpn.o \
Darin Petkov33af05c2012-02-28 10:10:30 +0100318 mock_vpn_driver.o \
Paul Stewart8c116a92012-05-02 18:30:03 -0700319 mock_vpn_provider.o \
Darin Petkov79d74c92012-03-07 17:20:32 +0100320 mock_vpn_service.o \
mukesh agrawal7a4e4002011-09-06 11:26:05 -0700321 mock_wifi.o \
mukesh agrawal7ec71312011-11-10 02:08:26 +0000322 mock_wifi_service.o \
Ben Chanc07362b2012-05-12 10:54:11 -0700323 mock_wimax.o \
Darin Petkov096b3472012-05-15 10:26:22 +0200324 mock_wimax_device_proxy.o \
325 mock_wimax_manager_proxy.o \
Darin Petkov9893d9c2012-05-17 15:27:31 -0700326 mock_wimax_network_proxy.o \
Darin Petkove4b27022012-05-16 13:28:50 +0200327 mock_wimax_provider.o \
Ben Chanc07362b2012-05-12 10:54:11 -0700328 mock_wimax_service.o \
Jason Glasgow82f9ab32012-04-04 14:27:19 -0400329 modem_1_unittest.o \
Darin Petkov887f2982011-07-14 16:10:17 -0700330 modem_info_unittest.o \
331 modem_manager_unittest.o \
Darin Petkove0a312e2011-07-20 13:45:28 -0700332 modem_unittest.o \
mukesh agrawaldc42bb32011-07-28 10:40:26 -0700333 nice_mock_control.o \
Darin Petkov3c5e4dc2012-04-02 14:44:27 +0200334 nss_unittest.o \
Darin Petkov33af05c2012-02-28 10:10:30 +0100335 openvpn_driver_unittest.o \
Darin Petkov1c115202012-03-22 15:35:47 +0100336 openvpn_management_server_unittest.o \
Paul Stewarte6927402012-01-23 16:11:30 -0800337 portal_detector_unittest.o \
Gary Morain43bc6272012-01-30 14:01:15 -0800338 power_manager_unittest.o \
Paul Stewart0756db92012-01-27 08:34:47 -0800339 profile_dbus_property_exporter_unittest.o \
Darin Petkova4766822011-07-07 10:42:22 -0700340 profile_unittest.o \
Chris Masone27bf1032011-06-28 17:02:01 -0700341 property_accessor_unittest.o \
Paul Stewart8e7e4592012-04-29 09:47:48 -0700342 property_store_inspector.o \
Chris Masoneb925cc82011-06-22 15:39:57 -0700343 property_store_unittest.o \
Paul Stewartb6063942011-08-05 10:17:29 -0700344 resolver_unittest.o \
Paul Stewart75e89d22011-08-01 10:00:02 -0700345 routing_table_unittest.o \
Darin Petkova9b1fed2012-02-29 11:49:05 +0100346 rpc_task_unittest.o \
Darin Petkove0a312e2011-07-20 13:45:28 -0700347 rtnl_handler_unittest.o \
Darin Petkovca432fc2011-07-08 15:56:57 -0700348 rtnl_listener_unittest.o \
Paul Stewartdd7df792011-07-15 11:09:50 -0700349 rtnl_message_unittest.o \
Ben Chanbc49ac72012-04-10 19:59:45 -0700350 scope_logger_unittest.o \
Chris Masone6515aab2011-10-12 16:19:09 -0700351 service_under_test.o \
Chris Masone3bd3c8c2011-06-13 08:20:26 -0700352 service_unittest.o \
Darin Petkove02b3ca2011-05-31 16:00:44 -0700353 shill_unittest.o \
Paul Stewart1062d9d2012-04-27 10:42:27 -0700354 static_ip_parameters_unittest.o \
Ben Chanc12cf662012-04-05 14:47:18 -0700355 technology_unittest.o \
Chris Masone853b81b2011-06-24 14:11:41 -0700356 testrunner.o \
Darin Petkovb451d6e2012-04-23 11:56:41 +0200357 vpn_driver_unittest.o \
Darin Petkov33af05c2012-02-28 10:10:30 +0100358 vpn_provider_unittest.o \
359 vpn_service_unittest.o \
Darin Petkovf20994f2012-03-05 16:12:19 +0100360 vpn_unittest.o \
mukesh agrawal6e277772011-09-29 15:04:23 -0700361 wifi_endpoint_unittest.o \
Chris Masone34af2182011-08-22 11:59:36 -0700362 wifi_service_unittest.o \
Darin Petkov5236a8e2012-02-21 10:26:55 +0100363 wifi_unittest.o \
Darin Petkovb72b62e2012-05-15 16:55:36 +0200364 wimax_provider_unittest.o \
Ben Chanc07362b2012-05-12 10:54:11 -0700365 wimax_service_unittest.o \
366 wimax_unittest.o \
Darin Petkov5236a8e2012-02-21 10:26:55 +0100367 )
Chris Masone96832c32011-05-03 12:23:18 -0700368
Darin Petkovc90fe522011-07-15 13:59:47 -0700369.PHONY: all clean
370
Chris Masone96832c32011-05-03 12:23:18 -0700371all: $(SHILL_BIN) $(TEST_BIN)
372
Darin Petkov5236a8e2012-02-21 10:26:55 +0100373$(BUILD_DBUS_BINDINGS_DIR)/%.xml: $(DBUS_BINDINGS_DIR)/%.xml
374 cp $< $@
375
Darin Petkov4a09b6b2011-07-19 12:52:06 -0700376$(DBUS_PROXY_BINDINGS): %.h: %.xml
Darin Petkov005aa382011-11-17 14:26:21 +0100377 $(DBUSXX_XML2CPP) $< --proxy=$@ --sync --async
Chris Masone413a3192011-05-09 17:10:05 -0700378
Darin Petkov4a09b6b2011-07-19 12:52:06 -0700379$(DBUS_ADAPTOR_BINDINGS): %.h: %.xml
Chris Masone14de6e52011-05-09 09:20:59 -0700380 $(DBUSXX_XML2CPP) $< --adaptor=$@
381
Darin Petkov5236a8e2012-02-21 10:26:55 +0100382$(BUILDDIR)/%.o: %.cc
mukesh agrawal837bb562011-11-23 01:06:01 +0000383 $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDE_DIRS) -MMD -c $< -o $@
Chris Masone96832c32011-05-03 12:23:18 -0700384
Darin Petkov5236a8e2012-02-21 10:26:55 +0100385$(SHILL_OBJS): $(DBUS_ADAPTOR_BINDINGS) $(DBUS_PROXY_BINDINGS)
Chris Masone14de6e52011-05-09 09:20:59 -0700386
Darin Petkovd1b715b2011-06-02 21:21:22 -0700387$(SHILL_BIN): $(SHILL_MAIN_OBJ) $(SHILL_OBJS)
Eric Shienbroodc74cf9c2012-03-02 15:00:35 -0500388 $(CXX) $(CXXFLAGS) $(INCLUDE_DIRS) $(LDFLAGS) $^ $(LIB_DIRS) $(LIBS) \
Darin Petkovd1b715b2011-06-02 21:21:22 -0700389 -o $@
Chris Masone96832c32011-05-03 12:23:18 -0700390
Paul Stewart291a4732012-03-14 19:19:02 -0700391$(TEST_BIN): CPPFLAGS += -DUNIT_TEST -DSYSROOT=\"$(SYSROOT)\"
Darin Petkovd1b715b2011-06-02 21:21:22 -0700392$(TEST_BIN): $(TEST_OBJS) $(SHILL_OBJS)
Eric Shienbroodc74cf9c2012-03-02 15:00:35 -0500393 $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ $(TEST_LIB_DIRS) $(TEST_LIBS) -o $@
Chris Masone96832c32011-05-03 12:23:18 -0700394
395clean:
Darin Petkove604f702011-07-28 15:51:17 -0700396 rm -rf \
Darin Petkov5236a8e2012-02-21 10:26:55 +0100397 $(BUILDDIR) \
Darin Petkove604f702011-07-28 15:51:17 -0700398 $(SHILL_BIN) \
399 $(TEST_BIN)
mukesh agrawal837bb562011-11-23 01:06:01 +0000400
401-include $(SHILL_OBJS:.o=.d)
402-include $(SHILL_MAIN_OBJ:.o=.d)
403-include $(TEST_OBJS:.o=.d)