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