diff --git a/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/Makefile b/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/Makefile index c79414fe94..eec39ba295 100644 --- a/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/Makefile +++ b/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/Makefile @@ -1,5 +1,5 @@ OUTPUT_DIR := ./output -IMAGE := RTOSDemo.out +IMAGE := $(OUTPUT_DIR)/RTOSDemo.out # The directory that contains the /source and /demo sub directories. FREERTOS_ROOT = ./../../../.. @@ -35,7 +35,7 @@ SOURCE_FILES += $(KERNEL_DIR)/portable/MemMang/heap_4.c SOURCE_FILES += $(KERNEL_DIR)/portable/GCC/ARM_CM3/port.c # -# Common demo files for the "full" build, as opposed to the "blinky" build - +# Common demo files for the "full" build, as opposed to the "blinky" build - # these files are build by all the FreeRTOS kernel demos. # DEMO_ROOT = $(FREERTOS_ROOT)/Demo @@ -95,27 +95,27 @@ DEP_FILES := $(SOURCE_FILES:%.c=$(OUTPUT_DIR)/%.d) DEP_FILES_NO_PATH = $(notdir $(DEP_FILES)) DEP_OUTPUT = $(DEP_FILES_NO_PATH:%.d=$(OUTPUT_DIR)/%.d) -all: $(OUTPUT_DIR)/$(IMAGE) +all: $(IMAGE) %.o : %.c $(OUTPUT_DIR)/%.o : %.c $(OUTPUT_DIR)/%.d Makefile $(CC) $(CFLAGS) -c $< -o $@ -$(OUTPUT_DIR)/$(IMAGE): ./mps2_m3.ld $(OBJS_OUTPUT) Makefile +$(IMAGE): ./mps2_m3.ld $(OBJS_OUTPUT) Makefile @echo "" @echo "" @echo "--- Final linking ---" @echo "" $(LD) $(OBJS_OUTPUT) $(CFLAGS) -Xlinker --gc-sections -Xlinker -T ./mps2_m3.ld \ -Xlinker -Map=$(OUTPUT_DIR)/RTOSDemo.map -specs=nano.specs \ - -specs=nosys.specs -specs=rdimon.specs -o $(OUTPUT_DIR)/$(IMAGE) - $(SIZE) $(OUTPUT_DIR)/$(IMAGE) + -specs=nosys.specs -specs=rdimon.specs -o $(IMAGE) + $(SIZE) $(IMAGE) $(DEP_OUTPUT): include $(wildcard $(DEP_OUTPUT)) clean: - rm -f $(OUTPUT_DIR)/$(IMAGE) $(OUTPUT_DIR)/*.o $(OUTPUT_DIR)/*.d + rm -f $(IMAGE) $(OUTPUT_DIR)/RTOSDemo.map $(OUTPUT_DIR)/*.o $(OUTPUT_DIR)/*.d #use "make print-[VARIABLE_NAME] to print the value of a variable generated by #this makefile.