|
1 | 1 | OUTPUT_DIR := ./output |
2 | | -IMAGE := RTOSDemo.out |
| 2 | +IMAGE := $(OUTPUT_DIR)/RTOSDemo.out |
3 | 3 |
|
4 | 4 | # The directory that contains the /source and /demo sub directories. |
5 | 5 | FREERTOS_ROOT = ./../../../.. |
@@ -35,7 +35,7 @@ SOURCE_FILES += $(KERNEL_DIR)/portable/MemMang/heap_4.c |
35 | 35 | SOURCE_FILES += $(KERNEL_DIR)/portable/GCC/ARM_CM3/port.c |
36 | 36 |
|
37 | 37 | # |
38 | | -# Common demo files for the "full" build, as opposed to the "blinky" build - |
| 38 | +# Common demo files for the "full" build, as opposed to the "blinky" build - |
39 | 39 | # these files are build by all the FreeRTOS kernel demos. |
40 | 40 | # |
41 | 41 | DEMO_ROOT = $(FREERTOS_ROOT)/Demo |
@@ -95,27 +95,27 @@ DEP_FILES := $(SOURCE_FILES:%.c=$(OUTPUT_DIR)/%.d) |
95 | 95 | DEP_FILES_NO_PATH = $(notdir $(DEP_FILES)) |
96 | 96 | DEP_OUTPUT = $(DEP_FILES_NO_PATH:%.d=$(OUTPUT_DIR)/%.d) |
97 | 97 |
|
98 | | -all: $(OUTPUT_DIR)/$(IMAGE) |
| 98 | +all: $(IMAGE) |
99 | 99 |
|
100 | 100 | %.o : %.c |
101 | 101 | $(OUTPUT_DIR)/%.o : %.c $(OUTPUT_DIR)/%.d Makefile |
102 | 102 | $(CC) $(CFLAGS) -c $< -o $@ |
103 | 103 |
|
104 | | -$(OUTPUT_DIR)/$(IMAGE): ./mps2_m3.ld $(OBJS_OUTPUT) Makefile |
| 104 | +$(IMAGE): ./mps2_m3.ld $(OBJS_OUTPUT) Makefile |
105 | 105 | @echo "" |
106 | 106 | @echo "" |
107 | 107 | @echo "--- Final linking ---" |
108 | 108 | @echo "" |
109 | 109 | $(LD) $(OBJS_OUTPUT) $(CFLAGS) -Xlinker --gc-sections -Xlinker -T ./mps2_m3.ld \ |
110 | 110 | -Xlinker -Map=$(OUTPUT_DIR)/RTOSDemo.map -specs=nano.specs \ |
111 | | - -specs=nosys.specs -specs=rdimon.specs -o $(OUTPUT_DIR)/$(IMAGE) |
112 | | - $(SIZE) $(OUTPUT_DIR)/$(IMAGE) |
| 111 | + -specs=nosys.specs -specs=rdimon.specs -o $(IMAGE) |
| 112 | + $(SIZE) $(IMAGE) |
113 | 113 |
|
114 | 114 | $(DEP_OUTPUT): |
115 | 115 | include $(wildcard $(DEP_OUTPUT)) |
116 | 116 |
|
117 | 117 | clean: |
118 | | - rm -f $(OUTPUT_DIR)/$(IMAGE) $(OUTPUT_DIR)/*.o $(OUTPUT_DIR)/*.d |
| 118 | + rm -f $(IMAGE) $(OUTPUT_DIR)/RTOSDemo.map $(OUTPUT_DIR)/*.o $(OUTPUT_DIR)/*.d |
119 | 119 |
|
120 | 120 | #use "make print-[VARIABLE_NAME] to print the value of a variable generated by |
121 | 121 | #this makefile. |
|
0 commit comments