1 | -include build.mk |
---|
2 | |
---|
3 | export # export all variable to sub-Makefile |
---|
4 | CC = mipsel-unknown-elf-gcc |
---|
5 | AS = mipsel-unknown-elf-as |
---|
6 | LD = mipsel-unknown-elf-ld |
---|
7 | DU = mipsel-unknown-elf-objdump |
---|
8 | |
---|
9 | ### FAT parameters definition for Disk image |
---|
10 | ### sector_size = 512 |
---|
11 | ### partition_begin_lba = 300 |
---|
12 | ### sector_per_cluster = 8 |
---|
13 | ### partition sectors = 524832 |
---|
14 | |
---|
15 | MAP_XML ?= mappings/tsar_leti_4_4_4_transpose.xml |
---|
16 | |
---|
17 | ### Objects to be linked for kernel.elf |
---|
18 | KERNEL_OBJS = build/common/utils.o \ |
---|
19 | build/common/vmem.o \ |
---|
20 | build/fat32/fat32.o \ |
---|
21 | build/drivers/dma_driver.o \ |
---|
22 | build/drivers/cma_driver.o \ |
---|
23 | build/drivers/fbf_driver.o \ |
---|
24 | build/drivers/xcu_driver.o \ |
---|
25 | build/drivers/icu_driver.o \ |
---|
26 | build/drivers/ioc_driver.o \ |
---|
27 | build/drivers/bdv_driver.o \ |
---|
28 | build/drivers/hba_driver.o \ |
---|
29 | build/drivers/sdc_driver.o \ |
---|
30 | build/drivers/spi_driver.o \ |
---|
31 | build/drivers/rdk_driver.o \ |
---|
32 | build/drivers/iob_driver.o \ |
---|
33 | build/drivers/mmc_driver.o \ |
---|
34 | build/drivers/mwr_driver.o \ |
---|
35 | build/drivers/nic_driver.o \ |
---|
36 | build/drivers/tim_driver.o \ |
---|
37 | build/drivers/tty_driver.o \ |
---|
38 | build/drivers/pic_driver.o \ |
---|
39 | build/kernel/giet.o \ |
---|
40 | build/kernel/switch.o \ |
---|
41 | build/kernel/ctx_handler.o \ |
---|
42 | build/kernel/exc_handler.o \ |
---|
43 | build/kernel/sys_handler.o \ |
---|
44 | build/kernel/irq_handler.o \ |
---|
45 | build/kernel/kernel_init.o |
---|
46 | |
---|
47 | ### Objects to be linked for boot.elf |
---|
48 | BOOT_OBJS = build/common/utils.o \ |
---|
49 | build/common/vmem.o \ |
---|
50 | build/fat32/fat32.o \ |
---|
51 | build/drivers/dma_driver.o \ |
---|
52 | build/drivers/tty_driver.o \ |
---|
53 | build/drivers/pic_driver.o \ |
---|
54 | build/drivers/xcu_driver.o \ |
---|
55 | build/drivers/ioc_driver.o \ |
---|
56 | build/drivers/iob_driver.o \ |
---|
57 | build/drivers/bdv_driver.o \ |
---|
58 | build/drivers/sdc_driver.o \ |
---|
59 | build/drivers/spi_driver.o \ |
---|
60 | build/drivers/rdk_driver.o \ |
---|
61 | build/drivers/mmc_driver.o \ |
---|
62 | build/drivers/mwr_driver.o \ |
---|
63 | build/kernel/ctx_handler.o \ |
---|
64 | build/kernel/switch.o \ |
---|
65 | build/boot/boot.o |
---|
66 | |
---|
67 | ### Objects to be linked for display.elf |
---|
68 | DISPLAY_OBJS = build/display/main.o \ |
---|
69 | build/libs/stdio.o |
---|
70 | |
---|
71 | ### Objects to be linked for router.elf |
---|
72 | ROUTER_OBJS = build/router/main.o \ |
---|
73 | build/libs/mwmr_channel.o \ |
---|
74 | build/libs/stdio.o |
---|
75 | |
---|
76 | ### Objects to be linked for hello.elf |
---|
77 | HELLO_OBJS = build/hello/main.o \ |
---|
78 | build/libs/stdio.o |
---|
79 | |
---|
80 | ### Objects to be linked for pgcd.elf |
---|
81 | PGCD_OBJS = build/pgcd/main.o \ |
---|
82 | build/libs/stdio.o |
---|
83 | |
---|
84 | ### Objects to be linked for game.elf |
---|
85 | GAMEOFLIFE_OBJS = build/gameoflife/main.o \ |
---|
86 | build/libs/stdio.o \ |
---|
87 | build/libs/barrier.o |
---|
88 | |
---|
89 | ### Objects to be linked for dhrystone.elf |
---|
90 | DHRYSTONE_OBJS = build/dhrystone/dhry_1.o \ |
---|
91 | build/dhrystone/dhry_2.o \ |
---|
92 | build/libs/stdlib.o \ |
---|
93 | build/libs/stdio.o \ |
---|
94 | build/libs/string.o \ |
---|
95 | build/libs/spin_lock.o \ |
---|
96 | build/libs/malloc.o |
---|
97 | |
---|
98 | ### Objects to be linked for sort.elf |
---|
99 | SORT_OBJS = build/sort/main.o \ |
---|
100 | build/libs/stdio.o \ |
---|
101 | build/libs/spin_lock.o \ |
---|
102 | build/libs/barrier.o |
---|
103 | |
---|
104 | ### Objects to be linked for transpose.elf |
---|
105 | TRANSPOSE_OBJS = build/transpose/main.o \ |
---|
106 | build/libs/stdio.o \ |
---|
107 | build/libs/malloc.o \ |
---|
108 | build/libs/spin_lock.o \ |
---|
109 | build/libs/barrier.o |
---|
110 | |
---|
111 | CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 |
---|
112 | |
---|
113 | |
---|
114 | GIET_INCLUDE = -Igiet_boot \ |
---|
115 | -Igiet_kernel \ |
---|
116 | -Igiet_xml \ |
---|
117 | -Igiet_fat32 \ |
---|
118 | -Igiet_drivers \ |
---|
119 | -Igiet_common \ |
---|
120 | -Igiet_libs \ |
---|
121 | -I. |
---|
122 | |
---|
123 | USER_INCLUDE = -Igiet_libs \ |
---|
124 | -Igiet_xml \ |
---|
125 | -I. |
---|
126 | |
---|
127 | DISK_IMAGE := hdd/virt_hdd.dmg |
---|
128 | |
---|
129 | ### Copy executable and miscellaneous files into disk image |
---|
130 | ### Copy bootloader into sector 2 of disk image |
---|
131 | all: $(DISK_IMAGE) \ |
---|
132 | $(MAP_XML) \ |
---|
133 | giet_config.h \ |
---|
134 | map.bin \ |
---|
135 | build/boot/boot.elf \ |
---|
136 | build/kernel/kernel.elf \ |
---|
137 | build/display/display.elf \ |
---|
138 | build/hello/hello.elf \ |
---|
139 | build/pgcd/pgcd.elf \ |
---|
140 | build/router/router.elf \ |
---|
141 | build/dhrystone/dhrystone.elf \ |
---|
142 | build/gameoflife/gameoflife.elf \ |
---|
143 | build/sort/sort.elf \ |
---|
144 | build/transpose/transpose.elf \ |
---|
145 | |
---|
146 | mcopy -o -i $(DISK_IMAGE) build/kernel/kernel.elf ::/build/kernel |
---|
147 | mcopy -o -i $(DISK_IMAGE) build/display/display.elf ::/build/display |
---|
148 | mcopy -o -i $(DISK_IMAGE) build/sort/sort.elf ::/build/sort |
---|
149 | mcopy -o -i $(DISK_IMAGE) build/transpose/transpose.elf ::/build/transpose |
---|
150 | mcopy -o -i $(DISK_IMAGE) build/hello/hello.elf ::/build/hello |
---|
151 | mcopy -o -i $(DISK_IMAGE) build/pgcd/pgcd.elf ::/build/pgcd |
---|
152 | mcopy -o -i $(DISK_IMAGE) build/router/router.elf ::/build/router |
---|
153 | mcopy -o -i $(DISK_IMAGE) build/gameoflife/gameoflife.elf ::/build/gameoflife |
---|
154 | mcopy -o -i $(DISK_IMAGE) build/dhrystone/dhrystone.elf ::/build/dhrystone |
---|
155 | mcopy -o -i $(DISK_IMAGE) transpose/images.raw ::/misc |
---|
156 | mcopy -o -i $(DISK_IMAGE) map.bin ::/ |
---|
157 | dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc |
---|
158 | |
---|
159 | ### Disk image generation |
---|
160 | ### This requires the generic LINUX/MacOS script "create_dmg" script |
---|
161 | ### written by C.Fuguet. (should be installed in GIET-VM root directory). |
---|
162 | $(DISK_IMAGE): |
---|
163 | ./create_dmg create $(basename $(DISK_IMAGE)) |
---|
164 | mmd -o -i $(DISK_IMAGE) ::/build |
---|
165 | mmd -o -i $(DISK_IMAGE) ::/build/kernel |
---|
166 | mmd -o -i $(DISK_IMAGE) ::/build/display |
---|
167 | mmd -o -i $(DISK_IMAGE) ::/build/sort |
---|
168 | mmd -o -i $(DISK_IMAGE) ::/build/transpose |
---|
169 | mmd -o -i $(DISK_IMAGE) ::/build/hello |
---|
170 | mmd -o -i $(DISK_IMAGE) ::/build/pgcd |
---|
171 | mmd -o -i $(DISK_IMAGE) ::/build/router |
---|
172 | mmd -o -i $(DISK_IMAGE) ::/build/gameoflife |
---|
173 | mmd -o -i $(DISK_IMAGE) ::/build/dhrystone |
---|
174 | mmd -o -i $(DISK_IMAGE) ::/misc |
---|
175 | dd if=$(DISK_IMAGE) of=temp.dmg count=65536 |
---|
176 | mv temp.dmg $(DISK_IMAGE) |
---|
177 | |
---|
178 | ### mapping compilation |
---|
179 | map.bin: $(MAP_XML) |
---|
180 | $(MAKE) -C giet_xml |
---|
181 | giet_xml/xml2bin $< . |
---|
182 | |
---|
183 | ### drivers compilation |
---|
184 | build/drivers/cma_driver.o: giet_drivers/cma_driver.c \ |
---|
185 | giet_drivers/cma_driver.h \ |
---|
186 | giet_config.h \ |
---|
187 | $(MAP_XML) |
---|
188 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
189 | |
---|
190 | build/drivers/dma_driver.o: giet_drivers/dma_driver.c \ |
---|
191 | giet_drivers/dma_driver.h \ |
---|
192 | giet_config.h \ |
---|
193 | $(MAP_XML) |
---|
194 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
195 | |
---|
196 | build/drivers/fbf_driver.o: giet_drivers/fbf_driver.c \ |
---|
197 | giet_drivers/fbf_driver.h \ |
---|
198 | giet_config.h \ |
---|
199 | $(MAP_XML) |
---|
200 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
201 | |
---|
202 | build/drivers/xcu_driver.o: giet_drivers/xcu_driver.c \ |
---|
203 | giet_drivers/xcu_driver.h \ |
---|
204 | giet_config.h \ |
---|
205 | $(MAP_XML) |
---|
206 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
207 | |
---|
208 | build/drivers/icu_driver.o: giet_drivers/icu_driver.c \ |
---|
209 | giet_drivers/icu_driver.h \ |
---|
210 | giet_config.h \ |
---|
211 | $(MAP_XML) |
---|
212 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
213 | |
---|
214 | build/drivers/ioc_driver.o: giet_drivers/ioc_driver.c \ |
---|
215 | giet_drivers/ioc_driver.h \ |
---|
216 | giet_config.h \ |
---|
217 | $(MAP_XML) |
---|
218 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
219 | |
---|
220 | build/drivers/bdv_driver.o: giet_drivers/bdv_driver.c \ |
---|
221 | giet_drivers/bdv_driver.h \ |
---|
222 | giet_config.h \ |
---|
223 | $(MAP_XML) |
---|
224 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
225 | |
---|
226 | build/drivers/hba_driver.o: giet_drivers/hba_driver.c \ |
---|
227 | giet_drivers/hba_driver.h \ |
---|
228 | giet_config.h \ |
---|
229 | $(MAP_XML) |
---|
230 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
231 | |
---|
232 | build/drivers/sdc_driver.o: giet_drivers/sdc_driver.c \ |
---|
233 | giet_drivers/sdc_driver.h \ |
---|
234 | giet_config.h \ |
---|
235 | $(MAP_XML) |
---|
236 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
237 | |
---|
238 | build/drivers/spi_driver.o: giet_drivers/spi_driver.c \ |
---|
239 | giet_drivers/spi_driver.h \ |
---|
240 | giet_config.h \ |
---|
241 | $(MAP_XML) |
---|
242 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
243 | |
---|
244 | build/drivers/rdk_driver.o: giet_drivers/rdk_driver.c \ |
---|
245 | giet_drivers/rdk_driver.h \ |
---|
246 | giet_config.h \ |
---|
247 | $(MAP_XML) |
---|
248 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
249 | |
---|
250 | build/drivers/iob_driver.o: giet_drivers/iob_driver.c \ |
---|
251 | giet_drivers/iob_driver.h \ |
---|
252 | giet_config.h \ |
---|
253 | $(MAP_XML) |
---|
254 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
255 | |
---|
256 | build/drivers/mmc_driver.o: giet_drivers/mmc_driver.c \ |
---|
257 | giet_drivers/mmc_driver.h \ |
---|
258 | giet_config.h \ |
---|
259 | $(MAP_XML) |
---|
260 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
261 | |
---|
262 | build/drivers/mwr_driver.o: giet_drivers/mwr_driver.c \ |
---|
263 | giet_drivers/mwr_driver.h \ |
---|
264 | giet_config.h \ |
---|
265 | $(MAP_XML) |
---|
266 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
267 | |
---|
268 | build/drivers/nic_driver.o: giet_drivers/nic_driver.c \ |
---|
269 | giet_drivers/nic_driver.h \ |
---|
270 | giet_config.h \ |
---|
271 | $(MAP_XML) |
---|
272 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
273 | |
---|
274 | build/drivers/tim_driver.o: giet_drivers/tim_driver.c \ |
---|
275 | giet_drivers/tim_driver.h \ |
---|
276 | giet_config.h \ |
---|
277 | $(MAP_XML) |
---|
278 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
279 | |
---|
280 | build/drivers/tty_driver.o: giet_drivers/tty_driver.c \ |
---|
281 | giet_drivers/tty_driver.h \ |
---|
282 | giet_config.h \ |
---|
283 | $(MAP_XML) |
---|
284 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
285 | |
---|
286 | build/drivers/pic_driver.o: giet_drivers/pic_driver.c \ |
---|
287 | giet_drivers/pic_driver.h \ |
---|
288 | giet_config.h \ |
---|
289 | $(MAP_XML) |
---|
290 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
291 | |
---|
292 | ### fat32 compilation |
---|
293 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
294 | giet_fat32/fat32.h \ |
---|
295 | giet_config.h \ |
---|
296 | $(MAP_XML) |
---|
297 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
298 | |
---|
299 | ### utils compilation |
---|
300 | build/common/utils.o: giet_common/utils.c \ |
---|
301 | giet_common/utils.h \ |
---|
302 | giet_config.h \ |
---|
303 | $(MAP_XML) |
---|
304 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
305 | |
---|
306 | ### vmem compilation |
---|
307 | build/common/vmem.o: giet_common/vmem.c \ |
---|
308 | giet_common/vmem.h \ |
---|
309 | giet_config.h \ |
---|
310 | $(MAP_XML) |
---|
311 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
312 | |
---|
313 | ### boot compilation |
---|
314 | build/boot/boot.elf: $(BOOT_OBJS) |
---|
315 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) |
---|
316 | $(DU) -D $@ > $@.txt |
---|
317 | |
---|
318 | build/boot/boot.o: giet_boot/boot.c \ |
---|
319 | giet_common/utils.h \ |
---|
320 | giet_fat32/fat32.h \ |
---|
321 | giet_common/vmem.h \ |
---|
322 | giet_drivers/tty_driver.h \ |
---|
323 | giet_drivers/ioc_driver.h \ |
---|
324 | giet_config.h \ |
---|
325 | $(MAP_XML) |
---|
326 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
327 | |
---|
328 | ### kernel compilation |
---|
329 | build/kernel/kernel.elf: $(KERNEL_OBJS) giet_kernel/kernel.ld |
---|
330 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) |
---|
331 | $(DU) -D $@ > $@.txt |
---|
332 | |
---|
333 | build/kernel/%.o: giet_kernel/%.c giet_config.h $(MAP_XML) |
---|
334 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
335 | |
---|
336 | build/kernel/%.o: giet_kernel/%.s giet_config.h $(MAP_XML) |
---|
337 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
338 | |
---|
339 | |
---|
340 | |
---|
341 | |
---|
342 | ### libs compilation |
---|
343 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
344 | giet_libs/stdio.h \ |
---|
345 | giet_config.h |
---|
346 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
347 | |
---|
348 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
349 | giet_libs/mwmr_channel.h \ |
---|
350 | giet_config.h |
---|
351 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
352 | |
---|
353 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
354 | giet_libs/malloc.h \ |
---|
355 | giet_libs/malloc_private.h \ |
---|
356 | giet_config.h |
---|
357 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
358 | |
---|
359 | build/libs/barrier.o: giet_libs/barrier.c \ |
---|
360 | giet_libs/barrier.h \ |
---|
361 | giet_config.h |
---|
362 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
363 | |
---|
364 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
365 | giet_libs/stdlib.h \ |
---|
366 | giet_config.h |
---|
367 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
368 | |
---|
369 | build/libs/string.o: giet_libs/string.c \ |
---|
370 | giet_libs/string.h \ |
---|
371 | giet_config.h |
---|
372 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
373 | |
---|
374 | build/libs/spin_lock.o: giet_libs/spin_lock.c \ |
---|
375 | giet_libs/spin_lock.h \ |
---|
376 | giet_config.h |
---|
377 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
378 | |
---|
379 | |
---|
380 | |
---|
381 | |
---|
382 | ### display compilation |
---|
383 | build/display/display.elf: $(DISPLAY_OBJS) display/display.ld |
---|
384 | $(LD) -o $@ -T display/display.ld $(DISPLAY_OBJS) |
---|
385 | $(DU) -D $@ > $@.txt |
---|
386 | |
---|
387 | build/display/main.o: display/main_cma.c |
---|
388 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
389 | |
---|
390 | ### router compilation |
---|
391 | build/router/router.elf: $(ROUTER_OBJS) router/router.ld |
---|
392 | $(LD) -o $@ -T router/router.ld $(ROUTER_OBJS) |
---|
393 | $(DU) -D $@ > $@.txt |
---|
394 | |
---|
395 | build/router/main.o: router/main.c |
---|
396 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
397 | |
---|
398 | ### hello compilation |
---|
399 | build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld |
---|
400 | $(LD) -o $@ -T hello/hello.ld $(HELLO_OBJS) |
---|
401 | $(DU) -D $@ > $@.txt |
---|
402 | |
---|
403 | build/hello/main.o: hello/main.c |
---|
404 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
405 | |
---|
406 | ### pgcd compilation |
---|
407 | build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld |
---|
408 | $(LD) -o $@ -T pgcd/pgcd.ld $(PGCD_OBJS) |
---|
409 | $(DU) -D $@ > $@.txt |
---|
410 | |
---|
411 | build/pgcd/main.o: pgcd/main.c |
---|
412 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
413 | |
---|
414 | ### gameoflife compilation |
---|
415 | build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) gameoflife/gameoflife.ld |
---|
416 | $(LD) -o $@ -T gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS) |
---|
417 | $(DU) -D $@ > $@.txt |
---|
418 | |
---|
419 | build/gameoflife/main.o: gameoflife/main.c |
---|
420 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< |
---|
421 | |
---|
422 | ### dhrystone compilation |
---|
423 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld |
---|
424 | $(LD) -o $@ -T dhrystone/dhrystone.ld $(DHRYSTONE_OBJS) |
---|
425 | $(DU) -D $@ > $@.txt |
---|
426 | |
---|
427 | build/dhrystone/dhry_1.o: dhrystone/dhry_1.c |
---|
428 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
429 | |
---|
430 | build/dhrystone/dhry_2.o: dhrystone/dhry_2.c |
---|
431 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
432 | |
---|
433 | ### sort compilation |
---|
434 | build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld |
---|
435 | $(LD) -o $@ -T sort/sort.ld $(SORT_OBJS) |
---|
436 | $(DU) -D $@ > $@.txt |
---|
437 | |
---|
438 | build/sort/main.o: sort/main.c |
---|
439 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
440 | |
---|
441 | ### transpose compilation |
---|
442 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld |
---|
443 | $(LD) -o $@ -T transpose/transpose.ld $(TRANSPOSE_OBJS) |
---|
444 | $(DU) -D $@ > $@.txt |
---|
445 | |
---|
446 | build/transpose/main.o: transpose/main.c |
---|
447 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
448 | |
---|
449 | ### clean |
---|
450 | clean: |
---|
451 | rm -f *.o *.elf *.bin *.txt core giet_vsegs.ld hard_config.h map.bin*~ |
---|
452 | $(MAKE) -s clean -C giet_xml |
---|
453 | rm -rf build/boot/* |
---|
454 | rm -rf build/fat32/* |
---|
455 | rm -rf build/common/* |
---|
456 | rm -rf build/drivers/* |
---|
457 | rm -rf build/kernel/* |
---|
458 | rm -rf build/reset/* |
---|
459 | rm -rf build/libs/* |
---|
460 | rm -rf build/pgcd/* |
---|
461 | rm -rf build/hello/* |
---|
462 | rm -rf build/display/* |
---|
463 | rm -rf build/router/* |
---|
464 | rm -rf build/gameoflife/* |
---|
465 | rm -rf build/dhrystone/* |
---|
466 | rm -rf build/sort/* |
---|
467 | rm -rf build/transpose/* |
---|
468 | rm -rf build/map.bin |
---|
469 | |
---|
470 | distclean: clean |
---|
471 | rm -rf hdd/virt_hdd.dmg |
---|