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