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