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