From 19655b725958ce0f6510d256aea9b042ef482351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Wed, 24 Aug 2016 21:15:51 +0200 Subject: [PATCH] fixed Makefile --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9fa5a7d..d8e3e72 100644 --- a/Makefile +++ b/Makefile @@ -37,8 +37,8 @@ CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles #################################################################################### -OBJ = $(CFILES:%.c=%.o) -OBJ += $(ASFILES:%.S=%.o) +OBJ = $(CFILES:%.c=%.c.o) +ASOBJ = $(ASFILES:%.S=%.S.o) default: $(target).elf @@ -52,14 +52,15 @@ default: $(target).elf #Linking -$(target).elf: $(OBJ) +$(target).elf: $(OBJ) $(ASOBJ) $(CC) $(LFLAGS) $(LIBRARYPATH) -o $@ $^ $(LIBRARIES) #Compiling -%.o: %.c +%.c.o: %.c $(CC) $(CFLAGS) $(INCLUDEPATH) $(DEFINES) -o $@ $< - +%.S.o: %.S + $(CC) $(CFLAGS) $(INCLUDEPATH) $(DEFINES) -o $@ $< .PHONY: qtproject clean mrproper objcopy disassemble @@ -72,7 +73,7 @@ mrproper: rm -f $(target).pro clean: - rm -f $(target).elf $(target).bin $(target).hex $(OBJ) $(mapfile).map $(target).lss + rm -f $(target).elf $(target).bin $(target).hex $(OBJ) $(ASOBJ) $(mapfile).map $(target).lss qtproject: echo -e "TEMPLATE = app\nCONFIG -= console app_bundle qt" > $(target).pro echo -e "SOURCES += $(CFILES) $(ASFILES)" >> $(target).pro