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).
109 TARGET = XPLAINBridge
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 # Path to the LUFA AVRISP-MKII project
123 AVRISP_PATH = ../AVRISP-MKII
126 # LUFA library compile-time options and predefined tokens
127 LUFA_OPTS = -D USB_DEVICE_ONLY
128 LUFA_OPTS += -D DEVICE_STATE_AS_GPIOR=0
129 LUFA_OPTS += -D ORDERED_EP_CONFIG
130 LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=16
131 LUFA_OPTS += -D FIXED_NUM_CONFIGURATIONS=1
132 LUFA_OPTS += -D USE_FLASH_DESCRIPTORS
133 LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
134 LUFA_OPTS += -D NO_DEVICE_REMOTE_WAKEUP
135 LUFA_OPTS += -D NO_DEVICE_SELF_POWER
137 LUFA_OPTS += -D AUX_LINE_PORT=PORTB
138 LUFA_OPTS += -D AUX_LINE_PIN=PINB
139 LUFA_OPTS += -D AUX_LINE_DDR=DDRB
140 LUFA_OPTS += -D AUX_LINE_MASK="(1 << 4)"
141 LUFA_OPTS += -D VTARGET_ADC_CHANNEL=2
142 LUFA_OPTS += -D VTARGET_REF_VOLTS=3.3
143 LUFA_OPTS += -D VTARGET_SCALE_FACTOR=2
144 #LUFA_OPTS += -D LIBUSB_DRIVER_COMPAT
145 #LUFA_OPTS += -D FIRMWARE_VERSION_MINOR=0x11
147 # Create the LUFA source path variables by including the LUFA root makefile
148 include $(LUFA_PATH)/LUFA/makefile
151 # List C source files here. (C dependencies are automatically generated.)
153 AVRISPDescriptors.c \
156 $(AVRISP_PATH)/Lib/V2Protocol.c \
157 $(AVRISP_PATH)/Lib/V2ProtocolParams.c \
158 $(AVRISP_PATH)/Lib/ISP/ISPProtocol.c \
159 $(AVRISP_PATH)/Lib/ISP/ISPTarget.c \
160 $(AVRISP_PATH)/Lib/XPROG/XPROGProtocol.c \
161 $(AVRISP_PATH)/Lib/XPROG/XPROGTarget.c \
162 $(AVRISP_PATH)/Lib/XPROG/XMEGANVM.c \
163 $(AVRISP_PATH)/Lib/XPROG/TINYNVM.c \
168 # List C++ source files here. (C dependencies are automatically generated.)
172 # List Assembler source files here.
173 # Make them always end in a capital .S. Files ending in a lowercase .s
174 # will not be considered source files but generated files (assembler
175 # output from the compiler), and will be deleted upon "make clean"!
176 # Even though the DOS/Win* filesystem matches both .s and .S the same,
177 # it will preserve the spelling of the filenames, and gcc itself does
178 # care about how the name is spelled on its command-line.
182 # Optimization level, can be [0, 1, 2, 3, s].
183 # 0 = turn off optimization. s = optimize for size.
184 # (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
189 # Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
190 # AVR Studio 4.10 requires dwarf-2.
191 # AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
195 # List any extra directories to look for include files here.
196 # Each directory must be seperated by a space.
197 # Use forward slashes for directory separators.
198 # For a directory that has spaces, enclose it in quotes.
199 EXTRAINCDIRS = $(LUFA_PATH)/ $(AVRISP_PATH)/
202 # Compiler flag to set the C Standard level.
204 # gnu89 = c89 plus GCC extensions
205 # c99 = ISO C99 standard (not yet fully implemented)
206 # gnu99 = c99 plus GCC extensions
210 # Place -D or -U options here for C sources
211 CDEFS = -DF_CPU=$(F_CPU)UL
212 CDEFS += -DF_USB=$(F_USB)UL
213 CDEFS += -DBOARD=BOARD_$(BOARD) -DARCH=ARCH_$(ARCH)
214 CDEFS += $(LUFA_OPTS)
217 # Place -D or -U options here for ASM sources
218 ADEFS = -DF_CPU=$(F_CPU)
219 ADEFS += -DF_USB=$(F_USB)UL
220 ADEFS += -DBOARD=BOARD_$(BOARD)
221 ADEFS += $(LUFA_OPTS)
223 # Place -D or -U options here for C++ sources
224 CPPDEFS = -DF_CPU=$(F_CPU)UL
225 CPPDEFS += -DF_USB=$(F_USB)UL
226 CPPDEFS += -DBOARD=BOARD_$(BOARD)
227 CPPDEFS += $(LUFA_OPTS)
228 #CPPDEFS += -D__STDC_LIMIT_MACROS
229 #CPPDEFS += -D__STDC_CONSTANT_MACROS
233 #---------------- Compiler Options C ----------------
234 # -g*: generate debugging information
235 # -O*: optimization level
236 # -f...: tuning, see GCC manual and avr-libc documentation
237 # -Wall...: warning level
238 # -Wa,...: tell GCC to pass this to the assembler.
239 # -adhlns...: create assembler listing
243 CFLAGS += -funsigned-char
244 CFLAGS += -funsigned-bitfields
245 CFLAGS += -ffunction-sections
246 CFLAGS += -fno-inline-small-functions
247 CFLAGS += -fpack-struct
248 CFLAGS += -fshort-enums
249 CFLAGS += -fno-strict-aliasing
250 CFLAGS += -fno-split-wide-types
252 CFLAGS += -Wstrict-prototypes
253 #CFLAGS += -mshort-calls
254 #CFLAGS += -fno-unit-at-a-time
256 #CFLAGS += -Wunreachable-code
257 #CFLAGS += -Wsign-compare
258 CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)
259 CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
260 CFLAGS += $(CSTANDARD)
263 #---------------- Compiler Options C++ ----------------
264 # -g*: generate debugging information
265 # -O*: optimization level
266 # -f...: tuning, see GCC manual and avr-libc documentation
267 # -Wall...: warning level
268 # -Wa,...: tell GCC to pass this to the assembler.
269 # -adhlns...: create assembler listing
270 CPPFLAGS = -g$(DEBUG)
271 CPPFLAGS += $(CPPDEFS)
273 CPPFLAGS += -funsigned-char
274 CPPFLAGS += -funsigned-bitfields
275 CPPFLAGS += -fpack-struct
276 CPPFLAGS += -fshort-enums
277 CPPFLAGS += -fno-exceptions
280 #CPPFLAGS += -mshort-calls
281 #CPPFLAGS += -fno-unit-at-a-time
282 #CPPFLAGS += -Wstrict-prototypes
283 #CPPFLAGS += -Wunreachable-code
284 #CPPFLAGS += -Wsign-compare
285 CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
286 CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
287 #CPPFLAGS += $(CSTANDARD)
290 #---------------- Assembler Options ----------------
291 # -Wa,...: tell GCC to pass this to the assembler.
292 # -adhlns: create listing
293 # -gstabs: have the assembler create line number information; note that
294 # for use in COFF files, additional information about filenames
295 # and function names needs to be present in the assembler source
296 # files -- see avr-libc docs [FIXME: not yet described there]
297 # -listing-cont-lines: Sets the maximum number of continuation lines of hex
298 # dump that will be displayed for a given single line of source input.
299 ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100
302 #---------------- Library Options ----------------
303 # Minimalistic printf version
304 PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
306 # Floating point printf version (requires MATH_LIB = -lm below)
307 PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
309 # If this is left blank, then it will use the Standard printf version.
311 #PRINTF_LIB = $(PRINTF_LIB_MIN)
312 #PRINTF_LIB = $(PRINTF_LIB_FLOAT)
315 # Minimalistic scanf version
316 SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
318 # Floating point + %[ scanf version (requires MATH_LIB = -lm below)
319 SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
321 # If this is left blank, then it will use the Standard scanf version.
323 #SCANF_LIB = $(SCANF_LIB_MIN)
324 #SCANF_LIB = $(SCANF_LIB_FLOAT)
330 # List any extra directories to look for libraries here.
331 # Each directory must be seperated by a space.
332 # Use forward slashes for directory separators.
333 # For a directory that has spaces, enclose it in quotes.
338 #---------------- External Memory Options ----------------
340 # 64 KB of external RAM, starting after internal RAM (ATmega128!),
341 # used for variables (.data/.bss) and heap (malloc()).
342 #EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
344 # 64 KB of external RAM, starting after internal RAM (ATmega128!),
345 # only used for heap (malloc()).
346 #EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff
352 #---------------- Linker Options ----------------
353 # -Wl,...: tell GCC to pass this to linker.
354 # -Map: create map file
355 # --cref: add cross reference to map file
356 LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
357 LDFLAGS += -Wl,--relax
358 LDFLAGS += -Wl,--gc-sections
359 LDFLAGS += $(EXTMEMOPTS)
360 LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
361 LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
362 #LDFLAGS += -T linker_script.x
366 #---------------- Programming Options (avrdude) ----------------
368 # Programming hardware
370 # to get a full listing.
372 AVRDUDE_PROGRAMMER = jtagmkII
374 # com1 = serial port. Use lpt1 to connect to parallel port.
377 AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
378 #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
381 # Uncomment the following if you want avrdude's erase cycle counter.
382 # Note that this counter needs to be initialized first using -Yn,
383 # see avrdude manual.
384 #AVRDUDE_ERASE_COUNTER = -y
386 # Uncomment the following if you do /not/ wish a verification to be
387 # performed after programming the device.
388 #AVRDUDE_NO_VERIFY = -V
390 # Increase verbosity level. Please use this when submitting bug
391 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
392 # to submit bug reports.
393 #AVRDUDE_VERBOSE = -v -v
395 AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
396 AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
397 AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
398 AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
402 #---------------- Debugging Options ----------------
404 # For simulavr only - target MCU frequency.
405 DEBUG_MFREQ = $(F_CPU)
407 # Set the DEBUG_UI to either gdb or insight.
411 # Set the debugging back-end to either avarice, simulavr.
412 DEBUG_BACKEND = avarice
413 #DEBUG_BACKEND = simulavr
416 GDBINIT_FILE = __avr_gdbinit
418 # When using avarice settings for the JTAG
421 # Debugging port used to communicate between GDB / avarice / simulavr.
424 # Debugging host used to communicate between GDB / avarice / simulavr, normally
425 # just set to localhost unless doing some sort of crazy debugging when
426 # avarice is running on a different computer.
427 DEBUG_HOST = localhost
431 #============================================================================
434 # Define programs and commands.
437 OBJCOPY = avr-objcopy
438 OBJDUMP = avr-objdump
451 MSG_ERRORS_NONE = Errors: none
452 MSG_BEGIN = -------- begin --------
453 MSG_END = -------- end --------
454 MSG_SIZE_BEFORE = Size before:
455 MSG_SIZE_AFTER = Size after:
456 MSG_COFF = Converting to AVR COFF:
457 MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
458 MSG_FLASH = Creating load file for Flash:
459 MSG_EEPROM = Creating load file for EEPROM:
460 MSG_EXTENDED_LISTING = Creating Extended Listing:
461 MSG_SYMBOL_TABLE = Creating Symbol Table:
462 MSG_LINKING = Linking:
463 MSG_COMPILING = Compiling C:
464 MSG_COMPILING_CPP = Compiling C++:
465 MSG_ASSEMBLING = Assembling:
466 MSG_CLEANING = Cleaning project:
467 MSG_CREATING_LIBRARY = Creating library:
472 # Define all object files.
473 OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
475 # Define all listing files.
476 LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
479 # Compiler flags to generate dependency files.
480 GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
483 # Combine all necessary flags and optional flags.
484 # Add target processor to flags.
485 ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
486 ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)
487 ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
494 all: begin gccversion sizebefore build sizeafter end
496 # Change the build target to build a HEX file or a library.
497 build: elf hex eep lss sym
506 LIBNAME=lib$(TARGET).a
512 # AVR Studio 3.x does not check make's exit code but relies on
513 # the following magic strings to be generated by the compile job.
523 # Display size of file.
524 HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
525 ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
526 MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
527 FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
531 @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
532 2>/dev/null; echo; fi
535 @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
536 2>/dev/null; echo; fi
540 # Display compiler version information.
545 # Program the device.
546 program: $(TARGET).hex $(TARGET).eep
547 $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
550 batchisp -hardware usb -device $(MCU) -operation erase f
551 batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program
552 batchisp -hardware usb -device $(MCU) -operation start reset 0
555 dfu-programmer $(MCU) erase
556 dfu-programmer $(MCU) flash $(TARGET).hex
557 dfu-programmer $(MCU) reset
559 flip-ee: $(TARGET).hex $(TARGET).eep
560 $(COPY) $(TARGET).eep $(TARGET)eep.hex
561 batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase
562 batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program
563 batchisp -hardware usb -device $(MCU) -operation start reset 0
564 $(REMOVE) $(TARGET)eep.hex
566 dfu-ee: $(TARGET).hex $(TARGET).eep
567 dfu-programmer $(MCU) eeprom-flash $(TARGET).eep
568 dfu-programmer $(MCU) reset
571 # Generate avr-gdb config/init file which does the following:
572 # define the reset signal, load the target file, connect to target, and set
573 # a breakpoint at main().
575 @$(REMOVE) $(GDBINIT_FILE)
576 @echo define reset >> $(GDBINIT_FILE)
577 @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
578 @echo end >> $(GDBINIT_FILE)
579 @echo file $(TARGET).elf >> $(GDBINIT_FILE)
580 @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)
581 ifeq ($(DEBUG_BACKEND),simulavr)
582 @echo load >> $(GDBINIT_FILE)
584 @echo break main >> $(GDBINIT_FILE)
586 debug: gdb-config $(TARGET).elf
587 ifeq ($(DEBUG_BACKEND), avarice)
588 @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
589 @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
590 $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
591 @$(WINSHELL) /c pause
594 @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
595 $(DEBUG_MFREQ) --port $(DEBUG_PORT)
597 @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
602 # Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
603 COFFCONVERT = $(OBJCOPY) --debugging
604 COFFCONVERT += --change-section-address .data-0x800000
605 COFFCONVERT += --change-section-address .bss-0x800000
606 COFFCONVERT += --change-section-address .noinit-0x800000
607 COFFCONVERT += --change-section-address .eeprom-0x810000
613 @echo $(MSG_COFF) $(TARGET).cof
614 $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
617 extcoff: $(TARGET).elf
619 @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
620 $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
624 # Create final output files (.hex, .eep) from ELF output file.
627 @echo $(MSG_FLASH) $@
628 $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@
632 @echo $(MSG_EEPROM) $@
633 -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
634 --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0
636 # Create extended listing file from ELF output file.
639 @echo $(MSG_EXTENDED_LISTING) $@
640 $(OBJDUMP) -h -S -z $< > $@
642 # Create a symbol table from ELF output file.
645 @echo $(MSG_SYMBOL_TABLE) $@
650 # Create library from object files.
651 .SECONDARY : $(TARGET).a
655 @echo $(MSG_CREATING_LIBRARY) $@
659 # Link: create ELF output file from object files.
660 .SECONDARY : $(TARGET).elf
664 @echo $(MSG_LINKING) $@
665 $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
668 # Compile: create object files from C source files.
671 @echo $(MSG_COMPILING) $<
672 $(CC) -c $(ALL_CFLAGS) $< -o $@
675 # Compile: create object files from C++ source files.
676 $(OBJDIR)/%.o : %.cpp
678 @echo $(MSG_COMPILING_CPP) $<
679 $(CC) -c $(ALL_CPPFLAGS) $< -o $@
682 # Compile: create assembler files from C source files.
684 $(CC) -S $(ALL_CFLAGS) $< -o $@
687 # Compile: create assembler files from C++ source files.
689 $(CC) -S $(ALL_CPPFLAGS) $< -o $@
692 # Assemble: create object files from assembler source files.
695 @echo $(MSG_ASSEMBLING) $<
696 $(CC) -c $(ALL_ASFLAGS) $< -o $@
699 # Create preprocessed source for use in sending a bug report.
701 $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@
704 # Target: clean project.
705 clean: begin clean_list end
709 @echo $(MSG_CLEANING)
710 $(REMOVE) $(TARGET).hex
711 $(REMOVE) $(TARGET).eep
712 $(REMOVE) $(TARGET).cof
713 $(REMOVE) $(TARGET).elf
714 $(REMOVE) $(TARGET).map
715 $(REMOVE) $(TARGET).sym
716 $(REMOVE) $(TARGET).lss
717 $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
718 $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
719 $(REMOVE) $(SRC:.c=.s)
720 $(REMOVE) $(SRC:.c=.d)
721 $(REMOVE) $(SRC:.c=.i)
725 @echo Generating Project Documentation \($(TARGET)\)...
726 @if ( doxygen Doxygen.conf 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then \
729 @echo Documentation Generation Complete.
735 @for f in $(SRC) $(CPPSRC) $(ASRC); do \
736 if [ -f $$f ]; then \
737 echo "Found Source File: $$f" ; \
739 echo "Source File Not Found: $$f" ; \
743 # Create object files directory
744 $(shell mkdir $(OBJDIR) 2>/dev/null)
747 # Include the dependency files.
748 -include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
751 # Listing of phony targets.
752 .PHONY : all begin finish end sizebefore sizeafter gccversion \
753 build elf hex eep lss sym coff extcoff doxygen clean \
754 clean_list clean_doxygen program dfu flip flip-ee dfu-ee \
755 debug gdb-config checksource