1 # Hey Emacs, this is a -*- makefile -*-
2 #----------------------------------------------------------------------------
3 # WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.
4 # >> Modified for use with the LUFA project. <<
6 # Released to the Public Domain
8 # Additional material for this makefile was written by:
21 #----------------------------------------------------------------------------
24 # make all = Make software.
26 # make clean = Clean out built project files.
28 # make coff = Convert ELF to AVR COFF.
30 # make extcoff = Convert ELF to AVR Extended COFF.
32 # make program = Download the hex file to the device, using avrdude.
33 # Please customize the avrdude settings below first!
35 # make dfu = Download the hex file to the device, using dfu-programmer (must
36 # have dfu-programmer installed).
38 # make flip = Download the hex file to the device, using Atmel FLIP (must
39 # have Atmel FLIP installed).
41 # make dfu-ee = Download the eeprom file to the device, using dfu-programmer
42 # (must have dfu-programmer installed).
44 # make flip-ee = Download the eeprom file to the device, using Atmel FLIP
45 # (must have Atmel FLIP installed).
47 # make doxygen = Generate DoxyGen documentation for the project (must have
50 # make debug = Start either simulavr or avarice as specified for debugging,
51 # with avr-gdb or avr-insight as the front end for debugging.
53 # make filename.s = Just compile filename.c into the assembler code only.
55 # make filename.i = Create a preprocessed source file for use in submitting
56 # bug reports to the GCC project.
58 # To rebuild project do "make clean" then "make all".
59 #----------------------------------------------------------------------------
66 # Target architecture (see library "Board Types" documentation).
70 # Target board (see library "Board Types" documentation, NONE for projects not requiring
71 # LUFA board drivers). If USER is selected, put custom board drivers in a directory called
72 # "Board" inside the application directory.
76 # Processor frequency.
77 # This will define a symbol, F_CPU, in all source code files equal to the
78 # processor frequency in Hz. You can then use this symbol in your source code to
79 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
80 # automatically to create a 32-bit value in your source code.
82 # This will be an integer division of F_USB below, as it is sourced by
83 # F_USB after it has run through any CPU prescalers. Note that this value
84 # does not *change* the processor frequency - it should merely be updated to
85 # reflect the processor speed set externally so that the code can use accurate
90 # Input clock frequency.
91 # This will define a symbol, F_USB, in all source code files equal to the
92 # input clock frequency (before any prescaling is performed) in Hz. This value may
93 # differ from F_CPU if prescaling is used on the latter, and is required as the
94 # raw input clock is fed directly to the PLL sections of the AVR for high speed
95 # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
96 # at the end, this will be done automatically to create a 32-bit value in your
99 # If no clock division is performed on the input clock inside the AVR (via the
100 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
104 # Output format. (can be srec, ihex, binary)
108 # Target file name (without extension).
112 # Object files directory
113 # To put object files in current directory, use a dot (.), do NOT make
114 # this an empty or blank macro!
118 # Path to the LUFA library
122 # LUFA library compile-time options and predefined tokens
123 LUFA_OPTS = -D FIXED_CONTROL_ENDPOINT_SIZE=8
124 LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1
125 LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0
126 LUFA_OPTS += -D USE_FLASH_DESCRIPTORS
127 LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
128 LUFA_OPTS += -D INTERRUPT_CONTROL_ENDPOINT
130 LUFA_OPTS += -D ENABLE_DHCP_CLIENT
131 LUFA_OPTS += -D ENABLE_TELNET_SERVER
132 LUFA_OPTS += -D MAX_URI_LENGTH=50
133 LUFA_OPTS += -D UIP_CONF_UDP="defined(ENABLE_DHCP_CLIENT)"
134 LUFA_OPTS += -D UIP_CONF_TCP=1
135 LUFA_OPTS += -D UIP_CONF_UDP_CONNS=1
136 LUFA_OPTS += -D UIP_CONF_MAX_CONNECTIONS=3
137 LUFA_OPTS += -D UIP_CONF_MAX_LISTENPORTS=5
138 LUFA_OPTS += -D UIP_URGDATA=0
139 LUFA_OPTS += -D UIP_CONF_BUFFER_SIZE=1514
140 LUFA_OPTS += -D UIP_ARCH_CHKSUM=0
141 LUFA_OPTS += -D UIP_CONF_LL_802154=0
142 LUFA_OPTS += -D UIP_CONF_LL_80211=0
143 LUFA_OPTS += -D UIP_CONF_ROUTER=0
144 LUFA_OPTS += -D UIP_CONF_ICMP6=0
145 LUFA_OPTS += -D UIP_ARCH_ADD32=0
146 LUFA_OPTS += -D UIP_CONF_ICMP_DEST_UNREACH=1
147 LUFA_OPTS += -D UIP_NEIGHBOR_CONF_ADDRTYPE=0
150 # Create the LUFA source path variables by including the LUFA root makefile
151 include $(LUFA_PATH)/LUFA/makefile
154 # List C source files here. (C dependencies are automatically generated.)
160 Lib/DataflashManager.c \
161 Lib/uIPManagement.c \
162 Lib/DHCPClientApp.c \
163 Lib/HTTPServerApp.c \
164 Lib/TELNETServerApp.c \
169 Lib/uip/uip-split.c \
176 # List C++ source files here. (C dependencies are automatically generated.)
180 # List Assembler source files here.
181 # Make them always end in a capital .S. Files ending in a lowercase .s
182 # will not be considered source files but generated files (assembler
183 # output from the compiler), and will be deleted upon "make clean"!
184 # Even though the DOS/Win* filesystem matches both .s and .S the same,
185 # it will preserve the spelling of the filenames, and gcc itself does
186 # care about how the name is spelled on its command-line.
190 # Optimization level, can be [0, 1, 2, 3, s].
191 # 0 = turn off optimization. s = optimize for size.
192 # (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
197 # Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
198 # AVR Studio 4.10 requires dwarf-2.
199 # AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
203 # List any extra directories to look for include files here.
204 # Each directory must be seperated by a space.
205 # Use forward slashes for directory separators.
206 # For a directory that has spaces, enclose it in quotes.
207 EXTRAINCDIRS = $(LUFA_PATH)/ Lib/uip/ Lib/uip/conf/ Lib/FATFs/
210 # Compiler flag to set the C Standard level.
212 # gnu89 = c89 plus GCC extensions
213 # c99 = ISO C99 standard (not yet fully implemented)
214 # gnu99 = c99 plus GCC extensions
218 # Place -D or -U options here for C sources
219 CDEFS = -DF_CPU=$(F_CPU)UL
220 CDEFS += -DF_USB=$(F_USB)UL
221 CDEFS += -DBOARD=BOARD_$(BOARD) -DARCH=ARCH_$(ARCH)
222 CDEFS += $(LUFA_OPTS)
225 # Place -D or -U options here for ASM sources
226 ADEFS = -DF_CPU=$(F_CPU)
227 ADEFS += -DF_USB=$(F_USB)UL
228 ADEFS += -DBOARD=BOARD_$(BOARD)
229 ADEFS += $(LUFA_OPTS)
231 # Place -D or -U options here for C++ sources
232 CPPDEFS = -DF_CPU=$(F_CPU)UL
233 CPPDEFS += -DF_USB=$(F_USB)UL
234 CPPDEFS += -DBOARD=BOARD_$(BOARD)
235 CPPDEFS += $(LUFA_OPTS)
236 #CPPDEFS += -D__STDC_LIMIT_MACROS
237 #CPPDEFS += -D__STDC_CONSTANT_MACROS
241 #---------------- Compiler Options C ----------------
242 # -g*: generate debugging information
243 # -O*: optimization level
244 # -f...: tuning, see GCC manual and avr-libc documentation
245 # -Wall...: warning level
246 # -Wa,...: tell GCC to pass this to the assembler.
247 # -adhlns...: create assembler listing
251 CFLAGS += -funsigned-char
252 CFLAGS += -funsigned-bitfields
253 CFLAGS += -ffunction-sections
254 CFLAGS += -fno-inline-small-functions
255 CFLAGS += -fpack-struct
256 CFLAGS += -fshort-enums
257 CFLAGS += -fno-strict-aliasing
259 CFLAGS += -Wstrict-prototypes
260 #CFLAGS += -mshort-calls
261 #CFLAGS += -fno-unit-at-a-time
263 #CFLAGS += -Wunreachable-code
264 #CFLAGS += -Wsign-compare
265 CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)
266 CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
267 CFLAGS += $(CSTANDARD)
270 #---------------- Compiler Options C++ ----------------
271 # -g*: generate debugging information
272 # -O*: optimization level
273 # -f...: tuning, see GCC manual and avr-libc documentation
274 # -Wall...: warning level
275 # -Wa,...: tell GCC to pass this to the assembler.
276 # -adhlns...: create assembler listing
277 CPPFLAGS = -g$(DEBUG)
278 CPPFLAGS += $(CPPDEFS)
280 CPPFLAGS += -funsigned-char
281 CPPFLAGS += -funsigned-bitfields
282 CPPFLAGS += -fpack-struct
283 CPPFLAGS += -fshort-enums
284 CPPFLAGS += -fno-exceptions
287 #CPPFLAGS += -mshort-calls
288 #CPPFLAGS += -fno-unit-at-a-time
289 #CPPFLAGS += -Wstrict-prototypes
290 #CPPFLAGS += -Wunreachable-code
291 #CPPFLAGS += -Wsign-compare
292 CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
293 CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
294 #CPPFLAGS += $(CSTANDARD)
297 #---------------- Assembler Options ----------------
298 # -Wa,...: tell GCC to pass this to the assembler.
299 # -adhlns: create listing
300 # -gstabs: have the assembler create line number information; note that
301 # for use in COFF files, additional information about filenames
302 # and function names needs to be present in the assembler source
303 # files -- see avr-libc docs [FIXME: not yet described there]
304 # -listing-cont-lines: Sets the maximum number of continuation lines of hex
305 # dump that will be displayed for a given single line of source input.
306 ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100
309 #---------------- Library Options ----------------
310 # Minimalistic printf version
311 PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
313 # Floating point printf version (requires MATH_LIB = -lm below)
314 PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
316 # If this is left blank, then it will use the Standard printf version.
318 #PRINTF_LIB = $(PRINTF_LIB_MIN)
319 #PRINTF_LIB = $(PRINTF_LIB_FLOAT)
322 # Minimalistic scanf version
323 SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
325 # Floating point + %[ scanf version (requires MATH_LIB = -lm below)
326 SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
328 # If this is left blank, then it will use the Standard scanf version.
330 #SCANF_LIB = $(SCANF_LIB_MIN)
331 #SCANF_LIB = $(SCANF_LIB_FLOAT)
337 # List any extra directories to look for libraries here.
338 # Each directory must be seperated by a space.
339 # Use forward slashes for directory separators.
340 # For a directory that has spaces, enclose it in quotes.
345 #---------------- External Memory Options ----------------
347 # 64 KB of external RAM, starting after internal RAM (ATmega128!),
348 # used for variables (.data/.bss) and heap (malloc()).
349 #EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
351 # 64 KB of external RAM, starting after internal RAM (ATmega128!),
352 # only used for heap (malloc()).
353 #EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff
359 #---------------- Linker Options ----------------
360 # -Wl,...: tell GCC to pass this to linker.
361 # -Map: create map file
362 # --cref: add cross reference to map file
363 LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
364 LDFLAGS += -Wl,--relax
365 LDFLAGS += -Wl,--gc-sections
366 LDFLAGS += $(EXTMEMOPTS)
367 LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
368 LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
369 #LDFLAGS += -T linker_script.x
373 #---------------- Programming Options (avrdude) ----------------
375 # Programming hardware
377 # to get a full listing.
379 AVRDUDE_PROGRAMMER = jtagmkII
381 # com1 = serial port. Use lpt1 to connect to parallel port.
384 AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
385 #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
388 # Uncomment the following if you want avrdude's erase cycle counter.
389 # Note that this counter needs to be initialized first using -Yn,
390 # see avrdude manual.
391 #AVRDUDE_ERASE_COUNTER = -y
393 # Uncomment the following if you do /not/ wish a verification to be
394 # performed after programming the device.
395 #AVRDUDE_NO_VERIFY = -V
397 # Increase verbosity level. Please use this when submitting bug
398 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
399 # to submit bug reports.
400 #AVRDUDE_VERBOSE = -v -v
402 AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
403 AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
404 AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
405 AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
409 #---------------- Debugging Options ----------------
411 # For simulavr only - target MCU frequency.
412 DEBUG_MFREQ = $(F_CPU)
414 # Set the DEBUG_UI to either gdb or insight.
418 # Set the debugging back-end to either avarice, simulavr.
419 DEBUG_BACKEND = avarice
420 #DEBUG_BACKEND = simulavr
423 GDBINIT_FILE = __avr_gdbinit
425 # When using avarice settings for the JTAG
428 # Debugging port used to communicate between GDB / avarice / simulavr.
431 # Debugging host used to communicate between GDB / avarice / simulavr, normally
432 # just set to localhost unless doing some sort of crazy debugging when
433 # avarice is running on a different computer.
434 DEBUG_HOST = localhost
438 #============================================================================
441 # Define programs and commands.
444 OBJCOPY = avr-objcopy
445 OBJDUMP = avr-objdump
458 MSG_ERRORS_NONE = Errors: none
459 MSG_BEGIN = -------- begin --------
460 MSG_END = -------- end --------
461 MSG_SIZE_BEFORE = Size before:
462 MSG_SIZE_AFTER = Size after:
463 MSG_COFF = Converting to AVR COFF:
464 MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
465 MSG_FLASH = Creating load file for Flash:
466 MSG_EEPROM = Creating load file for EEPROM:
467 MSG_EXTENDED_LISTING = Creating Extended Listing:
468 MSG_SYMBOL_TABLE = Creating Symbol Table:
469 MSG_LINKING = Linking:
470 MSG_COMPILING = Compiling C:
471 MSG_COMPILING_CPP = Compiling C++:
472 MSG_ASSEMBLING = Assembling:
473 MSG_CLEANING = Cleaning project:
474 MSG_CREATING_LIBRARY = Creating library:
479 # Define all object files.
480 OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
482 # Define all listing files.
483 LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
486 # Compiler flags to generate dependency files.
487 GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
490 # Combine all necessary flags and optional flags.
491 # Add target processor to flags.
492 ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
493 ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)
494 ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
501 all: begin gccversion sizebefore build sizeafter end
503 # Change the build target to build a HEX file or a library.
504 build: elf hex eep lss sym
513 LIBNAME=lib$(TARGET).a
519 # AVR Studio 3.x does not check make's exit code but relies on
520 # the following magic strings to be generated by the compile job.
530 # Display size of file.
531 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
532 ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
533 MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
534 FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
538 @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
539 2>/dev/null; echo; fi
542 @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
543 2>/dev/null; echo; fi
547 # Display compiler version information.
552 # Program the device.
553 program: $(TARGET).hex $(TARGET).eep
554 $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
557 batchisp -hardware usb -device $(MCU) -operation erase f
558 batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program
559 batchisp -hardware usb -device $(MCU) -operation start reset 0
562 dfu-programmer $(MCU) erase
563 dfu-programmer $(MCU) flash $(TARGET).hex
564 dfu-programmer $(MCU) reset
566 flip-ee: $(TARGET).hex $(TARGET).eep
567 $(COPY) $(TARGET).eep $(TARGET)eep.hex
568 batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase
569 batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program
570 batchisp -hardware usb -device $(MCU) -operation start reset 0
571 $(REMOVE) $(TARGET)eep.hex
573 dfu-ee: $(TARGET).hex $(TARGET).eep
574 dfu-programmer $(MCU) eeprom-flash $(TARGET).eep
575 dfu-programmer $(MCU) reset
578 # Generate avr-gdb config/init file which does the following:
579 # define the reset signal, load the target file, connect to target, and set
580 # a breakpoint at main().
582 @$(REMOVE) $(GDBINIT_FILE)
583 @echo define reset >> $(GDBINIT_FILE)
584 @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
585 @echo end >> $(GDBINIT_FILE)
586 @echo file $(TARGET).elf >> $(GDBINIT_FILE)
587 @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)
588 ifeq ($(DEBUG_BACKEND),simulavr)
589 @echo load >> $(GDBINIT_FILE)
591 @echo break main >> $(GDBINIT_FILE)
593 debug: gdb-config $(TARGET).elf
594 ifeq ($(DEBUG_BACKEND), avarice)
595 @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
596 @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
597 $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
598 @$(WINSHELL) /c pause
601 @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
602 $(DEBUG_MFREQ) --port $(DEBUG_PORT)
604 @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
609 # Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
610 COFFCONVERT = $(OBJCOPY) --debugging
611 COFFCONVERT += --change-section-address .data-0x800000
612 COFFCONVERT += --change-section-address .bss-0x800000
613 COFFCONVERT += --change-section-address .noinit-0x800000
614 COFFCONVERT += --change-section-address .eeprom-0x810000
620 @echo $(MSG_COFF) $(TARGET).cof
621 $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
624 extcoff: $(TARGET).elf
626 @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
627 $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
631 # Create final output files (.hex, .eep) from ELF output file.
634 @echo $(MSG_FLASH) $@
635 $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@
639 @echo $(MSG_EEPROM) $@
640 -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
641 --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0
643 # Create extended listing file from ELF output file.
646 @echo $(MSG_EXTENDED_LISTING) $@
647 $(OBJDUMP) -h -S -z $< > $@
649 # Create a symbol table from ELF output file.
652 @echo $(MSG_SYMBOL_TABLE) $@
657 # Create library from object files.
658 .SECONDARY : $(TARGET).a
662 @echo $(MSG_CREATING_LIBRARY) $@
666 # Link: create ELF output file from object files.
667 .SECONDARY : $(TARGET).elf
671 @echo $(MSG_LINKING) $@
672 $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
675 # Compile: create object files from C source files.
678 @echo $(MSG_COMPILING) $<
679 $(CC) -c $(ALL_CFLAGS) $< -o $@
682 # Compile: create object files from C++ source files.
683 $(OBJDIR)/%.o : %.cpp
685 @echo $(MSG_COMPILING_CPP) $<
686 $(CC) -c $(ALL_CPPFLAGS) $< -o $@
689 # Compile: create assembler files from C source files.
691 $(CC) -S $(ALL_CFLAGS) $< -o $@
694 # Compile: create assembler files from C++ source files.
696 $(CC) -S $(ALL_CPPFLAGS) $< -o $@
699 # Assemble: create object files from assembler source files.
702 @echo $(MSG_ASSEMBLING) $<
703 $(CC) -c $(ALL_ASFLAGS) $< -o $@
706 # Create preprocessed source for use in sending a bug report.
708 $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@
711 # Target: clean project.
712 clean: begin clean_list end
716 @echo $(MSG_CLEANING)
717 $(REMOVE) $(TARGET).hex
718 $(REMOVE) $(TARGET).eep
719 $(REMOVE) $(TARGET).cof
720 $(REMOVE) $(TARGET).elf
721 $(REMOVE) $(TARGET).map
722 $(REMOVE) $(TARGET).sym
723 $(REMOVE) $(TARGET).lss
724 $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
725 $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
726 $(REMOVE) $(SRC:.c=.s)
727 $(REMOVE) $(SRC:.c=.d)
728 $(REMOVE) $(SRC:.c=.i)
732 @echo Generating Project Documentation...
733 @doxygen Doxygen.conf
734 @echo Documentation Generation Complete.
739 # Create object files directory
740 $(shell mkdir $(OBJDIR) 2>/dev/null)
743 # Include the dependency files.
744 -include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
747 # Listing of phony targets.
748 .PHONY : all begin finish end sizebefore sizeafter gccversion \
749 build elf hex eep lss sym coff extcoff doxygen clean \
750 clean_list clean_doxygen program dfu flip flip-ee dfu-ee \