|
4 | 4 |
|
5 | 5 | { |
6 | 6 | 'variables': { |
| 7 | + 'pkg-config': 'pkg-config', |
| 8 | + 'target_arch%': 'environment', |
7 | 9 | 'chromium_code': 1, |
8 | 10 | 'conditions': [ |
9 | 11 | [ 'OS=="mac"', { |
|
209 | 211 | '<@(appshell_sources_mac)', |
210 | 212 | ], |
211 | 213 | }], |
212 | | - [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
| 214 | + ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
| 215 | + 'actions': [ |
| 216 | + { |
| 217 | + 'action_name': 'appshell_extensions_js', |
| 218 | + 'inputs': [ |
| 219 | + 'appshell/appshell_extensions.js', |
| 220 | + ], |
| 221 | + 'outputs': [ |
| 222 | + 'appshell_extensions_js.o', |
| 223 | + ], |
| 224 | + 'action': [ |
| 225 | + 'objcopy', |
| 226 | + '--input', |
| 227 | + 'binary', |
| 228 | + '--output', |
| 229 | + '<(output_bfd)', |
| 230 | + '--binary-architecture', |
| 231 | + 'i386', |
| 232 | + '<@(_inputs)', |
| 233 | + '<@(_outputs)', |
| 234 | + ], |
| 235 | + 'message': 'compiling js resource' |
| 236 | + }, |
| 237 | + { |
| 238 | + 'action_name': 'appicon', |
| 239 | + 'inputs': [ |
| 240 | + 'appshell/res/appshell.ico', |
| 241 | + ], |
| 242 | + 'outputs': [ |
| 243 | + 'appshell/gtk/appicon.h', |
| 244 | + ], |
| 245 | + 'action': '<!(mkdir -p appshell/gtk; gdk-pixbuf-csource --name=appicon appshell/res/appshell.ico > appshell/gtk/appicon.h)', |
| 246 | + #Such a hack. GYP let me do bash redirections! |
| 247 | + }, |
| 248 | + ], |
| 249 | + 'cflags': [ |
| 250 | + '<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)', |
| 251 | + '<(march)', |
| 252 | + ], |
| 253 | + 'include_dirs': [ |
| 254 | + '.', |
| 255 | + ], |
| 256 | + 'default_configuration': 'Release', |
| 257 | + 'configurations': { |
| 258 | + 'Release': {}, |
| 259 | + 'Debug': {}, |
| 260 | + }, |
213 | 261 | 'copies': [ |
214 | 262 | { |
215 | | - 'destination': '<(PRODUCT_DIR)/files', |
| 263 | + 'destination': '<(PRODUCT_DIR)/lib', |
| 264 | + 'files': [ |
| 265 | + '<@(appshell_bundle_libraries_linux)', |
| 266 | + ], |
| 267 | + }, |
| 268 | + { |
| 269 | + 'destination': '<(PRODUCT_DIR)', |
216 | 270 | 'files': [ |
217 | 271 | '<@(appshell_bundle_resources_linux)', |
218 | 272 | ], |
|
222 | 276 | '<@(includes_linux)', |
223 | 277 | '<@(appshell_sources_linux)', |
224 | 278 | ], |
| 279 | + 'link_settings': { |
| 280 | + 'ldflags': [ |
| 281 | + '<!@(<(pkg-config) --libs-only-other gtk+-2.0 gthread-2.0)', |
| 282 | + '-Wl,-rpath,\$$ORIGIN/lib', |
| 283 | + '<(march)' |
| 284 | + ], |
| 285 | + 'libraries': [ |
| 286 | + '<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)', |
| 287 | + '$(BUILDTYPE)/libcef.so', |
| 288 | + 'appshell_extensions_js.o', |
| 289 | + ], |
| 290 | + }, |
225 | 291 | }], |
226 | 292 | ], |
227 | 293 | }, |
|
254 | 320 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
255 | 321 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
256 | 322 | }, |
| 323 | + 'conditions': [ |
| 324 | + ['OS=="linux"', { |
| 325 | + 'cflags': [ |
| 326 | + '<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)', |
| 327 | + '<(march)', |
| 328 | + ], |
| 329 | + 'default_configuration': 'Release', |
| 330 | + 'configurations': { |
| 331 | + 'Release': {}, |
| 332 | + 'Debug': {}, |
| 333 | + }, |
| 334 | + }] |
| 335 | + ] |
257 | 336 | }, |
258 | 337 | ], |
259 | 338 | 'conditions': [ |
|
323 | 402 | }, # target appshell_helper_app |
324 | 403 | ], |
325 | 404 | }], # OS=="mac" |
| 405 | + ['target_arch=="ia32"', { |
| 406 | + 'variables': { |
| 407 | + 'output_bfd': 'elf32-i386', |
| 408 | + 'march': '-m32', |
| 409 | + }, |
| 410 | + }], |
| 411 | + ['target_arch=="x64"', { |
| 412 | + 'variables': { |
| 413 | + 'output_bfd': 'elf64-x86-64', |
| 414 | + 'march': '-m64', |
| 415 | + }, |
| 416 | + }], |
| 417 | + ['target_arch=="environment"', { |
| 418 | + 'variables': { |
| 419 | + 'output_bfd': '<!(uname -m | sed "s/x86_64/elf64-x86-64/;s/i.86/elf32-i386/")', |
| 420 | + 'march': ' ', |
| 421 | + }, |
| 422 | + }], |
326 | 423 | ], |
327 | 424 | } |
0 commit comments