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