| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 1 | { |
| 2 | 'target_defaults': { |
| 3 | 'variables': { |
| 4 | 'deps': [ |
| 5 | 'libchrome-<(libbase_ver)', |
| 6 | 'libchromeos-<(libbase_ver)', |
| 7 | ], |
| 8 | }, |
| 9 | 'include_dirs': ['.'], |
| 10 | }, |
| 11 | 'targets': [ |
| 12 | { |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 13 | 'target_name': 'libwebserv_common', |
| 14 | 'type': 'static_library', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 15 | 'variables': { |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 16 | # Not using dbus_service_config here deliberately in order not to |
| 17 | # get tied to some constant service name, since it will be |
| 18 | # provided by the consumer of libwebserv library. |
| 19 | 'dbus_service_config': '', |
| Christopher Wiley | 34bc9df | 2015-08-19 15:03:47 -0700 | [diff] [blame] | 20 | 'dbus_adaptors_out_dir': 'include/dbus_bindings', |
| Alex Vakulenko | e1a8ca4 | 2015-09-11 09:32:18 -0700 | [diff] [blame^] | 21 | 'dbus_xml_extension': 'dbus-xml', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 22 | }, |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 23 | # This static library is used in libwebserv shared library, which means |
| 24 | # we must generate position-independent code for the files comprising |
| 25 | # this library. Since this option is disabled by default for targets |
| 26 | # other than 'shared_library', turn it on explicitly for this lib. |
| 27 | # Turn off the default -fPIE flag (which is set for static_library |
| 28 | # in ../common-mk/common.gypi) and replace it with -fPIC. |
| 29 | 'cflags!': ['-fPIE'], |
| 30 | 'cflags': ['-fPIC'], |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 31 | 'includes': [ |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 32 | '../common-mk/generate-dbus-adaptors.gypi' |
| 33 | ], |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 34 | 'sources': [ |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 35 | 'libwebserv/protocol_handler.cc', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 36 | 'libwebserv/request.cc', |
| 37 | 'libwebserv/request_handler_callback.cc', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 38 | 'libwebserv/response.cc', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 39 | 'libwebserv/server.cc', |
| Alex Vakulenko | e1a8ca4 | 2015-09-11 09:32:18 -0700 | [diff] [blame^] | 40 | 'libwebserv/dbus_bindings/org.chromium.WebServer.RequestHandler.dbus-xml', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 41 | ], |
| 42 | 'actions': [ |
| 43 | { |
| 44 | 'action_name': 'generate-webservd-proxies', |
| 45 | 'variables': { |
| 46 | 'dbus_service_config': 'webservd/dbus_bindings/dbus-service-config.json', |
| 47 | 'mock_output_file': 'include/webservd/dbus-mocks.h', |
| 48 | 'proxy_output_file': 'include/webservd/dbus-proxies.h', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 49 | 'dbus_adaptors_out_dir': '', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 50 | }, |
| 51 | 'sources': [ |
| Alex Vakulenko | e1a8ca4 | 2015-09-11 09:32:18 -0700 | [diff] [blame^] | 52 | 'webservd/dbus_bindings/org.chromium.WebServer.ProtocolHandler.dbus-xml', |
| 53 | 'webservd/dbus_bindings/org.chromium.WebServer.Server.dbus-xml', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 54 | ], |
| 55 | 'includes': ['../common-mk/generate-dbus-proxies.gypi'], |
| 56 | }, |
| Alex Vakulenko | 5313123 | 2015-02-13 15:38:12 -0800 | [diff] [blame] | 57 | { |
| 58 | 'action_name': 'generate-permission_broker-proxies', |
| 59 | 'variables': { |
| 60 | 'dbus_service_config': '<(platform2_root)/permission_broker/dbus_bindings/dbus-service-config.json', |
| 61 | 'mock_output_file': 'include/permission_broker/dbus-mocks.h', |
| 62 | 'proxy_output_file': 'include/permission_broker/dbus-proxies.h', |
| 63 | 'dbus_adaptors_out_dir': '', |
| 64 | }, |
| 65 | 'sources': [ |
| 66 | '<(platform2_root)/permission_broker/dbus_bindings/org.chromium.PermissionBroker.xml', |
| 67 | ], |
| 68 | 'includes': ['../common-mk/generate-dbus-proxies.gypi'], |
| 69 | }, |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 70 | ], |
| 71 | }, |
| 72 | { |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 73 | 'target_name': 'webservd_common', |
| 74 | 'type': 'static_library', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 75 | 'variables': { |
| 76 | 'exported_deps': [ |
| 77 | 'libmicrohttpd', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 78 | 'openssl', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 79 | ], |
| 80 | 'deps': ['<@(exported_deps)'], |
| Christopher Wiley | 34bc9df | 2015-08-19 15:03:47 -0700 | [diff] [blame] | 81 | 'dbus_adaptors_out_dir': 'include/dbus_bindings', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 82 | 'dbus_service_config': 'webservd/dbus_bindings/dbus-service-config.json', |
| Alex Vakulenko | e1a8ca4 | 2015-09-11 09:32:18 -0700 | [diff] [blame^] | 83 | 'dbus_xml_extension': 'dbus-xml', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 84 | }, |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 85 | 'all_dependent_settings': { |
| 86 | 'variables': { |
| 87 | 'deps': [ |
| 88 | '<@(exported_deps)', |
| 89 | ], |
| 90 | }, |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 91 | }, |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 92 | 'sources': [ |
| Alex Vakulenko | 8db2b53 | 2015-02-12 07:41:51 -0800 | [diff] [blame] | 93 | 'webservd/config.cc', |
| Alex Vakulenko | e1a8ca4 | 2015-09-11 09:32:18 -0700 | [diff] [blame^] | 94 | 'webservd/dbus_bindings/org.chromium.WebServer.ProtocolHandler.dbus-xml', |
| 95 | 'webservd/dbus_bindings/org.chromium.WebServer.Server.dbus-xml', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 96 | 'webservd/dbus_protocol_handler.cc', |
| 97 | 'webservd/dbus_request_handler.cc', |
| Alex Vakulenko | 8db2b53 | 2015-02-12 07:41:51 -0800 | [diff] [blame] | 98 | 'webservd/error_codes.cc', |
| Alex Vakulenko | c16c6da | 2015-02-25 14:35:55 -0800 | [diff] [blame] | 99 | 'webservd/log_manager.cc', |
| Gilad Arnold | e14a618 | 2015-08-13 12:01:00 -0700 | [diff] [blame] | 100 | 'webservd/permission_broker_firewall.cc', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 101 | 'webservd/protocol_handler.cc', |
| 102 | 'webservd/request.cc', |
| 103 | 'webservd/server.cc', |
| 104 | 'webservd/utils.cc', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 105 | ], |
| 106 | 'includes': ['../common-mk/generate-dbus-adaptors.gypi'], |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 107 | 'actions': [ |
| 108 | { |
| 109 | 'action_name': 'generate-libwebserv-proxies', |
| 110 | 'variables': { |
| 111 | # Not using dbus_service_config here deliberately in order not to |
| 112 | # get tied to some constant service name, since it will be |
| 113 | # provided by the consumer of libwebserv library. |
| 114 | 'dbus_service_config': '', |
| 115 | 'mock_output_file': 'include/libwebserv/dbus-mocks.h', |
| 116 | 'proxy_output_file': 'include/libwebserv/dbus-proxies.h', |
| 117 | }, |
| 118 | 'sources': [ |
| Alex Vakulenko | e1a8ca4 | 2015-09-11 09:32:18 -0700 | [diff] [blame^] | 119 | 'libwebserv/dbus_bindings/org.chromium.WebServer.RequestHandler.dbus-xml', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 120 | ], |
| 121 | 'includes': ['../common-mk/generate-dbus-proxies.gypi'], |
| 122 | }, |
| 123 | ], |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 124 | }, |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 125 | { |
| 126 | 'target_name': 'libwebserv-<(libbase_ver)', |
| 127 | 'type': 'shared_library', |
| 128 | 'includes': [ |
| 129 | '../common-mk/deps.gypi', |
| 130 | ], |
| 131 | 'dependencies': [ |
| 132 | 'libwebserv_common', |
| 133 | ], |
| 134 | 'sources': [ |
| 135 | 'libwebserv/_empty.cc', |
| 136 | ], |
| 137 | }, |
| 138 | { |
| 139 | 'target_name': 'webservd', |
| 140 | 'type': 'executable', |
| 141 | 'dependencies': [ |
| 142 | 'webservd_common', |
| 143 | ], |
| Bertrand SIMONNET | cb3bc27 | 2015-08-13 14:27:05 -0700 | [diff] [blame] | 144 | 'variables': { |
| 145 | 'deps': [ |
| 146 | 'libminijail', |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 147 | ], |
| 148 | }, |
| 149 | 'sources': [ |
| 150 | 'webservd/main.cc', |
| 151 | ], |
| 152 | }, |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 153 | ], |
| 154 | 'conditions': [ |
| 155 | ['USE_test == 1', { |
| 156 | 'targets': [ |
| 157 | { |
| 158 | 'target_name': 'libwebserv_testrunner', |
| 159 | 'type': 'executable', |
| 160 | 'dependencies': [ |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 161 | 'libwebserv_common', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 162 | ], |
| 163 | 'includes': ['../common-mk/common_test.gypi'], |
| 164 | 'sources': [ |
| 165 | 'libwebserv/libwebserv_testrunner.cc', |
| 166 | ], |
| 167 | }, |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 168 | { |
| 169 | 'target_name': 'webservd_testrunner', |
| 170 | 'type': 'executable', |
| 171 | 'dependencies': [ |
| 172 | 'webservd_common', |
| 173 | ], |
| 174 | 'includes': ['../common-mk/common_test.gypi'], |
| 175 | 'sources': [ |
| Alex Vakulenko | 8db2b53 | 2015-02-12 07:41:51 -0800 | [diff] [blame] | 176 | 'webservd/config_unittest.cc', |
| Alex Vakulenko | c16c6da | 2015-02-25 14:35:55 -0800 | [diff] [blame] | 177 | 'webservd/log_manager_unittest.cc', |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 178 | 'webservd/webservd_testrunner.cc', |
| 179 | ], |
| 180 | }, |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 181 | ], |
| 182 | }], |
| 183 | ], |
| 184 | } |