OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 # | 5 # |
6 # GNU Make based build file. For details on GNU Make see: | 6 # GNU Make based build file. For details on GNU Make see: |
7 # http://www.gnu.org/software/make/manual/make.html | 7 # http://www.gnu.org/software/make/manual/make.html |
8 # | 8 # |
9 | 9 |
10 # | 10 # |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 else | 372 else |
373 define LOG | 373 define LOG |
374 @echo " $(1) $(2)" && $(3) | 374 @echo " $(1) $(2)" && $(3) |
375 endef | 375 endef |
376 endif | 376 endif |
377 endif | 377 endif |
378 | 378 |
379 | 379 |
380 # | 380 # |
381 # Convert a source path to a object file path. | 381 # Convert a source path to a object file path. |
| 382 # If source path is absolute then just use the basename of for the object |
| 383 # file name (absolute sources paths with the same basename are not allowed). |
| 384 # For relative paths use the full path to the source in the object file path |
| 385 # name. |
382 # | 386 # |
383 # $1 = Source Name | 387 # $1 = Source Name |
384 # $2 = Arch suffix | 388 # $2 = Arch suffix |
385 # | 389 # |
386 define SRC_TO_OBJ | 390 define SRC_TO_OBJ |
387 $(OUTDIR)/$(basename $(subst ..,__,$(1)))$(2).o | 391 $(if $(filter /%,$(1)), $(OUTDIR)/$(basename $(notdir $(1)))$(2).o, $(OUTDIR)/$(
basename $(subst ..,__,$(1)))$(2).o) |
388 endef | 392 endef |
389 | 393 |
390 | 394 |
391 # | 395 # |
392 # Convert a source path to a dependency file path. | 396 # Convert a source path to a dependency file path. |
393 # We use the .deps extension for dependencies. These files are generated by | 397 # We use the .deps extension for dependencies. These files are generated by |
394 # fix_deps.py based on the .d files which gcc generates. We don't reference | 398 # fix_deps.py based on the .d files which gcc generates. We don't reference |
395 # the .d files directly so that we can avoid the the case where the compile | 399 # the .d files directly so that we can avoid the the case where the compile |
396 # failed but still generated a .d file (in that case the .d file would not | 400 # failed but still generated a .d file (in that case the .d file would not |
397 # be processed by fix_deps.py) | 401 # be processed by fix_deps.py) |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 # uppercase aliases (for backward compatibility) | 537 # uppercase aliases (for backward compatibility) |
534 .PHONY: CHECK_FOR_CHROME DEBUG LAUNCH RUN | 538 .PHONY: CHECK_FOR_CHROME DEBUG LAUNCH RUN |
535 CHECK_FOR_CHROME: check_for_chrome | 539 CHECK_FOR_CHROME: check_for_chrome |
536 DEBUG: debug | 540 DEBUG: debug |
537 LAUNCH: run | 541 LAUNCH: run |
538 RUN: run | 542 RUN: run |
539 | 543 |
540 endif # TOOLCHAIN is valid... | 544 endif # TOOLCHAIN is valid... |
541 | 545 |
542 endif # TOOLCHAIN=all | 546 endif # TOOLCHAIN=all |
OLD | NEW |