diff options
Diffstat (limited to 'tmk_core/rules.mk')
| -rw-r--r-- | tmk_core/rules.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index c81fa6854..f6819d7c3 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
| @@ -15,6 +15,16 @@ | |||
| 15 | # Carlos Lamas | 15 | # Carlos Lamas |
| 16 | # | 16 | # |
| 17 | 17 | ||
| 18 | # Enable vpath seraching for source files only | ||
| 19 | # Without this, output files, could be read from the wrong .build directories | ||
| 20 | VPATH_SRC := $(VPATH) | ||
| 21 | vpath %.c $(VPATH_SRC) | ||
| 22 | vpath %.h $(VPATH_SRC) | ||
| 23 | vpath %.cpp $(VPATH_SRC) | ||
| 24 | vpath %.hpp $(VPATH_SRC) | ||
| 25 | vpath %.S $(VPATH_SRC) | ||
| 26 | VPATH := | ||
| 27 | |||
| 18 | 28 | ||
| 19 | # Output format. (can be srec, ihex, binary) | 29 | # Output format. (can be srec, ihex, binary) |
| 20 | FORMAT = ihex | 30 | FORMAT = ihex |
| @@ -71,7 +81,7 @@ BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [ | |||
| 71 | # Each directory must be seperated by a space. | 81 | # Each directory must be seperated by a space. |
| 72 | # Use forward slashes for directory separators. | 82 | # Use forward slashes for directory separators. |
| 73 | # For a directory that has spaces, enclose it in quotes. | 83 | # For a directory that has spaces, enclose it in quotes. |
| 74 | EXTRAINCDIRS += $(subst :, ,$(VPATH)) | 84 | EXTRAINCDIRS += $(subst :, ,$(VPATH_SRC)) |
| 75 | 85 | ||
| 76 | 86 | ||
| 77 | # Compiler flag to set the C Standard level. | 87 | # Compiler flag to set the C Standard level. |
