From fbe0e4d00ba7e026b8b848cfcd0ed583a71f8069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 7 Mar 2017 10:10:09 +0100 Subject: Just huge update --- template/Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'template') diff --git a/template/Makefile b/template/Makefile index bc0643f..59218a2 100644 --- a/template/Makefile +++ b/template/Makefile @@ -41,25 +41,29 @@ include ioeconfig # If you want change some standard CFLAGS, change them in configuration not here. # Add here only options that should not be applied to avr-ioe also. CFLAGS = -Iavr-ioe/include -mmcu=$(MMCU) -imacros avr-ioe/build/config.h \ - $(shell echo $(CONFCFLAGS)) $(shell echo -DF_CPU=$(F_CPU)000L) + $(shell echo $(CCFLAGS)) $(shell echo -DF_CPU=$(F_CPU)000L) +CC = $(CHOST)gcc +AR = $(CHOST)ar +CPP = $(CHOST)cpp +OBJCOPY = $(CHOST)objcopy $(PROJNAME).elf: avr-ioe/libioe.a $(PROJNAME).elf: $(OBJ) @echo " LD $@" - $(Q)avr-gcc -Os -mmcu=$(MMCU) $^ -o $@ -Lavr-ioe -lioe + $(Q)$(CC) -Os -mmcu=$(MMCU) $^ -o $@ -Lavr-ioe -lioe $(PROJNAME).hex: $(PROJNAME).elf @echo " OBJCOPY $@" - $(Q)avr-objcopy -O ihex -R .eeprom $< $@ + $(Q)$(OBJCOPY) -O ihex -R .eeprom $< $@ $(OBJ): %.o: %.c avr-ioe/build/config.h @echo " CC $@" - $(Q)avr-gcc $(CFLAGS) -c -o $@ $< + $(Q)$(CC) $(CFLAGS) -c -o $@ $< avr-ioe/libioe.a: ioeconfig - $(Q)$(MAKE) -C avr-ioe libioe.a CONFIG="$$( readlink -f ioeconfig )" + $(Q)+$(MAKE) -C avr-ioe libioe.a CONFIG="$$( readlink -f ioeconfig )" avr-ioe/build/config.h: ioeconfig - $(Q)$(MAKE) -C avr-ioe build/config.h CONFIG="$$( readlink -f ioeconfig )" + $(Q)+$(MAKE) -C avr-ioe build/config.h CONFIG="$$( readlink -f ioeconfig )" endif .config: -- cgit v1.2.3