fixed Makefile

This commit is contained in:
Mario Hüttel 2016-08-24 21:15:51 +02:00
parent 376c346579
commit 19655b7259

View File

@ -37,8 +37,8 @@ CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles
#################################################################################### ####################################################################################
OBJ = $(CFILES:%.c=%.o) OBJ = $(CFILES:%.c=%.c.o)
OBJ += $(ASFILES:%.S=%.o) ASOBJ = $(ASFILES:%.S=%.S.o)
default: $(target).elf default: $(target).elf
@ -52,14 +52,15 @@ default: $(target).elf
#Linking #Linking
$(target).elf: $(OBJ) $(target).elf: $(OBJ) $(ASOBJ)
$(CC) $(LFLAGS) $(LIBRARYPATH) -o $@ $^ $(LIBRARIES) $(CC) $(LFLAGS) $(LIBRARYPATH) -o $@ $^ $(LIBRARIES)
#Compiling #Compiling
%.o: %.c %.c.o: %.c
$(CC) $(CFLAGS) $(INCLUDEPATH) $(DEFINES) -o $@ $< $(CC) $(CFLAGS) $(INCLUDEPATH) $(DEFINES) -o $@ $<
%.S.o: %.S
$(CC) $(CFLAGS) $(INCLUDEPATH) $(DEFINES) -o $@ $<
.PHONY: qtproject clean mrproper objcopy disassemble .PHONY: qtproject clean mrproper objcopy disassemble
@ -72,7 +73,7 @@ mrproper:
rm -f $(target).pro rm -f $(target).pro
clean: 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: qtproject:
echo -e "TEMPLATE = app\nCONFIG -= console app_bundle qt" > $(target).pro echo -e "TEMPLATE = app\nCONFIG -= console app_bundle qt" > $(target).pro
echo -e "SOURCES += $(CFILES) $(ASFILES)" >> $(target).pro echo -e "SOURCES += $(CFILES) $(ASFILES)" >> $(target).pro