From 591b4fa6d868890b588b919cf15fd8e5863ed795 Mon Sep 17 00:00:00 2001 From: Joachim Schleicher Date: Fri, 20 Jan 2012 15:05:04 +0100 Subject: correct dependencies in Makefile applet/$(TARGET).elf should depend on the cpp file, not on .pde so that the cpp is rebuilt when pde changes. We drop the target applet_files to achieve the correct behaviour. Now 'make upload' does rebuild the hex file as well. --- Sprinter/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Sprinter') diff --git a/Sprinter/Makefile b/Sprinter/Makefile index 7e888b0..af1e6a7 100644 --- a/Sprinter/Makefile +++ b/Sprinter/Makefile @@ -127,11 +127,11 @@ ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) # Default target. -all: applet_files build sizeafter +all: build sizeafter build: elf hex -applet_files: $(TARGET).pde +applet/$(TARGET).cpp: $(TARGET).pde # Here is the "preprocessing". # It creates a .cpp file based with the same name as the .pde file. # On top of the new .cpp file comes the WProgram.h header. @@ -199,7 +199,7 @@ extcoff: $(TARGET).elf $(NM) -n $< > $@ # Link: create ELF output file from library. -applet/$(TARGET).elf: $(TARGET).pde applet/core.a +applet/$(TARGET).elf: applet/core.a applet/$(TARGET).cpp $(CC) $(ALL_CFLAGS) -Wl,--gc-sections -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS) applet/core.a: $(OBJ) @@ -244,4 +244,4 @@ depend: >> $(MAKEFILE); \ $(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE) -.PHONY: all build elf hex eep lss sym program coff extcoff clean depend applet_files sizebefore sizeafter +.PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter -- cgit v1.2.1 From 77c3dd85ece0cb56e632a9eb4b335e24a33a8b7f Mon Sep 17 00:00:00 2001 From: Joachim Schleicher Date: Fri, 20 Jan 2012 15:12:29 +0100 Subject: fix indentation This should be a comment. Instead it is printed together with the 'upload' target, when idented. --- Sprinter/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Sprinter') diff --git a/Sprinter/Makefile b/Sprinter/Makefile index af1e6a7..639cf1b 100644 --- a/Sprinter/Makefile +++ b/Sprinter/Makefile @@ -155,7 +155,7 @@ upload: applet/$(TARGET).hex $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) - # Display size of file. +# Display size of file. HEXSIZE = $(SIZE) --target=$(FORMAT) applet/$(TARGET).hex ELFSIZE = $(SIZE) applet/$(TARGET).elf sizebefore: @@ -198,7 +198,7 @@ extcoff: $(TARGET).elf .elf.sym: $(NM) -n $< > $@ - # Link: create ELF output file from library. +# Link: create ELF output file from library. applet/$(TARGET).elf: applet/core.a applet/$(TARGET).cpp $(CC) $(ALL_CFLAGS) -Wl,--gc-sections -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS) -- cgit v1.2.1