]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Enable vpath seraching for source files only
authorFred Sundvik <fsundvik@gmail.com>
Sun, 31 Jul 2016 10:24:25 +0000 (13:24 +0300)
committerFred Sundvik <fsundvik@gmail.com>
Sun, 31 Jul 2016 10:24:25 +0000 (13:24 +0300)
tmk_core/rules.mk

index c81fa685415ebac6652b92e428822cd0e21381a3..f6819d7c31af96f9338142ed47f34b81c1d42a0a 100644 (file)
 # Carlos Lamas
 #
 
+# Enable vpath seraching for source files only
+# Without this, output files, could be read from the wrong .build directories
+VPATH_SRC := $(VPATH)
+vpath %.c $(VPATH_SRC)
+vpath %.h $(VPATH_SRC)
+vpath %.cpp $(VPATH_SRC)
+vpath %.hpp $(VPATH_SRC)
+vpath %.S $(VPATH_SRC)
+VPATH :=
+
 
 # Output format. (can be srec, ihex, binary)
 FORMAT = ihex
@@ -71,7 +81,7 @@ BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [
 #     Each directory must be seperated by a space.
 #     Use forward slashes for directory separators.
 #     For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS += $(subst :, ,$(VPATH))
+EXTRAINCDIRS += $(subst :, ,$(VPATH_SRC))
 
 
 # Compiler flag to set the C Standard level.