| OLD | NEW |
| 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # The yasm build process creates a slew of small C subprograms that | 5 # The yasm build process creates a slew of small C subprograms that |
| 6 # dynamically generate files at various point in the build process. This makes | 6 # dynamically generate files at various point in the build process. This makes |
| 7 # the build integration moderately complex. | 7 # the build integration moderately complex. |
| 8 # | 8 # |
| 9 # There are three classes of dynamically generated files: | 9 # There are three classes of dynamically generated files: |
| 10 # 1) C source files that should be included in the build (eg., lc3bid.c) | 10 # 1) C source files that should be included in the build (eg., lc3bid.c) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 'generated_dir': '<(INTERMEDIATE_DIR)/third_party/yasm', | 53 'generated_dir': '<(INTERMEDIATE_DIR)/third_party/yasm', |
| 54 | 54 |
| 55 # Various files referenced by multiple targets. | 55 # Various files referenced by multiple targets. |
| 56 'version_file': 'version.mac', # Generated by genversion. | 56 'version_file': 'version.mac', # Generated by genversion. |
| 57 'genmodule_source': 'genmodule_outfile.c', | 57 'genmodule_source': 'genmodule_outfile.c', |
| 58 }, | 58 }, |
| 59 'targets': [ | 59 'targets': [ |
| 60 { | 60 { |
| 61 'target_name': 'yasm', | 61 'target_name': 'yasm', |
| 62 'type': 'executable', | 62 'type': 'executable', |
| 63 'toolsets': ['host'], |
| 63 'dependencies': [ | 64 'dependencies': [ |
| 64 'config_sources', | 65 'config_sources', |
| 65 'genmacro', | 66 'genmacro', |
| 66 'genmodule', | 67 'genmodule', |
| 67 'genperf', | 68 'genperf', |
| 68 'genperf_libs', | 69 'genperf_libs', |
| 69 'generate_files', # Needed to generate gperf and instruction files. | 70 'generate_files', # Needed to generate gperf and instruction files. |
| 70 'genstring', | 71 'genstring', |
| 71 're2c', | 72 're2c', |
| 72 ], | 73 ], |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 '<(outfile)' | 331 '<(outfile)' |
| 331 ], | 332 ], |
| 332 'process_outputs_as_sources': 1, | 333 'process_outputs_as_sources': 1, |
| 333 'message': 'Generating yasm module information.', | 334 'message': 'Generating yasm module information.', |
| 334 }, | 335 }, |
| 335 ], | 336 ], |
| 336 }, | 337 }, |
| 337 { | 338 { |
| 338 'target_name': 'config_sources', | 339 'target_name': 'config_sources', |
| 339 'type': 'none', | 340 'type': 'none', |
| 341 'toolsets': ['host'], |
| 340 'sources': [ | 342 'sources': [ |
| 341 'source/config/<(OS)/Makefile', | 343 'source/config/<(OS)/Makefile', |
| 342 'source/config/<(OS)/config.h', | 344 'source/config/<(OS)/config.h', |
| 343 'source/config/<(OS)/libyasm-stdint.h', | 345 'source/config/<(OS)/libyasm-stdint.h', |
| 344 ], | 346 ], |
| 345 }, | 347 }, |
| 346 { | 348 { |
| 347 'target_name': 'generate_files', | 349 'target_name': 'generate_files', |
| 348 'type': 'none', | 350 'type': 'none', |
| 351 'toolsets': ['host'], |
| 349 'dependencies': [ | 352 'dependencies': [ |
| 350 'genperf', | 353 'genperf', |
| 351 'genversion', | 354 'genversion', |
| 352 ], | 355 ], |
| 353 'sources': [ | 356 'sources': [ |
| 354 'source/patched-yasm/modules/arch/x86/x86cpu.gperf', | 357 'source/patched-yasm/modules/arch/x86/x86cpu.gperf', |
| 355 'source/patched-yasm/modules/arch/x86/x86regtmod.gperf', | 358 'source/patched-yasm/modules/arch/x86/x86regtmod.gperf', |
| 356 ], | 359 ], |
| 357 'rules': [ | 360 'rules': [ |
| 358 { | 361 { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 ], | 403 ], |
| 401 'message': 'Generating yasm version file: ' | 404 'message': 'Generating yasm version file: ' |
| 402 '<(shared_generated_dir)/<(version_file).', | 405 '<(shared_generated_dir)/<(version_file).', |
| 403 'process_outputs_as_sources': 0, | 406 'process_outputs_as_sources': 0, |
| 404 }, | 407 }, |
| 405 ], | 408 ], |
| 406 }, | 409 }, |
| 407 { | 410 { |
| 408 'target_name': 'genperf_libs', | 411 'target_name': 'genperf_libs', |
| 409 'type': 'static_library', | 412 'type': 'static_library', |
| 413 'toolsets': ['host'], |
| 410 'dependencies': [ 'config_sources', ], | 414 'dependencies': [ 'config_sources', ], |
| 411 'sources': [ | 415 'sources': [ |
| 412 'source/patched-yasm/libyasm/phash.c', | 416 'source/patched-yasm/libyasm/phash.c', |
| 413 'source/patched-yasm/libyasm/xmalloc.c', | 417 'source/patched-yasm/libyasm/xmalloc.c', |
| 414 'source/patched-yasm/libyasm/xstrdup.c', | 418 'source/patched-yasm/libyasm/xstrdup.c', |
| 415 ], | 419 ], |
| 416 'include_dirs': [ | 420 'include_dirs': [ |
| 417 '<@(yasm_include_dirs)', | 421 '<@(yasm_include_dirs)', |
| 418 ], | 422 ], |
| 419 'defines': [ '<@(yasm_defines)' ], | 423 'defines': [ '<@(yasm_defines)' ], |
| 420 'cflags': [ | 424 'cflags': [ |
| 421 '<@(yasm_cflags)', | 425 '<@(yasm_cflags)', |
| 422 ], | 426 ], |
| 423 }, | 427 }, |
| 424 { | 428 { |
| 425 'target_name': 'genstring', | 429 'target_name': 'genstring', |
| 426 'type': 'executable', | 430 'type': 'executable', |
| 431 'toolsets': ['host'], |
| 427 'dependencies': [ 'config_sources', ], | 432 'dependencies': [ 'config_sources', ], |
| 428 'sources': [ | 433 'sources': [ |
| 429 'source/patched-yasm/genstring.c', | 434 'source/patched-yasm/genstring.c', |
| 430 ], | 435 ], |
| 431 'include_dirs': [ | 436 'include_dirs': [ |
| 432 '<@(yasm_include_dirs)', | 437 '<@(yasm_include_dirs)', |
| 433 ], | 438 ], |
| 434 'cflags': [ | 439 'cflags': [ |
| 435 '-std=gnu99', | 440 '-std=gnu99', |
| 436 ], | 441 ], |
| 437 }, | 442 }, |
| 438 { | 443 { |
| 439 'target_name': 'genperf', | 444 'target_name': 'genperf', |
| 440 'type': 'executable', | 445 'type': 'executable', |
| 446 'toolsets': ['host'], |
| 441 'dependencies': [ | 447 'dependencies': [ |
| 442 'genperf_libs', | 448 'genperf_libs', |
| 443 ], | 449 ], |
| 444 'sources': [ | 450 'sources': [ |
| 445 'source/patched-yasm/tools/genperf/genperf.c', | 451 'source/patched-yasm/tools/genperf/genperf.c', |
| 446 'source/patched-yasm/tools/genperf/perfect.c', | 452 'source/patched-yasm/tools/genperf/perfect.c', |
| 447 ], | 453 ], |
| 448 'include_dirs': [ | 454 'include_dirs': [ |
| 449 '<@(yasm_include_dirs)', | 455 '<@(yasm_include_dirs)', |
| 450 ], | 456 ], |
| 451 'cflags': [ | 457 'cflags': [ |
| 452 '-std=gnu99', | 458 '-std=gnu99', |
| 453 ], | 459 ], |
| 454 }, | 460 }, |
| 455 { | 461 { |
| 456 'target_name': 'genmacro', | 462 'target_name': 'genmacro', |
| 457 'type': 'executable', | 463 'type': 'executable', |
| 464 'toolsets': ['host'], |
| 458 'dependencies': [ 'config_sources', ], | 465 'dependencies': [ 'config_sources', ], |
| 459 'sources': [ | 466 'sources': [ |
| 460 'source/patched-yasm/tools/genmacro/genmacro.c', | 467 'source/patched-yasm/tools/genmacro/genmacro.c', |
| 461 ], | 468 ], |
| 462 'include_dirs': [ | 469 'include_dirs': [ |
| 463 '<@(yasm_include_dirs)', | 470 '<@(yasm_include_dirs)', |
| 464 ], | 471 ], |
| 465 'cflags': [ | 472 'cflags': [ |
| 466 '-std=gnu99', | 473 '-std=gnu99', |
| 467 ], | 474 ], |
| 468 }, | 475 }, |
| 469 { | 476 { |
| 470 'target_name': 'genversion', | 477 'target_name': 'genversion', |
| 471 'type': 'executable', | 478 'type': 'executable', |
| 479 'toolsets': ['host'], |
| 472 'dependencies': [ 'config_sources', ], | 480 'dependencies': [ 'config_sources', ], |
| 473 'sources': [ | 481 'sources': [ |
| 474 'source/patched-yasm/modules/preprocs/nasm/genversion.c', | 482 'source/patched-yasm/modules/preprocs/nasm/genversion.c', |
| 475 ], | 483 ], |
| 476 'include_dirs': [ | 484 'include_dirs': [ |
| 477 '<@(yasm_include_dirs)', | 485 '<@(yasm_include_dirs)', |
| 478 ], | 486 ], |
| 479 'cflags': [ | 487 'cflags': [ |
| 480 '-std=gnu99', | 488 '-std=gnu99', |
| 481 ], | 489 ], |
| 482 }, | 490 }, |
| 483 { | 491 { |
| 484 'target_name': 're2c', | 492 'target_name': 're2c', |
| 485 'type': 'executable', | 493 'type': 'executable', |
| 494 'toolsets': ['host'], |
| 486 'dependencies': [ 'config_sources', ], | 495 'dependencies': [ 'config_sources', ], |
| 487 'sources': [ | 496 'sources': [ |
| 488 'source/patched-yasm/tools/re2c/main.c', | 497 'source/patched-yasm/tools/re2c/main.c', |
| 489 'source/patched-yasm/tools/re2c/code.c', | 498 'source/patched-yasm/tools/re2c/code.c', |
| 490 'source/patched-yasm/tools/re2c/dfa.c', | 499 'source/patched-yasm/tools/re2c/dfa.c', |
| 491 'source/patched-yasm/tools/re2c/parser.c', | 500 'source/patched-yasm/tools/re2c/parser.c', |
| 492 'source/patched-yasm/tools/re2c/actions.c', | 501 'source/patched-yasm/tools/re2c/actions.c', |
| 493 'source/patched-yasm/tools/re2c/scanner.c', | 502 'source/patched-yasm/tools/re2c/scanner.c', |
| 494 'source/patched-yasm/tools/re2c/mbo_getopt.c', | 503 'source/patched-yasm/tools/re2c/mbo_getopt.c', |
| 495 'source/patched-yasm/tools/re2c/substr.c', | 504 'source/patched-yasm/tools/re2c/substr.c', |
| 496 'source/patched-yasm/tools/re2c/translate.c', | 505 'source/patched-yasm/tools/re2c/translate.c', |
| 497 ], | 506 ], |
| 498 'include_dirs': [ | 507 'include_dirs': [ |
| 499 '<@(yasm_include_dirs)', | 508 '<@(yasm_include_dirs)', |
| 500 ], | 509 ], |
| 501 'cflags': [ | 510 'cflags': [ |
| 502 '-std=gnu99', | 511 '-std=gnu99', |
| 503 ], | 512 ], |
| 504 }, | 513 }, |
| 505 { | 514 { |
| 506 'target_name': 'genmodule', | 515 'target_name': 'genmodule', |
| 507 'type': 'executable', | 516 'type': 'executable', |
| 517 'toolsets': ['host'], |
| 508 'dependencies': [ | 518 'dependencies': [ |
| 509 'config_sources', | 519 'config_sources', |
| 510 ], | 520 ], |
| 511 'sources': [ | 521 'sources': [ |
| 512 'source/patched-yasm/libyasm/genmodule.c', | 522 'source/patched-yasm/libyasm/genmodule.c', |
| 513 ], | 523 ], |
| 514 'include_dirs': [ | 524 'include_dirs': [ |
| 515 '<@(yasm_include_dirs)', | 525 '<@(yasm_include_dirs)', |
| 516 | 526 |
| 517 ], | 527 ], |
| 518 'cflags': [ | 528 'cflags': [ |
| 519 '-std=gnu99', | 529 '-std=gnu99', |
| 520 ], | 530 ], |
| 521 }, | 531 }, |
| 522 ], | 532 ], |
| 523 } | 533 } |
| 524 | 534 |
| 525 # Local Variables: | 535 # Local Variables: |
| 526 # tab-width:2 | 536 # tab-width:2 |
| 527 # indent-tabs-mode:nil | 537 # indent-tabs-mode:nil |
| 528 # End: | 538 # End: |
| 529 # vim: set expandtab tabstop=2 shiftwidth=2: | 539 # vim: set expandtab tabstop=2 shiftwidth=2: |
| OLD | NEW |