]> git.gir.st - tmk_keyboard.git/blob - Makefile.common
add audio controls from consumer page(HID)
[tmk_keyboard.git] / Makefile.common
1 # Hey Emacs, this is a -*- makefile -*-
2 #----------------------------------------------------------------------------
3 # WinAVR Makefile Template written by Eric B. Weddington, Jörg 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 # On command line:
19 #
20 # make all = Make software.
21 #
22 # make clean = Clean out built project files.
23 #
24 # make coff = Convert ELF to AVR COFF.
25 #
26 # make extcoff = Convert ELF to AVR Extended COFF.
27 #
28 # make program = Download the hex file to the device, using avrdude.
29 # Please customize the avrdude settings below first!
30 #
31 # make debug = Start either simulavr or avarice as specified for debugging,
32 # with avr-gdb or avr-insight as the front end for debugging.
33 #
34 # make filename.s = Just compile filename.c into the assembler code only.
35 #
36 # make filename.i = Create a preprocessed source file for use in submitting
37 # bug reports to the GCC project.
38 #
39 # To rebuild project do "make clean" then "make all".
40 #----------------------------------------------------------------------------
41
42 # Following variables need to be set in <target>/Makefile:
43 # TARGET
44 # COMMON_DIR
45 # TARGET_DIR
46 # TARGET_SRC
47 # MCU
48 # F_CPU
49
50
51 # List C source files here. (C dependencies are automatically generated.)
52 SRC = tmk.c \
53 layer.c \
54 key_process.c \
55 usb_keyboard.c \
56 usb_mouse.c \
57 usb_debug.c \
58 usb_extra.c \
59 usb.c \
60 jump_bootloader.c \
61 print.c \
62 timer.c \
63 util.c
64 SRC += $(TARGET_SRC)
65
66 # C source file search path
67 VPATH = $(TARGET_DIR):$(COMMON_DIR)
68
69
70 # Output format. (can be srec, ihex, binary)
71 FORMAT = ihex
72
73
74 # Object files directory
75 # To put object files in current directory, use a dot (.), do NOT make
76 # this an empty or blank macro!
77 OBJDIR = .
78
79
80 # List C++ source files here. (C dependencies are automatically generated.)
81 CPPSRC =
82
83
84 # List Assembler source files here.
85 # Make them always end in a capital .S. Files ending in a lowercase .s
86 # will not be considered source files but generated files (assembler
87 # output from the compiler), and will be deleted upon "make clean"!
88 # Even though the DOS/Win* filesystem matches both .s and .S the same,
89 # it will preserve the spelling of the filenames, and gcc itself does
90 # care about how the name is spelled on its command-line.
91 ASRC =
92
93
94 # Optimization level, can be [0, 1, 2, 3, s].
95 # 0 = turn off optimization. s = optimize for size.
96 # (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
97 OPT = s
98
99
100 # Debugging format.
101 # Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
102 # AVR Studio 4.10 requires dwarf-2.
103 # AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
104 DEBUG = dwarf-2
105
106
107 # List any extra directories to look for include files here.
108 # Each directory must be seperated by a space.
109 # Use forward slashes for directory separators.
110 # For a directory that has spaces, enclose it in quotes.
111 EXTRAINCDIRS = $(TARGET_DIR) $(COMMON_DIR)
112
113
114 # Compiler flag to set the C Standard level.
115 # c89 = "ANSI" C
116 # gnu89 = c89 plus GCC extensions
117 # c99 = ISO C99 standard (not yet fully implemented)
118 # gnu99 = c99 plus GCC extensions
119 CSTANDARD = -std=gnu99
120
121
122 # Place -D or -U options here for C sources
123 CDEFS = -DF_CPU=$(F_CPU)UL
124 CDEFS += -DDESCRIPTION=$(DESCRIPTION)
125 CDEFS += -DVENDOR_ID=$(VENDOR_ID)
126 CDEFS += -DPRODUCT_ID=$(PRODUCT_ID)
127 CDEFS += -DMANUFACTURER=$(MANUFACTURER)
128 CDEFS += -DPRODUCT=$(PRODUCT)
129 ifdef MOUSE_DELAY_TIME
130 CDEFS += -DMOUSE_DELAY_TIME=$(MOUSE_DELAY_TIME)
131 endif
132
133
134 # Place -D or -U options here for ASM sources
135 ADEFS = -DF_CPU=$(F_CPU)
136 ADEFS += -DDESCRIPTION=$(DESCRIPTION)
137 ADEFS += -DVENDOR_ID=$(VENDOR_ID)
138 ADEFS += -DPRODUCT_ID=$(PRODUCT_ID)
139 ADEFS += -DMANUFACTURER=$(MANUFACTURER)
140 ADEFS += -DPRODUCT=$(PRODUCT)
141 ifdef MOUSE_DELAY_TIME
142 ADEFS += -DMOUSE_DELAY_TIME=$(MOUSE_DELAY_TIME)
143 endif
144
145
146 # Place -D or -U options here for C++ sources
147 CPPDEFS = -DF_CPU=$(F_CPU)UL -DDESCRIPTION=$(DESCRIPTION) -DVENDOR_ID=$(VENDOR_ID) -DPRODUCT_ID=$(PRODUCT_ID)
148 #CPPDEFS += -D__STDC_LIMIT_MACROS
149 #CPPDEFS += -D__STDC_CONSTANT_MACROS
150 CPPDEFS += -DDESCRIPTION=$(DESCRIPTION)
151 CPPDEFS += -DVENDOR_ID=$(VENDOR_ID)
152 CPPDEFS += -DPRODUCT_ID=$(PRODUCT_ID)
153 CPPDEFS += -DMANUFACTURER=$(MANUFACTURER)
154 CPPDEFS += -DPRODUCT=$(PRODUCT)
155 ifdef MOUSE_DELAY_TIME
156 CPPDEFS += -DMOUSE_DELAY_TIME=$(MOUSE_DELAY_TIME)
157 endif
158
159
160
161 #---------------- Compiler Options C ----------------
162 # -g*: generate debugging information
163 # -O*: optimization level
164 # -f...: tuning, see GCC manual and avr-libc documentation
165 # -Wall...: warning level
166 # -Wa,...: tell GCC to pass this to the assembler.
167 # -adhlns...: create assembler listing
168 CFLAGS = -g$(DEBUG)
169 CFLAGS += $(CDEFS)
170 CFLAGS += -O$(OPT)
171 CFLAGS += -funsigned-char
172 CFLAGS += -funsigned-bitfields
173 CFLAGS += -ffunction-sections
174 CFLAGS += -fpack-struct
175 CFLAGS += -fshort-enums
176 CFLAGS += -Wall
177 CFLAGS += -Wstrict-prototypes
178 #CFLAGS += -mshort-calls
179 #CFLAGS += -fno-unit-at-a-time
180 #CFLAGS += -Wundef
181 #CFLAGS += -Wunreachable-code
182 #CFLAGS += -Wsign-compare
183 CFLAGS += -Wa,-adhlns=$(@:%.o=$(OBJDIR)/%.lst)
184 CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
185 CFLAGS += $(CSTANDARD)
186
187
188 #---------------- Compiler Options C++ ----------------
189 # -g*: generate debugging information
190 # -O*: optimization level
191 # -f...: tuning, see GCC manual and avr-libc documentation
192 # -Wall...: warning level
193 # -Wa,...: tell GCC to pass this to the assembler.
194 # -adhlns...: create assembler listing
195 CPPFLAGS = -g$(DEBUG)
196 CPPFLAGS += $(CPPDEFS)
197 CPPFLAGS += -O$(OPT)
198 CPPFLAGS += -funsigned-char
199 CPPFLAGS += -funsigned-bitfields
200 CPPFLAGS += -fpack-struct
201 CPPFLAGS += -fshort-enums
202 CPPFLAGS += -fno-exceptions
203 CPPFLAGS += -Wall
204 CPPFLAGS += -Wundef
205 #CPPFLAGS += -mshort-calls
206 #CPPFLAGS += -fno-unit-at-a-time
207 #CPPFLAGS += -Wstrict-prototypes
208 #CPPFLAGS += -Wunreachable-code
209 #CPPFLAGS += -Wsign-compare
210 CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
211 CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
212 #CPPFLAGS += $(CSTANDARD)
213
214
215 #---------------- Assembler Options ----------------
216 # -Wa,...: tell GCC to pass this to the assembler.
217 # -adhlns: create listing
218 # -gstabs: have the assembler create line number information; note that
219 # for use in COFF files, additional information about filenames
220 # and function names needs to be present in the assembler source
221 # files -- see avr-libc docs [FIXME: not yet described there]
222 # -listing-cont-lines: Sets the maximum number of continuation lines of hex
223 # dump that will be displayed for a given single line of source input.
224 ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100
225
226
227 #---------------- Library Options ----------------
228 # Minimalistic printf version
229 PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
230
231 # Floating point printf version (requires MATH_LIB = -lm below)
232 PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
233
234 # If this is left blank, then it will use the Standard printf version.
235 PRINTF_LIB =
236 #PRINTF_LIB = $(PRINTF_LIB_MIN)
237 #PRINTF_LIB = $(PRINTF_LIB_FLOAT)
238
239
240 # Minimalistic scanf version
241 SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
242
243 # Floating point + %[ scanf version (requires MATH_LIB = -lm below)
244 SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
245
246 # If this is left blank, then it will use the Standard scanf version.
247 SCANF_LIB =
248 #SCANF_LIB = $(SCANF_LIB_MIN)
249 #SCANF_LIB = $(SCANF_LIB_FLOAT)
250
251
252 MATH_LIB = -lm
253
254
255 # List any extra directories to look for libraries here.
256 # Each directory must be seperated by a space.
257 # Use forward slashes for directory separators.
258 # For a directory that has spaces, enclose it in quotes.
259 EXTRALIBDIRS =
260
261
262
263 #---------------- External Memory Options ----------------
264
265 # 64 KB of external RAM, starting after internal RAM (ATmega128!),
266 # used for variables (.data/.bss) and heap (malloc()).
267 #EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
268
269 # 64 KB of external RAM, starting after internal RAM (ATmega128!),
270 # only used for heap (malloc()).
271 #EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff
272
273 EXTMEMOPTS =
274
275
276
277 #---------------- Linker Options ----------------
278 # -Wl,...: tell GCC to pass this to linker.
279 # -Map: create map file
280 # --cref: add cross reference to map file
281 LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
282 LDFLAGS += -Wl,--relax
283 LDFLAGS += -Wl,--gc-sections
284 LDFLAGS += $(EXTMEMOPTS)
285 LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
286 LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
287 #LDFLAGS += -T linker_script.x
288
289
290
291 #---------------- Programming Options (avrdude) ----------------
292
293 # Programming hardware
294 # Type: avrdude -c ?
295 # to get a full listing.
296 #
297 AVRDUDE_PROGRAMMER = stk500v2
298
299 # com1 = serial port. Use lpt1 to connect to parallel port.
300 AVRDUDE_PORT = com1 # programmer connected to serial device
301
302 AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
303 #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
304
305
306 # Uncomment the following if you want avrdude's erase cycle counter.
307 # Note that this counter needs to be initialized first using -Yn,
308 # see avrdude manual.
309 #AVRDUDE_ERASE_COUNTER = -y
310
311 # Uncomment the following if you do /not/ wish a verification to be
312 # performed after programming the device.
313 #AVRDUDE_NO_VERIFY = -V
314
315 # Increase verbosity level. Please use this when submitting bug
316 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
317 # to submit bug reports.
318 #AVRDUDE_VERBOSE = -v -v
319
320 AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
321 AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
322 AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
323 AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
324
325
326
327 #---------------- Debugging Options ----------------
328
329 # For simulavr only - target MCU frequency.
330 DEBUG_MFREQ = $(F_CPU)
331
332 # Set the DEBUG_UI to either gdb or insight.
333 # DEBUG_UI = gdb
334 DEBUG_UI = insight
335
336 # Set the debugging back-end to either avarice, simulavr.
337 DEBUG_BACKEND = avarice
338 #DEBUG_BACKEND = simulavr
339
340 # GDB Init Filename.
341 GDBINIT_FILE = __avr_gdbinit
342
343 # When using avarice settings for the JTAG
344 JTAG_DEV = /dev/com1
345
346 # Debugging port used to communicate between GDB / avarice / simulavr.
347 DEBUG_PORT = 4242
348
349 # Debugging host used to communicate between GDB / avarice / simulavr, normally
350 # just set to localhost unless doing some sort of crazy debugging when
351 # avarice is running on a different computer.
352 DEBUG_HOST = localhost
353
354
355
356 #============================================================================
357
358
359 # Define programs and commands.
360 SHELL = sh
361 CC = avr-gcc
362 OBJCOPY = avr-objcopy
363 OBJDUMP = avr-objdump
364 SIZE = avr-size
365 AR = avr-ar rcs
366 NM = avr-nm
367 AVRDUDE = avrdude
368 REMOVE = rm -f
369 REMOVEDIR = rm -rf
370 COPY = cp
371 WINSHELL = cmd
372
373
374 # Define Messages
375 # English
376 MSG_ERRORS_NONE = Errors: none
377 MSG_BEGIN = -------- begin --------
378 MSG_END = -------- end --------
379 MSG_SIZE_BEFORE = Size before:
380 MSG_SIZE_AFTER = Size after:
381 MSG_COFF = Converting to AVR COFF:
382 MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
383 MSG_FLASH = Creating load file for Flash:
384 MSG_EEPROM = Creating load file for EEPROM:
385 MSG_EXTENDED_LISTING = Creating Extended Listing:
386 MSG_SYMBOL_TABLE = Creating Symbol Table:
387 MSG_LINKING = Linking:
388 MSG_COMPILING = Compiling C:
389 MSG_COMPILING_CPP = Compiling C++:
390 MSG_ASSEMBLING = Assembling:
391 MSG_CLEANING = Cleaning project:
392 MSG_CREATING_LIBRARY = Creating library:
393
394
395
396
397 # Define all object files.
398 OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
399
400 # Define all listing files.
401 LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
402
403
404 # Compiler flags to generate dependency files.
405 GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
406
407
408 # Combine all necessary flags and optional flags.
409 # Add target processor to flags.
410 ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
411 ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)
412 ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
413
414
415
416
417
418 # Default target.
419 all: begin gccversion sizebefore build sizeafter end
420
421 # Change the build target to build a HEX file or a library.
422 build: elf hex eep lss sym
423 #build: lib
424
425
426 elf: $(TARGET).elf
427 hex: $(TARGET).hex
428 eep: $(TARGET).eep
429 lss: $(TARGET).lss
430 sym: $(TARGET).sym
431 LIBNAME=lib$(TARGET).a
432 lib: $(LIBNAME)
433
434
435
436 # Eye candy.
437 # AVR Studio 3.x does not check make's exit code but relies on
438 # the following magic strings to be generated by the compile job.
439 begin:
440 @echo
441 @echo $(MSG_BEGIN)
442
443 end:
444 @echo $(MSG_END)
445 @echo
446
447
448 # Display size of file.
449 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
450 #ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
451 ELFSIZE = $(SIZE) $(TARGET).elf
452
453 sizebefore:
454 @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
455 2>/dev/null; echo; fi
456
457 sizeafter:
458 @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
459 2>/dev/null; echo; fi
460
461
462
463 # Display compiler version information.
464 gccversion :
465 @$(CC) --version
466
467
468
469 # Program the device.
470 program: $(TARGET).hex $(TARGET).eep
471 $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
472
473
474 # Generate avr-gdb config/init file which does the following:
475 # define the reset signal, load the target file, connect to target, and set
476 # a breakpoint at main().
477 gdb-config:
478 @$(REMOVE) $(GDBINIT_FILE)
479 @echo define reset >> $(GDBINIT_FILE)
480 @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
481 @echo end >> $(GDBINIT_FILE)
482 @echo file $(TARGET).elf >> $(GDBINIT_FILE)
483 @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)
484 ifeq ($(DEBUG_BACKEND),simulavr)
485 @echo load >> $(GDBINIT_FILE)
486 endif
487 @echo break main >> $(GDBINIT_FILE)
488
489 debug: gdb-config $(TARGET).elf
490 ifeq ($(DEBUG_BACKEND), avarice)
491 @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
492 @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
493 $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
494 @$(WINSHELL) /c pause
495
496 else
497 @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
498 $(DEBUG_MFREQ) --port $(DEBUG_PORT)
499 endif
500 @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
501
502
503
504
505 # Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
506 COFFCONVERT = $(OBJCOPY) --debugging
507 COFFCONVERT += --change-section-address .data-0x800000
508 COFFCONVERT += --change-section-address .bss-0x800000
509 COFFCONVERT += --change-section-address .noinit-0x800000
510 COFFCONVERT += --change-section-address .eeprom-0x810000
511
512
513
514 coff: $(TARGET).elf
515 @echo
516 @echo $(MSG_COFF) $(TARGET).cof
517 $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
518
519
520 extcoff: $(TARGET).elf
521 @echo
522 @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
523 $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
524
525
526
527 # Create final output files (.hex, .eep) from ELF output file.
528 %.hex: %.elf
529 @echo
530 @echo $(MSG_FLASH) $@
531 $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@
532
533 %.eep: %.elf
534 @echo
535 @echo $(MSG_EEPROM) $@
536 -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
537 --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0
538
539 # Create extended listing file from ELF output file.
540 %.lss: %.elf
541 @echo
542 @echo $(MSG_EXTENDED_LISTING) $@
543 $(OBJDUMP) -h -S -z $< > $@
544
545 # Create a symbol table from ELF output file.
546 %.sym: %.elf
547 @echo
548 @echo $(MSG_SYMBOL_TABLE) $@
549 $(NM) -n $< > $@
550
551
552
553 # Create library from object files.
554 .SECONDARY : $(TARGET).a
555 .PRECIOUS : $(OBJ)
556 %.a: $(OBJ)
557 @echo
558 @echo $(MSG_CREATING_LIBRARY) $@
559 $(AR) $@ $(OBJ)
560
561
562 # Link: create ELF output file from object files.
563 .SECONDARY : $(TARGET).elf
564 .PRECIOUS : $(OBJ)
565 %.elf: $(OBJ)
566 @echo
567 @echo $(MSG_LINKING) $@
568 $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
569
570
571 # Compile: create object files from C source files.
572 $(OBJDIR)/%.o : %.c
573 @echo
574 @echo $(MSG_COMPILING) $<
575 $(CC) -c $(ALL_CFLAGS) $< -o $@
576
577
578 # Compile: create object files from C++ source files.
579 $(OBJDIR)/%.o : %.cpp
580 @echo
581 @echo $(MSG_COMPILING_CPP) $<
582 $(CC) -c $(ALL_CPPFLAGS) $< -o $@
583
584
585 # Compile: create assembler files from C source files.
586 %.s : %.c
587 $(CC) -S $(ALL_CFLAGS) $< -o $@
588
589
590 # Compile: create assembler files from C++ source files.
591 %.s : %.cpp
592 $(CC) -S $(ALL_CPPFLAGS) $< -o $@
593
594
595 # Assemble: create object files from assembler source files.
596 $(OBJDIR)/%.o : %.S
597 @echo
598 @echo $(MSG_ASSEMBLING) $<
599 $(CC) -c $(ALL_ASFLAGS) $< -o $@
600
601
602 # Create preprocessed source for use in sending a bug report.
603 %.i : %.c
604 $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@
605
606
607 # Target: clean project.
608 clean: begin clean_list end
609
610 clean_list :
611 @echo
612 @echo $(MSG_CLEANING)
613 $(REMOVE) $(TARGET).hex
614 $(REMOVE) $(TARGET).eep
615 $(REMOVE) $(TARGET).cof
616 $(REMOVE) $(TARGET).elf
617 $(REMOVE) $(TARGET).map
618 $(REMOVE) $(TARGET).sym
619 $(REMOVE) $(TARGET).lss
620 $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o)
621 $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst)
622 $(REMOVE) $(SRC:.c=.s)
623 $(REMOVE) $(SRC:.c=.d)
624 $(REMOVE) $(SRC:.c=.i)
625 $(REMOVEDIR) .dep
626
627
628 # Create object files directory
629 $(shell mkdir $(OBJDIR) 2>/dev/null)
630
631
632 # Include the dependency files.
633 -include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
634
635
636 # Listing of phony targets.
637 .PHONY : all begin finish end sizebefore sizeafter gccversion \
638 build elf hex eep lss sym coff extcoff \
639 clean clean_list program debug gdb-config
Imprint / Impressum