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_2_2_4_sort.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) map.bin ::/ |
---|
156 | dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc |
---|
157 | |
---|
158 | ### Disk image generation |
---|
159 | ### This requires the generic LINUX/MacOS script "create_dmg" script |
---|
160 | ### written by C.Fuguet. (should be installed in GIET-VM root directory). |
---|
161 | $(DISK_IMAGE): |
---|
162 | ./create_dmg create $(basename $(DISK_IMAGE)) |
---|
163 | mmd -o -i $(DISK_IMAGE) ::/build |
---|
164 | mmd -o -i $(DISK_IMAGE) ::/build/kernel |
---|
165 | mmd -o -i $(DISK_IMAGE) ::/build/display |
---|
166 | mmd -o -i $(DISK_IMAGE) ::/build/sort |
---|
167 | mmd -o -i $(DISK_IMAGE) ::/build/transpose |
---|
168 | mmd -o -i $(DISK_IMAGE) ::/build/hello |
---|
169 | mmd -o -i $(DISK_IMAGE) ::/build/pgcd |
---|
170 | mmd -o -i $(DISK_IMAGE) ::/build/router |
---|
171 | mmd -o -i $(DISK_IMAGE) ::/build/gameoflife |
---|
172 | mmd -o -i $(DISK_IMAGE) ::/build/dhrystone |
---|
173 | mmd -o -i $(DISK_IMAGE) ::/misc |
---|
174 | dd if=$(DISK_IMAGE) of=temp.dmg count=65536 |
---|
175 | mv temp.dmg $(DISK_IMAGE) |
---|
176 | |
---|
177 | ### mapping compilation |
---|
178 | map.bin: $(MAP_XML) |
---|
179 | $(MAKE) -C giet_xml |
---|
180 | giet_xml/xml2bin $< . |
---|
181 | |
---|
182 | ### drivers compilation |
---|
183 | build/drivers/cma_driver.o: giet_drivers/cma_driver.c \ |
---|
184 | giet_drivers/cma_driver.h \ |
---|
185 | giet_config.h \ |
---|
186 | $(MAP_XML) |
---|
187 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
188 | |
---|
189 | build/drivers/dma_driver.o: giet_drivers/dma_driver.c \ |
---|
190 | giet_drivers/dma_driver.h \ |
---|
191 | giet_config.h \ |
---|
192 | $(MAP_XML) |
---|
193 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
194 | |
---|
195 | build/drivers/fbf_driver.o: giet_drivers/fbf_driver.c \ |
---|
196 | giet_drivers/fbf_driver.h \ |
---|
197 | giet_config.h \ |
---|
198 | $(MAP_XML) |
---|
199 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
200 | |
---|
201 | build/drivers/xcu_driver.o: giet_drivers/xcu_driver.c \ |
---|
202 | giet_drivers/xcu_driver.h \ |
---|
203 | giet_config.h \ |
---|
204 | $(MAP_XML) |
---|
205 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
206 | |
---|
207 | build/drivers/icu_driver.o: giet_drivers/icu_driver.c \ |
---|
208 | giet_drivers/icu_driver.h \ |
---|
209 | giet_config.h \ |
---|
210 | $(MAP_XML) |
---|
211 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
212 | |
---|
213 | build/drivers/ioc_driver.o: giet_drivers/ioc_driver.c \ |
---|
214 | giet_drivers/ioc_driver.h \ |
---|
215 | giet_config.h \ |
---|
216 | $(MAP_XML) |
---|
217 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
218 | |
---|
219 | build/drivers/bdv_driver.o: giet_drivers/bdv_driver.c \ |
---|
220 | giet_drivers/bdv_driver.h \ |
---|
221 | giet_config.h \ |
---|
222 | $(MAP_XML) |
---|
223 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
224 | |
---|
225 | build/drivers/hba_driver.o: giet_drivers/hba_driver.c \ |
---|
226 | giet_drivers/hba_driver.h \ |
---|
227 | giet_config.h \ |
---|
228 | $(MAP_XML) |
---|
229 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
230 | |
---|
231 | build/drivers/sdc_driver.o: giet_drivers/sdc_driver.c \ |
---|
232 | giet_drivers/sdc_driver.h \ |
---|
233 | giet_config.h \ |
---|
234 | $(MAP_XML) |
---|
235 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
236 | |
---|
237 | build/drivers/spi_driver.o: giet_drivers/spi_driver.c \ |
---|
238 | giet_drivers/spi_driver.h \ |
---|
239 | giet_config.h \ |
---|
240 | $(MAP_XML) |
---|
241 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
242 | |
---|
243 | build/drivers/rdk_driver.o: giet_drivers/rdk_driver.c \ |
---|
244 | giet_drivers/rdk_driver.h \ |
---|
245 | giet_config.h \ |
---|
246 | $(MAP_XML) |
---|
247 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
248 | |
---|
249 | build/drivers/iob_driver.o: giet_drivers/iob_driver.c \ |
---|
250 | giet_drivers/iob_driver.h \ |
---|
251 | giet_config.h \ |
---|
252 | $(MAP_XML) |
---|
253 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
254 | |
---|
255 | build/drivers/mmc_driver.o: giet_drivers/mmc_driver.c \ |
---|
256 | giet_drivers/mmc_driver.h \ |
---|
257 | giet_config.h \ |
---|
258 | $(MAP_XML) |
---|
259 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
260 | |
---|
261 | build/drivers/mwr_driver.o: giet_drivers/mwr_driver.c \ |
---|
262 | giet_drivers/mwr_driver.h \ |
---|
263 | giet_config.h \ |
---|
264 | $(MAP_XML) |
---|
265 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
266 | |
---|
267 | build/drivers/nic_driver.o: giet_drivers/nic_driver.c \ |
---|
268 | giet_drivers/nic_driver.h \ |
---|
269 | giet_config.h \ |
---|
270 | $(MAP_XML) |
---|
271 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
272 | |
---|
273 | build/drivers/tim_driver.o: giet_drivers/tim_driver.c \ |
---|
274 | giet_drivers/tim_driver.h \ |
---|
275 | giet_config.h \ |
---|
276 | $(MAP_XML) |
---|
277 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
278 | |
---|
279 | build/drivers/tty_driver.o: giet_drivers/tty_driver.c \ |
---|
280 | giet_drivers/tty_driver.h \ |
---|
281 | giet_config.h \ |
---|
282 | $(MAP_XML) |
---|
283 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
284 | |
---|
285 | build/drivers/pic_driver.o: giet_drivers/pic_driver.c \ |
---|
286 | giet_drivers/pic_driver.h \ |
---|
287 | giet_config.h \ |
---|
288 | $(MAP_XML) |
---|
289 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
290 | |
---|
291 | ### fat32 compilation |
---|
292 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
293 | giet_fat32/fat32.h \ |
---|
294 | giet_config.h \ |
---|
295 | $(MAP_XML) |
---|
296 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
297 | |
---|
298 | ### utils compilation |
---|
299 | build/common/utils.o: giet_common/utils.c \ |
---|
300 | giet_common/utils.h \ |
---|
301 | giet_config.h \ |
---|
302 | $(MAP_XML) |
---|
303 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
304 | |
---|
305 | ### vmem compilation |
---|
306 | build/common/vmem.o: giet_common/vmem.c \ |
---|
307 | giet_common/vmem.h \ |
---|
308 | giet_config.h \ |
---|
309 | $(MAP_XML) |
---|
310 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
311 | |
---|
312 | ### boot compilation |
---|
313 | build/boot/boot.elf: $(BOOT_OBJS) |
---|
314 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) |
---|
315 | $(DU) -D $@ > $@.txt |
---|
316 | |
---|
317 | build/boot/boot.o: giet_boot/boot.c \ |
---|
318 | giet_common/utils.h \ |
---|
319 | giet_fat32/fat32.h \ |
---|
320 | giet_common/vmem.h \ |
---|
321 | giet_drivers/tty_driver.h \ |
---|
322 | giet_drivers/ioc_driver.h \ |
---|
323 | giet_config.h \ |
---|
324 | $(MAP_XML) |
---|
325 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
326 | |
---|
327 | ### kernel compilation |
---|
328 | build/kernel/kernel.elf: $(KERNEL_OBJS) giet_kernel/kernel.ld |
---|
329 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) |
---|
330 | $(DU) -D $@ > $@.txt |
---|
331 | |
---|
332 | build/kernel/%.o: giet_kernel/%.c giet_config.h $(MAP_XML) |
---|
333 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
334 | |
---|
335 | build/kernel/%.o: giet_kernel/%.s giet_config.h $(MAP_XML) |
---|
336 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
337 | |
---|
338 | |
---|
339 | |
---|
340 | |
---|
341 | ### libs compilation |
---|
342 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
343 | giet_libs/stdio.h \ |
---|
344 | giet_config.h |
---|
345 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
346 | |
---|
347 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
348 | giet_libs/mwmr_channel.h \ |
---|
349 | giet_config.h |
---|
350 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
351 | |
---|
352 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
353 | giet_libs/malloc.h \ |
---|
354 | giet_libs/malloc_private.h \ |
---|
355 | giet_config.h |
---|
356 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
357 | |
---|
358 | build/libs/barrier.o: giet_libs/barrier.c \ |
---|
359 | giet_libs/barrier.h \ |
---|
360 | giet_config.h |
---|
361 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
362 | |
---|
363 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
364 | giet_libs/stdlib.h \ |
---|
365 | giet_config.h |
---|
366 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
367 | |
---|
368 | build/libs/string.o: giet_libs/string.c \ |
---|
369 | giet_libs/string.h \ |
---|
370 | giet_config.h |
---|
371 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
372 | |
---|
373 | build/libs/spin_lock.o: giet_libs/spin_lock.c \ |
---|
374 | giet_libs/spin_lock.h \ |
---|
375 | giet_config.h |
---|
376 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
377 | |
---|
378 | |
---|
379 | |
---|
380 | |
---|
381 | ### display compilation |
---|
382 | build/display/display.elf: $(DISPLAY_OBJS) display/display.ld |
---|
383 | $(LD) -o $@ -T display/display.ld $(DISPLAY_OBJS) |
---|
384 | $(DU) -D $@ > $@.txt |
---|
385 | |
---|
386 | build/display/main.o: display/main_cma.c |
---|
387 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
388 | |
---|
389 | ### router compilation |
---|
390 | build/router/router.elf: $(ROUTER_OBJS) router/router.ld |
---|
391 | $(LD) -o $@ -T router/router.ld $(ROUTER_OBJS) |
---|
392 | $(DU) -D $@ > $@.txt |
---|
393 | |
---|
394 | build/router/main.o: router/main.c |
---|
395 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
396 | |
---|
397 | ### hello compilation |
---|
398 | build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld |
---|
399 | $(LD) -o $@ -T hello/hello.ld $(HELLO_OBJS) |
---|
400 | $(DU) -D $@ > $@.txt |
---|
401 | |
---|
402 | build/hello/main.o: hello/main.c |
---|
403 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
404 | |
---|
405 | ### pgcd compilation |
---|
406 | build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld |
---|
407 | $(LD) -o $@ -T pgcd/pgcd.ld $(PGCD_OBJS) |
---|
408 | $(DU) -D $@ > $@.txt |
---|
409 | |
---|
410 | build/pgcd/main.o: pgcd/main.c |
---|
411 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
412 | |
---|
413 | ### gameoflife compilation |
---|
414 | build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) gameoflife/gameoflife.ld |
---|
415 | $(LD) -o $@ -T gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS) |
---|
416 | $(DU) -D $@ > $@.txt |
---|
417 | |
---|
418 | build/gameoflife/main.o: gameoflife/main.c |
---|
419 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< |
---|
420 | |
---|
421 | ### dhrystone compilation |
---|
422 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld |
---|
423 | $(LD) -o $@ -T dhrystone/dhrystone.ld $(DHRYSTONE_OBJS) |
---|
424 | $(DU) -D $@ > $@.txt |
---|
425 | |
---|
426 | build/dhrystone/dhry_1.o: dhrystone/dhry_1.c |
---|
427 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
428 | |
---|
429 | build/dhrystone/dhry_2.o: dhrystone/dhry_2.c |
---|
430 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
431 | |
---|
432 | ### sort compilation |
---|
433 | build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld |
---|
434 | $(LD) -o $@ -T sort/sort.ld $(SORT_OBJS) |
---|
435 | $(DU) -D $@ > $@.txt |
---|
436 | |
---|
437 | build/sort/main.o: sort/main.c |
---|
438 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
439 | |
---|
440 | ### transpose compilation |
---|
441 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld |
---|
442 | $(LD) -o $@ -T transpose/transpose.ld $(TRANSPOSE_OBJS) |
---|
443 | $(DU) -D $@ > $@.txt |
---|
444 | |
---|
445 | build/transpose/main.o: transpose/main.c |
---|
446 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
447 | |
---|
448 | ### clean |
---|
449 | clean: |
---|
450 | rm -f *.o *.elf *.bin *.txt core giet_vsegs.ld hard_config.h map.bin*~ |
---|
451 | $(MAKE) -s clean -C giet_xml |
---|
452 | rm -rf build/boot/* |
---|
453 | rm -rf build/fat32/* |
---|
454 | rm -rf build/common/* |
---|
455 | rm -rf build/drivers/* |
---|
456 | rm -rf build/kernel/* |
---|
457 | rm -rf build/reset/* |
---|
458 | rm -rf build/libs/* |
---|
459 | rm -rf build/pgcd/* |
---|
460 | rm -rf build/hello/* |
---|
461 | rm -rf build/display/* |
---|
462 | rm -rf build/router/* |
---|
463 | rm -rf build/gameoflife/* |
---|
464 | rm -rf build/dhrystone/* |
---|
465 | rm -rf build/sort/* |
---|
466 | rm -rf build/transpose/* |
---|
467 | rm -rf build/map.bin |
---|
468 | |
---|
469 | distclean: clean |
---|
470 | rm -rf hdd/virt_hdd.dmg |
---|