| 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', |
| Bertrand SIMONNET | 4688b46 | 2015-09-23 10:55:47 -0700 | [diff] [blame] | 99 | 'webservd/fake_encryptor.cc', |
| Alex Vakulenko | c16c6da | 2015-02-25 14:35:55 -0800 | [diff] [blame] | 100 | 'webservd/log_manager.cc', |
| Gilad Arnold | e14a618 | 2015-08-13 12:01:00 -0700 | [diff] [blame] | 101 | 'webservd/permission_broker_firewall.cc', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 102 | 'webservd/protocol_handler.cc', |
| 103 | 'webservd/request.cc', |
| 104 | 'webservd/server.cc', |
| Alex Vakulenko | 257af62 | 2015-09-23 11:20:37 -0700 | [diff] [blame] | 105 | 'webservd/temp_file_manager.cc', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 106 | 'webservd/utils.cc', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 107 | ], |
| 108 | 'includes': ['../common-mk/generate-dbus-adaptors.gypi'], |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 109 | 'actions': [ |
| 110 | { |
| 111 | 'action_name': 'generate-libwebserv-proxies', |
| 112 | 'variables': { |
| 113 | # Not using dbus_service_config here deliberately in order not to |
| 114 | # get tied to some constant service name, since it will be |
| 115 | # provided by the consumer of libwebserv library. |
| 116 | 'dbus_service_config': '', |
| 117 | 'mock_output_file': 'include/libwebserv/dbus-mocks.h', |
| 118 | 'proxy_output_file': 'include/libwebserv/dbus-proxies.h', |
| 119 | }, |
| 120 | 'sources': [ |
| Alex Vakulenko | e1a8ca4 | 2015-09-11 09:32:18 -0700 | [diff] [blame] | 121 | 'libwebserv/dbus_bindings/org.chromium.WebServer.RequestHandler.dbus-xml', |
| Alex Vakulenko | 31a6379 | 2015-02-03 12:44:57 -0800 | [diff] [blame] | 122 | ], |
| 123 | 'includes': ['../common-mk/generate-dbus-proxies.gypi'], |
| 124 | }, |
| 125 | ], |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 126 | }, |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 127 | { |
| 128 | 'target_name': 'libwebserv-<(libbase_ver)', |
| 129 | 'type': 'shared_library', |
| 130 | 'includes': [ |
| 131 | '../common-mk/deps.gypi', |
| 132 | ], |
| 133 | 'dependencies': [ |
| 134 | 'libwebserv_common', |
| 135 | ], |
| 136 | 'sources': [ |
| 137 | 'libwebserv/_empty.cc', |
| 138 | ], |
| 139 | }, |
| 140 | { |
| 141 | 'target_name': 'webservd', |
| 142 | 'type': 'executable', |
| 143 | 'dependencies': [ |
| 144 | 'webservd_common', |
| 145 | ], |
| Bertrand SIMONNET | cb3bc27 | 2015-08-13 14:27:05 -0700 | [diff] [blame] | 146 | 'variables': { |
| 147 | 'deps': [ |
| 148 | 'libminijail', |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 149 | ], |
| 150 | }, |
| 151 | 'sources': [ |
| 152 | 'webservd/main.cc', |
| 153 | ], |
| 154 | }, |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 155 | ], |
| 156 | 'conditions': [ |
| 157 | ['USE_test == 1', { |
| 158 | 'targets': [ |
| 159 | { |
| 160 | 'target_name': 'libwebserv_testrunner', |
| 161 | 'type': 'executable', |
| 162 | 'dependencies': [ |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 163 | 'libwebserv_common', |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 164 | ], |
| 165 | 'includes': ['../common-mk/common_test.gypi'], |
| 166 | 'sources': [ |
| 167 | 'libwebserv/libwebserv_testrunner.cc', |
| 168 | ], |
| 169 | }, |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 170 | { |
| 171 | 'target_name': 'webservd_testrunner', |
| 172 | 'type': 'executable', |
| 173 | 'dependencies': [ |
| 174 | 'webservd_common', |
| 175 | ], |
| 176 | 'includes': ['../common-mk/common_test.gypi'], |
| 177 | 'sources': [ |
| Alex Vakulenko | 8db2b53 | 2015-02-12 07:41:51 -0800 | [diff] [blame] | 178 | 'webservd/config_unittest.cc', |
| Alex Vakulenko | c16c6da | 2015-02-25 14:35:55 -0800 | [diff] [blame] | 179 | 'webservd/log_manager_unittest.cc', |
| Alex Vakulenko | 664af90 | 2015-02-11 15:33:12 -0800 | [diff] [blame] | 180 | 'webservd/webservd_testrunner.cc', |
| 181 | ], |
| 182 | }, |
| Alex Vakulenko | 039da31 | 2015-02-03 08:58:55 -0800 | [diff] [blame] | 183 | ], |
| 184 | }], |
| 185 | ], |
| 186 | } |