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