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