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