X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=BaseTinyFirmware%2FGCC%2Favr463%2FMakefile;h=53aebb18583967fcb3b80b22fe903a03126b216e;hb=65612c4c7df34cdae10f9427ace6fd9e9e430d05;hp=44c49e4ee106af91dd3409db9bed26c9a69cf767;hpb=e69ce471b5201b021291e8a406d371fc451a2ace;p=avr_bc100.git diff --git a/BaseTinyFirmware/GCC/avr463/Makefile b/BaseTinyFirmware/GCC/avr463/Makefile index 44c49e4..53aebb1 100644 --- a/BaseTinyFirmware/GCC/avr463/Makefile +++ b/BaseTinyFirmware/GCC/avr463/Makefile @@ -5,16 +5,19 @@ ## General Flags PROJECT = avr463 MCU = attiny861 -TARGET = avr463.elf -CC = avr-gcc.exe +TARGET = $(PROJECT).elf +CC = avr-gcc ## Options common to compile, link and assembly rules COMMON = -mmcu=$(MCU) ## Compile options common for all C compilation units. CFLAGS = $(COMMON) -CFLAGS += -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -DNIMH -CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d +CFLAGS += -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections +CFLAGS += -fno-inline-small-functions -fno-split-wide-types +CFLAGS += -Wall -Wstrict-prototypes -Wundef -Wa,-adhlns=./$(*F).lst +CFLAGS += -MMD -MP -MF dep/$(@F).d +CFLAGS += -DNIMH ## Assembly specific flags ASMFLAGS = $(COMMON) @@ -23,7 +26,7 @@ ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 ## Linker flags LDFLAGS = $(COMMON) -LDFLAGS += -Wl,-Map=avr463.map -Wl,-relax +LDFLAGS += -Wl,-Map=$(PROJECT).map,--cref -Wl,-gc-sections -Wl,-relax ## Intel Hex file production flags @@ -44,7 +47,7 @@ OBJECTS = ADC.o battery.o chargefunc.o main.o menu.o NIMHcharge.o OWI.o PWM.o st LINKONLYOBJECTS = ## Build -all: $(TARGET) avr463.hex avr463.eep avr463.lss size +all: $(TARGET) $(PROJECT).hex $(PROJECT).eep $(PROJECT).lss size ## Compile ADC.o: ../ADC.c @@ -100,9 +103,8 @@ size: ${TARGET} ## Clean target .PHONY: clean clean: - -rm -rf $(OBJECTS) avr463.elf dep avr463.hex avr463.eep avr463.lss avr463.map + -rm -rf $(OBJECTS) $(PROJECT).elf dep $(PROJECT).hex $(PROJECT).eep $(PROJECT).lss $(PROJECT).map *.lst ## Other dependencies -include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) -