[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 |
---|
[553] | 12 | X_SIZE ?= 4 |
---|
| 13 | Y_SIZE ?= 4 |
---|
| 14 | NB_PROCS ?= 4 |
---|
| 15 | NB_TTYS ?= 5 |
---|
[463] | 16 | FBF_WIDTH ?= 128 |
---|
[553] | 17 | IOC_TYPE ?= HBA |
---|
[525] | 18 | APP ?= classif |
---|
[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 | |
---|
[326] | 164 | all: map.bin \ |
---|
| 165 | hard_config.h \ |
---|
| 166 | giet_vsegs.ld \ |
---|
[258] | 167 | build/boot/boot.elf \ |
---|
| 168 | build/kernel/kernel.elf \ |
---|
| 169 | build/display/display.elf \ |
---|
| 170 | build/hello/hello.elf \ |
---|
| 171 | build/pgcd/pgcd.elf \ |
---|
[302] | 172 | build/router/router.elf \ |
---|
[258] | 173 | build/dhrystone/dhrystone.elf \ |
---|
| 174 | build/gameoflife/gameoflife.elf \ |
---|
| 175 | build/sort/sort.elf \ |
---|
[295] | 176 | build/transpose/transpose.elf \ |
---|
[339] | 177 | build/convol/convol.elf \ |
---|
[463] | 178 | build/classif/classif.elf \ |
---|
[525] | 179 | build/coproc/coproc.elf \ |
---|
[326] | 180 | $(DISK_IMAGE) |
---|
[302] | 181 | |
---|
[364] | 182 | ### Copy always all files into disk image |
---|
[304] | 183 | mcopy -o -i $(DISK_IMAGE) build/kernel/kernel.elf ::/build/kernel |
---|
| 184 | mcopy -o -i $(DISK_IMAGE) build/display/display.elf ::/build/display |
---|
[525] | 185 | mcopy -o -i $(DISK_IMAGE) build/hello/hello.elf ::/build/hello |
---|
| 186 | mcopy -o -i $(DISK_IMAGE) build/pgcd/pgcd.elf ::/build/pgcd |
---|
| 187 | mcopy -o -i $(DISK_IMAGE) build/router/router.elf ::/build/router |
---|
| 188 | mcopy -o -i $(DISK_IMAGE) build/dhrystone/dhrystone.elf ::/build/dhrystone |
---|
| 189 | mcopy -o -i $(DISK_IMAGE) build/gameoflife/gameoflife.elf ::/build/gameoflife |
---|
[304] | 190 | mcopy -o -i $(DISK_IMAGE) build/sort/sort.elf ::/build/sort |
---|
| 191 | mcopy -o -i $(DISK_IMAGE) build/transpose/transpose.elf ::/build/transpose |
---|
[339] | 192 | mcopy -o -i $(DISK_IMAGE) build/convol/convol.elf ::/build/convol |
---|
[463] | 193 | mcopy -o -i $(DISK_IMAGE) build/classif/classif.elf ::/build/classif |
---|
[525] | 194 | mcopy -o -i $(DISK_IMAGE) build/coproc/coproc.elf ::/build/coproc |
---|
[432] | 195 | mcopy -o -i $(DISK_IMAGE) applications/transpose/images.raw ::/misc |
---|
| 196 | mcopy -o -i $(DISK_IMAGE) applications/convol/philips_image.raw ::/misc |
---|
[304] | 197 | mcopy -o -i $(DISK_IMAGE) map.bin ::/ |
---|
[364] | 198 | ### Copy bootloader into sector 2 of disk image |
---|
[302] | 199 | dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc |
---|
[364] | 200 | ### Checking root directory |
---|
[366] | 201 | mdir -/ -b -i $(DISK_IMAGE) ::/ |
---|
[160] | 202 | |
---|
[364] | 203 | ### Disk image generation (no files in this step) |
---|
[272] | 204 | ### This requires the generic LINUX/MacOS script "create_dmg" script |
---|
[258] | 205 | ### written by C.Fuguet. (should be installed in GIET-VM root directory). |
---|
[302] | 206 | $(DISK_IMAGE): |
---|
| 207 | ./create_dmg create $(basename $(DISK_IMAGE)) |
---|
[304] | 208 | mmd -o -i $(DISK_IMAGE) ::/build |
---|
| 209 | mmd -o -i $(DISK_IMAGE) ::/build/kernel |
---|
| 210 | mmd -o -i $(DISK_IMAGE) ::/build/display |
---|
[525] | 211 | mmd -o -i $(DISK_IMAGE) ::/build/hello |
---|
| 212 | mmd -o -i $(DISK_IMAGE) ::/build/pgcd |
---|
| 213 | mmd -o -i $(DISK_IMAGE) ::/build/router |
---|
| 214 | mmd -o -i $(DISK_IMAGE) ::/build/dhrystone |
---|
| 215 | mmd -o -i $(DISK_IMAGE) ::/build/gameoflife |
---|
[304] | 216 | mmd -o -i $(DISK_IMAGE) ::/build/sort |
---|
| 217 | mmd -o -i $(DISK_IMAGE) ::/build/transpose |
---|
[339] | 218 | mmd -o -i $(DISK_IMAGE) ::/build/convol |
---|
[463] | 219 | mmd -o -i $(DISK_IMAGE) ::/build/classif |
---|
[525] | 220 | mmd -o -i $(DISK_IMAGE) ::/build/coproc |
---|
[304] | 221 | mmd -o -i $(DISK_IMAGE) ::/misc |
---|
| 222 | dd if=$(DISK_IMAGE) of=temp.dmg count=65536 |
---|
| 223 | mv temp.dmg $(DISK_IMAGE) |
---|
[295] | 224 | |
---|
[326] | 225 | ### mapping generation: map.bin / map.xml / hard_config.h / giet_vsegs.ld |
---|
[432] | 226 | map.bin hard_config.h giet_vsegs.ld: $(ARCH)/arch.py applications/$(APP)/$(APP).py |
---|
[510] | 227 | giet_python/genmap --arch=$(ARCH) \ |
---|
| 228 | --x=$(X_SIZE) \ |
---|
| 229 | --y=$(Y_SIZE) \ |
---|
| 230 | --p=$(NB_PROCS) \ |
---|
| 231 | --tty=$(NB_TTYS) \ |
---|
| 232 | --fbf=$(FBF_WIDTH) \ |
---|
[553] | 233 | --ioc=$(IOC_TYPE) \ |
---|
[510] | 234 | --giet=. \ |
---|
| 235 | --$(APP) \ |
---|
| 236 | --xml=. |
---|
[158] | 237 | |
---|
[258] | 238 | ### drivers compilation |
---|
[295] | 239 | build/drivers/cma_driver.o: giet_drivers/cma_driver.c \ |
---|
| 240 | giet_drivers/cma_driver.h \ |
---|
[326] | 241 | hard_config.h \ |
---|
| 242 | giet_config.h |
---|
[295] | 243 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 244 | |
---|
[258] | 245 | build/drivers/dma_driver.o: giet_drivers/dma_driver.c \ |
---|
| 246 | giet_drivers/dma_driver.h \ |
---|
[326] | 247 | hard_config.h \ |
---|
| 248 | giet_config.h |
---|
[258] | 249 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 250 | |
---|
[258] | 251 | build/drivers/xcu_driver.o: giet_drivers/xcu_driver.c \ |
---|
| 252 | giet_drivers/xcu_driver.h \ |
---|
[326] | 253 | hard_config.h \ |
---|
| 254 | giet_config.h |
---|
[258] | 255 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 256 | |
---|
[289] | 257 | build/drivers/bdv_driver.o: giet_drivers/bdv_driver.c \ |
---|
| 258 | giet_drivers/bdv_driver.h \ |
---|
[326] | 259 | hard_config.h \ |
---|
| 260 | giet_config.h |
---|
[289] | 261 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 262 | |
---|
| 263 | build/drivers/hba_driver.o: giet_drivers/hba_driver.c \ |
---|
| 264 | giet_drivers/hba_driver.h \ |
---|
[326] | 265 | hard_config.h \ |
---|
| 266 | giet_config.h |
---|
[289] | 267 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 268 | |
---|
| 269 | build/drivers/sdc_driver.o: giet_drivers/sdc_driver.c \ |
---|
| 270 | giet_drivers/sdc_driver.h \ |
---|
[326] | 271 | hard_config.h \ |
---|
| 272 | giet_config.h |
---|
[289] | 273 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 274 | |
---|
| 275 | build/drivers/spi_driver.o: giet_drivers/spi_driver.c \ |
---|
| 276 | giet_drivers/spi_driver.h \ |
---|
[326] | 277 | hard_config.h \ |
---|
| 278 | giet_config.h |
---|
[289] | 279 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 280 | |
---|
[295] | 281 | build/drivers/rdk_driver.o: giet_drivers/rdk_driver.c \ |
---|
| 282 | giet_drivers/rdk_driver.h \ |
---|
[326] | 283 | hard_config.h \ |
---|
| 284 | giet_config.h |
---|
[295] | 285 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 286 | |
---|
[258] | 287 | build/drivers/iob_driver.o: giet_drivers/iob_driver.c \ |
---|
| 288 | giet_drivers/iob_driver.h \ |
---|
[326] | 289 | hard_config.h \ |
---|
| 290 | giet_config.h |
---|
[258] | 291 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 292 | |
---|
| 293 | build/drivers/mmc_driver.o: giet_drivers/mmc_driver.c \ |
---|
| 294 | giet_drivers/mmc_driver.h \ |
---|
[326] | 295 | hard_config.h \ |
---|
| 296 | giet_config.h |
---|
[258] | 297 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 298 | |
---|
| 299 | build/drivers/mwr_driver.o: giet_drivers/mwr_driver.c \ |
---|
| 300 | giet_drivers/mwr_driver.h \ |
---|
[326] | 301 | hard_config.h \ |
---|
| 302 | giet_config.h |
---|
[258] | 303 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 304 | |
---|
| 305 | build/drivers/nic_driver.o: giet_drivers/nic_driver.c \ |
---|
| 306 | giet_drivers/nic_driver.h \ |
---|
[326] | 307 | hard_config.h \ |
---|
| 308 | giet_config.h |
---|
[258] | 309 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 310 | |
---|
| 311 | build/drivers/tim_driver.o: giet_drivers/tim_driver.c \ |
---|
| 312 | giet_drivers/tim_driver.h \ |
---|
[326] | 313 | hard_config.h \ |
---|
| 314 | giet_config.h |
---|
[258] | 315 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 316 | |
---|
| 317 | build/drivers/tty_driver.o: giet_drivers/tty_driver.c \ |
---|
| 318 | giet_drivers/tty_driver.h \ |
---|
[326] | 319 | hard_config.h \ |
---|
| 320 | giet_config.h |
---|
[258] | 321 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 322 | |
---|
[295] | 323 | build/drivers/pic_driver.o: giet_drivers/pic_driver.c \ |
---|
| 324 | giet_drivers/pic_driver.h \ |
---|
[326] | 325 | hard_config.h \ |
---|
| 326 | giet_config.h |
---|
[295] | 327 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 328 | |
---|
[380] | 329 | ################################ |
---|
| 330 | ### drivers library compilation |
---|
| 331 | build/drivers/libdrivers.a: $(DRIVERS_OBJS) |
---|
| 332 | $(AR) -rcs $@ $(DRIVERS_OBJS) |
---|
| 333 | |
---|
[374] | 334 | ########################## |
---|
| 335 | ### common compilation |
---|
[258] | 336 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
| 337 | giet_fat32/fat32.h \ |
---|
[326] | 338 | hard_config.h \ |
---|
| 339 | giet_config.h |
---|
[258] | 340 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 341 | |
---|
| 342 | build/common/utils.o: giet_common/utils.c \ |
---|
| 343 | giet_common/utils.h \ |
---|
[326] | 344 | hard_config.h \ |
---|
| 345 | giet_config.h |
---|
[258] | 346 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 347 | |
---|
[510] | 348 | build/common/kernel_locks.o: giet_common/kernel_locks.c \ |
---|
| 349 | giet_common/kernel_locks.h \ |
---|
| 350 | hard_config.h \ |
---|
| 351 | giet_config.h |
---|
[463] | 352 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 353 | |
---|
[510] | 354 | build/common/kernel_barriers.o: giet_common/kernel_barriers.c \ |
---|
| 355 | giet_common/kernel_barriers.h \ |
---|
| 356 | hard_config.h \ |
---|
| 357 | giet_config.h |
---|
| 358 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 359 | |
---|
[463] | 360 | build/common/tty0.o: giet_common/tty0.c \ |
---|
| 361 | giet_common/tty0.h \ |
---|
| 362 | hard_config.h \ |
---|
| 363 | giet_config.h |
---|
| 364 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 365 | |
---|
[258] | 366 | build/common/vmem.o: giet_common/vmem.c \ |
---|
| 367 | giet_common/vmem.h \ |
---|
[326] | 368 | hard_config.h \ |
---|
| 369 | giet_config.h |
---|
[258] | 370 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 371 | |
---|
[418] | 372 | build/common/pmem.o: giet_common/pmem.c \ |
---|
| 373 | giet_common/pmem.h \ |
---|
| 374 | hard_config.h \ |
---|
| 375 | giet_config.h |
---|
| 376 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 377 | |
---|
[482] | 378 | build/common/kernel_malloc.o: giet_common/kernel_malloc.c \ |
---|
[510] | 379 | giet_common/kernel_malloc.h \ |
---|
| 380 | hard_config.h \ |
---|
| 381 | giet_config.h |
---|
[482] | 382 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 383 | |
---|
[374] | 384 | ######################## |
---|
[177] | 385 | ### boot compilation |
---|
[326] | 386 | build/boot/boot.elf: $(BOOT_OBJS) \ |
---|
[380] | 387 | giet_boot/boot.ld \ |
---|
| 388 | build/drivers/libdrivers.a |
---|
| 389 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) -Lbuild/drivers -ldrivers |
---|
[189] | 390 | $(DU) -D $@ > $@.txt |
---|
[158] | 391 | |
---|
[258] | 392 | build/boot/boot.o: giet_boot/boot.c \ |
---|
| 393 | giet_common/utils.h \ |
---|
| 394 | giet_fat32/fat32.h \ |
---|
[289] | 395 | giet_common/vmem.h \ |
---|
[326] | 396 | hard_config.h \ |
---|
[366] | 397 | giet_config.h |
---|
[258] | 398 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 399 | |
---|
[366] | 400 | build/boot/boot_entry.o: giet_boot/boot_entry.S \ |
---|
| 401 | hard_config.h |
---|
| 402 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 403 | |
---|
[374] | 404 | ######################### |
---|
[258] | 405 | ### kernel compilation |
---|
[326] | 406 | build/kernel/kernel.elf: $(KERNEL_OBJS) \ |
---|
[380] | 407 | giet_kernel/kernel.ld \ |
---|
| 408 | build/drivers/libdrivers.a |
---|
| 409 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) -Lbuild/drivers -ldrivers |
---|
[258] | 410 | $(DU) -D $@ > $@.txt |
---|
[158] | 411 | |
---|
[326] | 412 | build/kernel/%.o: giet_kernel/%.c \ |
---|
| 413 | hard_config.h \ |
---|
| 414 | giet_config.h |
---|
[258] | 415 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 416 | |
---|
[326] | 417 | build/kernel/%.o: giet_kernel/%.s \ |
---|
| 418 | hard_config.h \ |
---|
| 419 | giet_config.h |
---|
[258] | 420 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 421 | |
---|
[374] | 422 | ########################### |
---|
| 423 | ### user libs compilation |
---|
[258] | 424 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
| 425 | giet_libs/stdio.h \ |
---|
[326] | 426 | hard_config.h \ |
---|
[258] | 427 | giet_config.h |
---|
| 428 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 429 | |
---|
| 430 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
| 431 | giet_libs/mwmr_channel.h \ |
---|
[326] | 432 | hard_config.h \ |
---|
[258] | 433 | giet_config.h |
---|
| 434 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 435 | |
---|
| 436 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
| 437 | giet_libs/malloc.h \ |
---|
[326] | 438 | hard_config.h \ |
---|
[258] | 439 | giet_config.h |
---|
| 440 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 441 | |
---|
[510] | 442 | build/libs/user_barrier.o: giet_libs/user_barrier.c \ |
---|
| 443 | giet_libs/user_barrier.h \ |
---|
| 444 | hard_config.h \ |
---|
| 445 | giet_config.h |
---|
[258] | 446 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 447 | |
---|
[259] | 448 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
| 449 | giet_libs/stdlib.h \ |
---|
[326] | 450 | hard_config.h \ |
---|
[259] | 451 | giet_config.h |
---|
| 452 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 453 | |
---|
[258] | 454 | build/libs/string.o: giet_libs/string.c \ |
---|
| 455 | giet_libs/string.h \ |
---|
[326] | 456 | hard_config.h \ |
---|
[258] | 457 | giet_config.h |
---|
| 458 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 459 | |
---|
[463] | 460 | build/libs/user_lock.o: giet_libs/user_lock.c \ |
---|
| 461 | giet_libs/user_lock.h \ |
---|
[326] | 462 | hard_config.h \ |
---|
[258] | 463 | giet_config.h |
---|
| 464 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 465 | |
---|
[374] | 466 | ######################################## |
---|
| 467 | ### display application compilation |
---|
[432] | 468 | build/display/display.elf: $(DISPLAY_OBJS) applications/display/display.ld hard_config.h |
---|
| 469 | $(LD) -o $@ -T applications/display/display.ld $(DISPLAY_OBJS) |
---|
[189] | 470 | $(DU) -D $@ > $@.txt |
---|
[158] | 471 | |
---|
[445] | 472 | build/display/main.o: applications/display/main.c |
---|
[258] | 473 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 474 | |
---|
[374] | 475 | ######################################## |
---|
[189] | 476 | ### router compilation |
---|
[432] | 477 | build/router/router.elf: $(ROUTER_OBJS) applications/router/router.ld hard_config.h |
---|
| 478 | $(LD) -o $@ -T applications/router/router.ld $(ROUTER_OBJS) |
---|
[189] | 479 | $(DU) -D $@ > $@.txt |
---|
| 480 | |
---|
[432] | 481 | build/router/main.o: applications/router/main.c |
---|
[258] | 482 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 483 | |
---|
[374] | 484 | ######################################## |
---|
[189] | 485 | ### hello compilation |
---|
[432] | 486 | build/hello/hello.elf: $(HELLO_OBJS) applications/hello/hello.ld hard_config.h |
---|
| 487 | $(LD) -o $@ -T applications/hello/hello.ld $(HELLO_OBJS) |
---|
[189] | 488 | $(DU) -D $@ > $@.txt |
---|
| 489 | |
---|
[432] | 490 | build/hello/main.o: applications/hello/main.c |
---|
[258] | 491 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 492 | |
---|
[374] | 493 | ######################################## |
---|
[189] | 494 | ### pgcd compilation |
---|
[432] | 495 | build/pgcd/pgcd.elf: $(PGCD_OBJS) applications/pgcd/pgcd.ld hard_config.h |
---|
| 496 | $(LD) -o $@ -T applications/pgcd/pgcd.ld $(PGCD_OBJS) |
---|
[189] | 497 | $(DU) -D $@ > $@.txt |
---|
| 498 | |
---|
[432] | 499 | build/pgcd/main.o: applications/pgcd/main.c |
---|
[258] | 500 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 501 | |
---|
[374] | 502 | ######################################## |
---|
[251] | 503 | ### gameoflife compilation |
---|
[432] | 504 | build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) applications/gameoflife/gameoflife.ld |
---|
| 505 | $(LD) -o $@ -T applications/gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS) |
---|
[251] | 506 | $(DU) -D $@ > $@.txt |
---|
| 507 | |
---|
[432] | 508 | build/gameoflife/main.o: applications/gameoflife/main.c |
---|
[258] | 509 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< |
---|
[251] | 510 | |
---|
[374] | 511 | ######################################## |
---|
[241] | 512 | ### dhrystone compilation |
---|
[432] | 513 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) applications/dhrystone/dhrystone.ld hard_config.h |
---|
| 514 | $(LD) -o $@ -T applications/dhrystone/dhrystone.ld $(DHRYSTONE_OBJS) |
---|
[241] | 515 | $(DU) -D $@ > $@.txt |
---|
| 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 |
---|
| 528 | |
---|
[432] | 529 | build/sort/main.o: applications/sort/main.c |
---|
[258] | 530 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[256] | 531 | |
---|
[374] | 532 | ######################################## |
---|
[295] | 533 | ### transpose compilation |
---|
[432] | 534 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) applications/transpose/transpose.ld hard_config.h |
---|
| 535 | $(LD) -o $@ -T applications/transpose/transpose.ld $(TRANSPOSE_OBJS) |
---|
[295] | 536 | $(DU) -D $@ > $@.txt |
---|
| 537 | |
---|
[432] | 538 | build/transpose/main.o: applications/transpose/main.c |
---|
[295] | 539 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 540 | |
---|
[374] | 541 | ######################################## |
---|
[339] | 542 | ### convol compilation |
---|
[432] | 543 | build/convol/convol.elf: $(CONVOL_OBJS) applications/convol/convol.ld hard_config.h |
---|
| 544 | $(LD) -o $@ -T applications/convol/convol.ld $(CONVOL_OBJS) |
---|
[339] | 545 | $(DU) -D $@ > $@.txt |
---|
| 546 | |
---|
[432] | 547 | build/convol/main.o: applications/convol/main.c |
---|
[364] | 548 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O0 -c -o $@ $< |
---|
[339] | 549 | |
---|
[374] | 550 | ######################################## |
---|
[463] | 551 | ### classif compilation |
---|
| 552 | build/classif/classif.elf: $(CLASSIF_OBJS) applications/classif/classif.ld hard_config.h |
---|
| 553 | $(LD) -o $@ -T applications/classif/classif.ld $(CLASSIF_OBJS) |
---|
| 554 | $(DU) -D $@ > $@.txt |
---|
| 555 | |
---|
| 556 | build/classif/main.o: applications/classif/main.c |
---|
| 557 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O0 -c -o $@ $< |
---|
| 558 | |
---|
| 559 | ######################################## |
---|
[525] | 560 | ### coproc compilation |
---|
| 561 | build/coproc/coproc.elf: $(COPROC_OBJS) applications/coproc/coproc.ld hard_config.h |
---|
| 562 | $(LD) -o $@ -T applications/coproc/coproc.ld $(COPROC_OBJS) |
---|
| 563 | $(DU) -D $@ > $@.txt |
---|
| 564 | |
---|
| 565 | build/coproc/main.o: applications/coproc/main.c |
---|
| 566 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O0 -c -o $@ $< |
---|
| 567 | |
---|
| 568 | ######################################## |
---|
[177] | 569 | ### clean |
---|
[158] | 570 | clean: |
---|
[326] | 571 | rm -f *.o *.elf *.bin *.txt core |
---|
| 572 | rm -f hard_config.h giet_vsegs.ld map.bin map.xml |
---|
[232] | 573 | rm -rf build/boot/* |
---|
[258] | 574 | rm -rf build/fat32/* |
---|
| 575 | rm -rf build/common/* |
---|
| 576 | rm -rf build/drivers/* |
---|
| 577 | rm -rf build/kernel/* |
---|
| 578 | rm -rf build/reset/* |
---|
[232] | 579 | rm -rf build/libs/* |
---|
| 580 | rm -rf build/pgcd/* |
---|
| 581 | rm -rf build/hello/* |
---|
| 582 | rm -rf build/display/* |
---|
| 583 | rm -rf build/router/* |
---|
[251] | 584 | rm -rf build/gameoflife/* |
---|
[241] | 585 | rm -rf build/dhrystone/* |
---|
[258] | 586 | rm -rf build/sort/* |
---|
[295] | 587 | rm -rf build/transpose/* |
---|
[339] | 588 | rm -rf build/convol/* |
---|
[463] | 589 | rm -rf build/classif/* |
---|
[525] | 590 | rm -rf build/coproc/* |
---|
[366] | 591 | rm -rf $(DISK_IMAGE) |
---|