Minor documentation fix for the RelayBoard project.
[pub/USBasp.git] / LUFA / CodeTemplates / makefile_template.avr8
index 5cfacb4..26a3b14 100644 (file)
@@ -63,7 +63,7 @@
 MCU = ### INSERT NAME OF MICROCONTROLLER MODEL HERE ###\r
 \r
 \r
-# Target architecture (see library "Board Types" documentation).\r
+# Targeted chip architecture (see library "Architectures" documentation)\r
 ARCH = AVR8\r
 \r
 \r
@@ -133,6 +133,7 @@ SRC = $(TARGET).c                                                 \
          $(LUFA_SRC_USBCLASS)\r
       ### INSERT ADDITIONAL PROJECT SOURCE FILENAMES OR LUFA MODULE NAMES HERE ###\r
 \r
+\r
 # List C++ source files here. (C dependencies are automatically generated.)\r
 CPPSRC = \r
 \r
@@ -153,13 +154,6 @@ ASRC =
 OPT = s\r
 \r
 \r
-# Debugging format.\r
-#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
-#     AVR Studio 4.10 requires dwarf-2.\r
-#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
-DEBUG = dwarf-2\r
-\r
-\r
 # List any extra directories to look for include files here.\r
 #     Each directory must be seperated by a space.\r
 #     Use forward slashes for directory separators.\r
@@ -172,31 +166,38 @@ EXTRAINCDIRS = $(LUFA_PATH)/
 #     gnu89 = c89 plus GCC extensions\r
 #     c99   = ISO C99 standard (not yet fully implemented)\r
 #     gnu99 = c99 plus GCC extensions\r
-CSTANDARD = -std=c99\r
+CSTANDARD = -std=gnu99\r
 \r
 \r
 # Place -D or -U options here for C sources\r
 CDEFS  = -DF_CPU=$(F_CPU)UL\r
-CDEFS += -DF_CLOCK=$(F_CLOCK)UL\r
+CDEFS += -DF_USB=$(F_USB)UL\r
 CDEFS += -DBOARD=BOARD_$(BOARD)\r
+CDEFS += -DARCH=ARCH_$(ARCH)\r
 CDEFS += $(LUFA_OPTS)\r
 \r
 \r
 # Place -D or -U options here for ASM sources\r
 ADEFS  = -DF_CPU=$(F_CPU)\r
-ADEFS += -DF_CLOCK=$(F_CLOCK)UL\r
+ADEFS += -DF_USB=$(F_USB)UL\r
 ADEFS += -DBOARD=BOARD_$(BOARD)\r
+ADEFS += -DARCH=ARCH_$(ARCH)\r
 ADEFS += $(LUFA_OPTS)\r
 \r
 # Place -D or -U options here for C++ sources\r
 CPPDEFS  = -DF_CPU=$(F_CPU)UL\r
-CPPDEFS += -DF_CLOCK=$(F_CLOCK)UL\r
+CPPDEFS += -DF_USB=$(F_USB)UL\r
 CPPDEFS += -DBOARD=BOARD_$(BOARD)\r
+CPPDEFS += -DARCH=ARCH_$(ARCH)\r
 CPPDEFS += $(LUFA_OPTS)\r
-#CPPDEFS += -D__STDC_LIMIT_MACROS\r
-#CPPDEFS += -D__STDC_CONSTANT_MACROS\r
 \r
 \r
+# Debugging format.\r
+#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.\r
+#     AVR Studio 4.10 requires dwarf-2.\r
+#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.\r
+DEBUG = dwarf-2\r
+\r
 \r
 #---------------- Compiler Options C ----------------\r
 #  -g*:          generate debugging information\r
@@ -217,11 +218,6 @@ CFLAGS += -fshort-enums
 CFLAGS += -fno-strict-aliasing\r
 CFLAGS += -Wall\r
 CFLAGS += -Wstrict-prototypes\r
-#CFLAGS += -mshort-calls\r
-#CFLAGS += -fno-unit-at-a-time\r
-#CFLAGS += -Wundef\r
-#CFLAGS += -Wunreachable-code\r
-#CFLAGS += -Wsign-compare\r
 CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)\r
 CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
 CFLAGS += $(CSTANDARD)\r
@@ -241,14 +237,11 @@ CPPFLAGS += -funsigned-char
 CPPFLAGS += -funsigned-bitfields\r
 CPPFLAGS += -fpack-struct\r
 CPPFLAGS += -fshort-enums\r
+CPPFLAGS += -ffunction-sections\r
+CPPFLAGS += -fno-strict-aliasing\r
 CPPFLAGS += -fno-exceptions\r
 CPPFLAGS += -Wall\r
 CPPFLAGS += -Wundef\r
-#CPPFLAGS += -mshort-calls\r
-#CPPFLAGS += -fno-unit-at-a-time\r
-#CPPFLAGS += -Wstrict-prototypes\r
-#CPPFLAGS += -Wunreachable-code\r
-#CPPFLAGS += -Wsign-compare\r
 CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)\r
 CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))\r
 #CPPFLAGS += $(CSTANDARD)\r
@@ -592,7 +585,7 @@ extcoff: $(TARGET).elf
 %.hex: %.elf\r
        @echo\r
        @echo $(MSG_FLASH) $@\r
-       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock $< $@\r
+       $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@\r
 \r
 %.eep: %.elf\r
        @echo\r
@@ -696,6 +689,15 @@ doxygen:
 clean_doxygen:\r
        rm -rf Documentation\r
 \r
+checksource:\r
+       @for f in $(SRC) $(CPPSRC) $(ASRC); do \\r
+               if [ -f $$f ]; then \\r
+                       echo "Found Source File: $$f" ; \\r
+               else \\r
+                       echo "Source File Not Found: $$f" ; \\r
+               fi; done \r
+\r
+\r
 # Create object files directory\r
 $(shell mkdir $(OBJDIR) 2>/dev/null)\r
 \r
@@ -708,4 +710,4 @@ $(shell mkdir $(OBJDIR) 2>/dev/null)
 .PHONY : all begin finish end sizebefore sizeafter gccversion \\r
 build elf hex eep lss sym coff extcoff doxygen clean          \\r
 clean_list clean_doxygen program dfu flip flip-ee dfu-ee      \\r
-debug gdb-config\r
+debug gdb-config checksource\r