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