]> git.donarmstrong.com Git - qmk_firmware.git/blob - tmk_core/rules.mk
Add ChibiOS support for QMK (#465)
[qmk_firmware.git] / tmk_core / rules.mk
1 # Hey Emacs, this is a -*- makefile -*-
2 #----------------------------------------------------------------------------
3 # WinAVR Makefile Template written by Eric B. Weddington, Jg Wunsch, et al.
4 #
5 # Released to the Public Domain
6 #
7 # Additional material for this makefile was written by:
8 # Peter Fleury
9 # Tim Henigan
10 # Colin O'Flynn
11 # Reiner Patommel
12 # Markus Pfaff
13 # Sander Pool
14 # Frederik Rouleau
15 # Carlos Lamas
16 #
17
18
19
20 # Output format. (can be srec, ihex, binary)
21 FORMAT = ihex
22
23 # Optimization level, can be [0, 1, 2, 3, s].
24 #     0 = turn off optimization. s = optimize for size.
25 #     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
26 OPT = s
27
28 COLOR ?= true
29
30 ifeq ($(COLOR),true)
31         NO_COLOR=\033[0m
32         OK_COLOR=\033[32;01m
33         ERROR_COLOR=\033[31;01m
34         WARN_COLOR=\033[33;01m
35         BLUE=\033[0;34m
36         BOLD=\033[1m
37 endif
38
39 ifdef quick
40         QUICK = $(quick)
41 endif
42
43 QUICK ?= false
44 AUTOGEN ?= false
45
46 ifneq ($(shell awk --version 2>/dev/null),)
47         AWK=awk
48 else
49         AWK=cat && test
50 endif
51
52 OK_STRING=$(OK_COLOR)[OK]$(NO_COLOR)\n
53 ERROR_STRING=$(ERROR_COLOR)[ERRORS]$(NO_COLOR)\n
54 WARN_STRING=$(WARN_COLOR)[WARNINGS]$(NO_COLOR)\n
55
56 ifndef $(SILENT)
57         SILENT = false
58 endif
59
60 TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }'
61 TAB_LOG_PLAIN = printf "$$LOG\n"
62 AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }'
63 AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }'
64 PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && false
65 PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG)
66 PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && false && break
67 PRINT_WARNING_PLAIN = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN)
68 PRINT_OK = $(SILENT) || printf " $(OK_STRING)" | $(AWK_STATUS)
69 BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING); else $(PRINT_OK); fi;
70
71 # List any extra directories to look for include files here.
72 #     Each directory must be seperated by a space.
73 #     Use forward slashes for directory separators.
74 #     For a directory that has spaces, enclose it in quotes.
75 EXTRAINCDIRS += $(subst :, ,$(VPATH))
76
77
78 # Compiler flag to set the C Standard level.
79 #     c89   = "ANSI" C
80 #     gnu89 = c89 plus GCC extensions
81 #     c99   = ISO C99 standard (not yet fully implemented)
82 #     gnu99 = c99 plus GCC extensions
83 CSTANDARD = -std=gnu99
84
85
86 # Place -D or -U options here for C sources
87 CDEFS += $(OPT_DEFS)
88
89
90 # Place -D or -U options here for ASM sources
91 ADEFS += $(OPT_DEFS)
92
93
94 # Place -D or -U options here for C++ sources
95 #CPPDEFS += -D__STDC_LIMIT_MACROS
96 #CPPDEFS += -D__STDC_CONSTANT_MACROS
97 CPPDEFS += $(OPT_DEFS)
98
99
100
101 #---------------- Compiler Options C ----------------
102 #  -g*:          generate debugging information
103 #  -O*:          optimization level
104 #  -f...:        tuning, see GCC manual and avr-libc documentation
105 #  -Wall...:     warning level
106 #  -Wa,...:      tell GCC to pass this to the assembler.
107 #    -adhlns...: create assembler listing
108 CFLAGS += -g$(DEBUG)
109 CFLAGS += $(CDEFS)
110 CFLAGS += -O$(OPT)
111 # add color
112 ifeq ($(COLOR),true)
113 ifeq ("$(shell echo "int main(){}" | $(CC) -fdiagnostics-color -x c - -o /dev/null 2>&1)", "")
114         CFLAGS+= -fdiagnostics-color
115 endif
116 endif
117 CFLAGS += -Wall
118 CFLAGS += -Wstrict-prototypes
119 #CFLAGS += -mshort-calls
120 #CFLAGS += -fno-unit-at-a-time
121 #CFLAGS += -Wundef
122 #CFLAGS += -Wunreachable-code
123 #CFLAGS += -Wsign-compare
124 CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
125 CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
126 CFLAGS += $(CSTANDARD)
127 ifdef CONFIG_H
128     CFLAGS += -include $(CONFIG_H)
129 endif
130
131
132 #---------------- Compiler Options C++ ----------------
133 #  -g*:          generate debugging information
134 #  -O*:          optimization level
135 #  -f...:        tuning, see GCC manual and avr-libc documentation
136 #  -Wall...:     warning level
137 #  -Wa,...:      tell GCC to pass this to the assembler.
138 #    -adhlns...: create assembler listing
139 CPPFLAGS += -g$(DEBUG)
140 CPPFLAGS += $(CPPDEFS)
141 CPPFLAGS += -O$(OPT)
142 # to supress "warning: only initialized variables can be placed into program memory area"
143 CPPFLAGS += -w
144 CPPFLAGS += -Wall
145 CPPFLAGS += -Wundef
146 #CPPFLAGS += -mshort-calls
147 #CPPFLAGS += -fno-unit-at-a-time
148 #CPPFLAGS += -Wstrict-prototypes
149 #CPPFLAGS += -Wunreachable-code
150 #CPPFLAGS += -Wsign-compare
151 CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
152 CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
153 #CPPFLAGS += $(CSTANDARD)
154 ifdef CONFIG_H
155     CPPFLAGS += -include $(CONFIG_H)
156 endif
157
158
159 #---------------- Assembler Options ----------------
160 #  -Wa,...:   tell GCC to pass this to the assembler.
161 #  -adhlns:   create listing
162 #  -gstabs:   have the assembler create line number information; note that
163 #             for use in COFF files, additional information about filenames
164 #             and function names needs to be present in the assembler source
165 #             files -- see avr-libc docs [FIXME: not yet described there]
166 #  -listing-cont-lines: Sets the maximum number of continuation lines of hex
167 #       dump that will be displayed for a given single line of source input.
168 ASFLAGS += $(ADEFS) -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
169 ASFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
170 ifdef CONFIG_H
171     ASFLAGS += -include $(CONFIG_H)
172 endif
173
174 #---------------- Library Options ----------------
175 # Minimalistic printf version
176 PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
177
178 # Floating point printf version (requires MATH_LIB = -lm below)
179 PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
180
181 # If this is left blank, then it will use the Standard printf version.
182 PRINTF_LIB =
183 #PRINTF_LIB = $(PRINTF_LIB_MIN)
184 #PRINTF_LIB = $(PRINTF_LIB_FLOAT)
185
186
187 # Minimalistic scanf version
188 SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
189
190 # Floating point + %[ scanf version (requires MATH_LIB = -lm below)
191 SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
192
193 # If this is left blank, then it will use the Standard scanf version.
194 SCANF_LIB =
195 #SCANF_LIB = $(SCANF_LIB_MIN)
196 #SCANF_LIB = $(SCANF_LIB_FLOAT)
197
198
199 MATH_LIB = -lm
200
201
202 #---------------- Linker Options ----------------
203 #  -Wl,...:     tell GCC to pass this to linker.
204 #    -Map:      create map file
205 #    --cref:    add cross reference to  map file
206 #
207 # Comennt out "--relax" option to avoid a error such:
208 #       (.vectors+0x30): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_12'
209 #
210 LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
211 #LDFLAGS += -Wl,--relax
212 LDFLAGS += $(EXTMEMOPTS)
213 LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
214 LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
215 #LDFLAGS += -T linker_script.x
216 # You can give EXTRALDFLAGS at 'make' command line.
217 LDFLAGS += $(EXTRALDFLAGS)
218
219 # Define programs and commands.
220 SHELL = sh
221 REMOVE = rm -f
222 REMOVEDIR = rmdir
223 COPY = cp
224 WINSHELL = cmd
225 SECHO = $(SILENT) || echo
226
227 # Define Messages
228 # English
229 MSG_ERRORS_NONE = Errors: none
230 MSG_BEGIN = -------- begin --------
231 MSG_END = --------  end  --------
232 MSG_SIZE_BEFORE = Size before:
233 MSG_SIZE_AFTER = Size after:
234 MSG_COFF = Converting to AVR COFF:
235 MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
236 MSG_FLASH = Creating load file for Flash:
237 MSG_EEPROM = Creating load file for EEPROM:
238 MSG_EXTENDED_LISTING = Creating Extended Listing:
239 MSG_SYMBOL_TABLE = Creating Symbol Table:
240 MSG_LINKING = Linking:
241 MSG_COMPILING = Compiling:
242 MSG_COMPILING_CPP = Compiling:
243 MSG_ASSEMBLING = Assembling:
244 MSG_CLEANING = Cleaning project:
245 MSG_CREATING_LIBRARY = Creating library:
246
247
248 # Define all object files.
249 OBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(patsubst %.cpp,$(OBJDIR)/%.o,$(patsubst %.S,$(OBJDIR)/%.o,$(SRC))))
250
251 # Define all listing files.
252 LST = $(patsubst %.c,$(OBJDIR)/%.lst,$(patsubst %.cpp,$(OBJDIR)/%.lst,$(patsubst %.S,$(OBJDIR)/%.lst,$(SRC))))
253
254
255 # Compiler flags to generate dependency files.
256 #GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
257 GENDEPFLAGS = -MMD -MP -MF $(BUILD_DIR)/.dep/$(subst /,_,$@).d
258
259
260 # Combine all necessary flags and optional flags.
261 # Add target processor to flags.
262 # You can give extra flags at 'make' command line like: make EXTRAFLAGS=-DFOO=bar
263 ALL_CFLAGS = $(MCUFLAGS) $(CFLAGS) $(GENDEPFLAGS) $(EXTRAFLAGS)
264 ALL_CPPFLAGS = $(MCUFLAGS) -x c++ $(CPPFLAGS) $(GENDEPFLAGS) $(EXTRAFLAGS)
265 ALL_ASFLAGS = $(MCUFLAGS) -x assembler-with-cpp $(ASFLAGS) $(EXTRAFLAGS)
266
267 # Default target.
268 all:
269         @$(MAKE) begin
270         @$(MAKE) gccversion
271         @$(MAKE) sizebefore
272         @$(MAKE) clean_list # force clean each time
273         @$(MAKE) build
274         @$(MAKE) sizeafter
275         @$(MAKE) end
276
277 # Quick make that doesn't clean
278 quick:
279         @$(MAKE) begin
280         @$(MAKE) gccversion
281         @$(MAKE) sizebefore
282         @$(MAKE) build
283         @$(MAKE) sizeafter
284         @$(MAKE) end
285
286 # Change the build target to build a HEX file or a library.
287 build: elf hex
288 #build: elf hex eep lss sym
289 #build: lib
290
291
292 elf: $(BUILD_DIR)/$(TARGET).elf
293 hex: $(BUILD_DIR)/$(TARGET).hex
294 eep: $(BUILD_DIR)/$(TARGET).eep
295 lss: $(BUILD_DIR)/$(TARGET).lss
296 sym: $(BUILD_DIR)/$(TARGET).sym
297 LIBNAME=lib$(TARGET).a
298 lib: $(LIBNAME)
299
300
301
302 # Eye candy.
303 # AVR Studio 3.x does not check make's exit code but relies on
304 # the following magic strings to be generated by the compile job.
305 begin:
306         @$(SECHO) $(MSG_BEGIN)
307
308 end:
309         @$(SECHO) $(MSG_END)
310
311
312 # Display size of file.
313 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
314 #ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
315 ELFSIZE = $(SIZE) $(BUILD_DIR)/$(TARGET).elf
316
317 sizebefore:
318         @if test -f $(TARGET).hex; then $(SECHO) $(MSG_SIZE_BEFORE); $(SILENT) || $(HEXSIZE); \
319         2>/dev/null; $(SECHO); fi
320
321 sizeafter:
322         @if test -f $(TARGET).hex; then $(SECHO); $(SECHO) $(MSG_SIZE_AFTER); $(SILENT) || $(HEXSIZE); \
323         2>/dev/null; $(SECHO); fi
324         # test file sizes eventually
325         # @if [[ $($(SIZE) --target=$(FORMAT) $(TARGET).hex | $(AWK) 'NR==2 {print "0x"$5}') -gt 0x200 ]]; then $(SECHO) "File is too big!"; fi
326
327 # Display compiler version information.
328 gccversion :
329         @$(SILENT) || $(CC) --version
330
331 # Create final output files (.hex, .eep) from ELF output file.
332 %.hex: %.elf
333         @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD)
334         $(eval CMD=$(HEX) $< $@)
335         @$(BUILD_CMD)
336         @if $(AUTOGEN); then \
337                 $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/$(KEYBOARD)_$(KEYMAP).hex\n"; \
338                 $(COPY) $@ $(KEYMAP_PATH)/$(KEYBOARD)_$(KEYMAP).hex; \
339         else \
340                 $(COPY) $@ $(TARGET).hex; \
341         fi
342
343 %.eep: %.elf
344         @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD)
345         $(eval CMD=$(EEP) $< $@ || exit 0)
346         @$(BUILD_CMD)
347
348 # Create extended listing file from ELF output file.
349 %.lss: %.elf
350         @$(SILENT) || printf "$(MSG_EXTENDED_LISTING) $@" | $(AWK_CMD)
351         $(eval CMD=$(OBJDUMP) -h -S -z $< > $@)
352         @$(BUILD_CMD)
353
354 # Create a symbol table from ELF output file.
355 %.sym: %.elf
356         @$(SILENT) || printf "$(MSG_SYMBOL_TABLE) $@" | $(AWK_CMD)
357         $(eval CMD=$(NM) -n $< > $@ )
358         @$(BUILD_CMD)
359
360 # Create library from object files.
361 .SECONDARY : $(BUILD_DIR)/$(TARGET).a
362 .PRECIOUS : $(OBJ)
363 %.a: $(OBJ)
364         @$(SILENT) || printf "$(MSG_CREATING_LIBRARY) $@" | $(AWK_CMD)
365         $(eval CMD=$(AR) $@ $(OBJ) )
366         @$(BUILD_CMD)
367
368 # Link: create ELF output file from object files.
369 .SECONDARY : $(BUILD_DIR)/$(TARGET).elf
370 .PRECIOUS : $(OBJ)
371 %.elf: $(OBJ)
372         @$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD)
373         $(eval CMD=$(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS))
374         @$(BUILD_CMD)
375
376 # Compile: create object files from C source files.
377 $(OBJDIR)/%.o : %.c
378         @mkdir -p $(@D)
379         @$(SILENT) || printf "$(MSG_COMPILING) $<" | $(AWK_CMD)
380         $(eval CMD=$(CC) -c $(ALL_CFLAGS) $< -o $@)
381         @$(BUILD_CMD)
382
383 # Compile: create object files from C++ source files.
384 $(OBJDIR)/%.o : %.cpp
385         @mkdir -p $(@D)
386         @$(SILENT) || printf "$(MSG_COMPILING_CPP) $<" | $(AWK_CMD)
387         $(eval CMD=$(CC) -c $(ALL_CPPFLAGS) $< -o $@)
388         @$(BUILD_CMD)
389
390 # Compile: create assembler files from C source files.
391 %.s : %.c
392         @$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
393         $(eval CMD=$(CC) -S $(ALL_CFLAGS) $< -o $@)
394         @$(BUILD_CMD)
395
396 # Compile: create assembler files from C++ source files.
397 %.s : %.cpp
398         @$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
399         $(eval CMD=$(CC) -S $(ALL_CPPFLAGS) $< -o $@)
400         @$(BUILD_CMD)
401
402 # Assemble: create object files from assembler source files.
403 $(OBJDIR)/%.o : %.S
404         @mkdir -p $(@D)
405         @$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
406         $(eval CMD=$(CC) -c $(ALL_ASFLAGS) $< -o $@)
407         @$(BUILD_CMD)
408
409 # Create preprocessed source for use in sending a bug report.
410 %.i : %.c
411         $(CC) -E -mmcu=$(MCU) $(CFLAGS) $< -o $@
412
413 # Target: clean project.
414 clean: begin clean_list end
415
416 clean_list :
417         @$(REMOVE) -r $(BUILD_DIR)
418         @$(REMOVE) -r $(TOP_DIR)/$(BUILD_DIR)
419         @$(REMOVE) -r $(KEYBOARD_PATH)/$(BUILD_DIR)
420         @if $$SUBPROJECT; then $(REMOVE) -r $(SUBPROJECT_PATH)/$(BUILD_DIR); fi
421         @$(REMOVE) -r $(KEYMAP_PATH)/$(BUILD_DIR)
422
423 show_path:
424         @echo VPATH=$(VPATH)
425         @echo SRC=$(SRC)
426
427 SUBDIRS := $(filter-out %/util/ %/doc/ %/keymaps/ %/old_keymap_files/,$(dir $(wildcard $(TOP_DIR)/keyboards/**/*/Makefile)))
428 SUBDIRS := $(SUBDIRS) $(dir $(wildcard $(TOP_DIR)/keyboards/*/.))
429 SUBDIRS := $(sort $(SUBDIRS))
430 # $(error $(SUBDIRS))
431 all-keyboards-defaults-%:
432         @for x in $(SUBDIRS) ; do \
433                 printf "Compiling with default: $$x" | $(AWK_CMD); \
434                 LOG=$$($(MAKE) -C $$x $(subst all-keyboards-defaults-,,$@) VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR_PLAIN); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING_PLAIN); else $(PRINT_OK); fi; \
435         done
436
437 all-keyboards-defaults: all-keyboards-defaults-all
438
439 KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboards/%/=/keyboards/%)
440 all-keyboards-all: $(addsuffix -all,$(KEYBOARDS))
441 all-keyboards-quick: $(addsuffix -quick,$(KEYBOARDS))
442 all-keyboards-clean: $(addsuffix -clean,$(KEYBOARDS))
443 all-keyboards: all-keyboards-all
444
445 define make_keyboard
446 $(eval KEYBOARD=$(patsubst /keyboards/%,%,$1))
447 $(eval SUBPROJECT=$(lastword $(subst /, ,$(KEYBOARD))))
448 $(eval KEYBOARD=$(firstword $(subst /, ,$(KEYBOARD))))
449 $(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboards/$(KEYBOARD)/keymaps/*/.))))
450 $(eval KEYMAPS+=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboards/$(KEYBOARD)/$(SUBPROJECT)/keymaps/*/.))))
451 @for x in $(KEYMAPS) ; do \
452         printf "Compiling $(BOLD)$(KEYBOARD)/$(SUBPROJECT)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-118s", $$0; }'; \
453         LOG=$$($(MAKE) -C $(TOP_DIR)$1 $2 keymap=$$x VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR_PLAIN); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING_PLAIN); else $(PRINT_OK); fi; \
454 done
455 endef
456
457 define make_keyboard_helper
458 # Just remove the -quick, -all and so on from the first argument and pass it forward
459 $(call make_keyboard,$(subst -$2,,$1),$2)
460 endef
461
462 /keyboards/%-quick:
463         $(call make_keyboard_helper,$@,quick)
464 /keyboards/%-all:
465         $(call make_keyboard_helper,$@,all)
466 /keyboards/%-clean:
467         $(call make_keyboard_helper,$@,clean)
468 /keyboards/%:
469         $(call make_keyboard_helper,$@,all)
470
471 all-keymaps-%:
472         $(eval MAKECONFIG=$(call get_target,all-keymaps,$@))
473         $(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboards/$(KEYBOARD)/keymaps/*/.))))
474         @for x in $(KEYMAPS) ; do \
475                 printf "Compiling $(BOLD)$(KEYBOARD)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-118s", $$0; }'; \
476                 LOG=$$($(MAKE) $(subst all-keymaps-,,$@) keyboard=$(KEYBOARD) keymap=$$x VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR_PLAIN); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING_PLAIN); else $(PRINT_OK); fi; \
477         done
478
479 all-keymaps: all-keymaps-all
480
481 # Create build directory
482 $(shell mkdir $(BUILD_DIR) 2>/dev/null)
483
484 # Create object files directory
485 $(shell mkdir $(OBJDIR) 2>/dev/null)
486
487
488 # Include the dependency files.
489 -include $(shell mkdir $(BUILD_DIR)/.dep 2>/dev/null) $(wildcard $(BUILD_DIR)/.dep/*)
490
491
492 # Listing of phony targets.
493 .PHONY : all quick begin finish end sizebefore sizeafter gccversion \
494 build elf hex eep lss sym coff extcoff \
495 clean clean_list debug gdb-config show_path \
496 program teensy dfu flip dfu-ee flip-ee dfu-start \
497 all-keyboards-defaults all-keyboards all-keymaps \
498 all-keyboards-defaults-% all-keyboards-% all-keymaps-%