[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/fbf_driver.o \ |
---|
| 29 | build/drivers/xcu_driver.o \ |
---|
| 30 | build/drivers/icu_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 |
---|
| 46 | KERNEL_OBJS = build/common/utils.o \ |
---|
| 47 | build/common/vmem.o \ |
---|
| 48 | build/fat32/fat32.o \ |
---|
[258] | 49 | build/kernel/giet.o \ |
---|
| 50 | build/kernel/switch.o \ |
---|
| 51 | build/kernel/ctx_handler.o \ |
---|
| 52 | build/kernel/exc_handler.o \ |
---|
| 53 | build/kernel/sys_handler.o \ |
---|
| 54 | build/kernel/irq_handler.o \ |
---|
| 55 | build/kernel/kernel_init.o |
---|
[162] | 56 | |
---|
[258] | 57 | ### Objects to be linked for boot.elf |
---|
[289] | 58 | BOOT_OBJS = build/common/utils.o \ |
---|
[418] | 59 | build/common/pmem.o \ |
---|
[289] | 60 | build/common/vmem.o \ |
---|
[258] | 61 | build/fat32/fat32.o \ |
---|
| 62 | build/kernel/ctx_handler.o \ |
---|
| 63 | build/kernel/switch.o \ |
---|
[366] | 64 | build/boot/boot.o \ |
---|
| 65 | build/boot/boot_entry.o |
---|
[258] | 66 | |
---|
| 67 | ### Objects to be linked for display.elf |
---|
[189] | 68 | DISPLAY_OBJS = build/display/main.o \ |
---|
[258] | 69 | build/libs/stdio.o |
---|
[162] | 70 | |
---|
[258] | 71 | ### Objects to be linked for router.elf |
---|
| 72 | ROUTER_OBJS = build/router/main.o \ |
---|
| 73 | build/libs/mwmr_channel.o \ |
---|
| 74 | build/libs/stdio.o |
---|
[162] | 75 | |
---|
[258] | 76 | ### Objects to be linked for hello.elf |
---|
| 77 | HELLO_OBJS = build/hello/main.o \ |
---|
| 78 | build/libs/stdio.o |
---|
[158] | 79 | |
---|
[258] | 80 | ### Objects to be linked for pgcd.elf |
---|
| 81 | PGCD_OBJS = build/pgcd/main.o \ |
---|
| 82 | build/libs/stdio.o |
---|
[158] | 83 | |
---|
[258] | 84 | ### Objects to be linked for game.elf |
---|
[389] | 85 | GAMEOFLIFE_OBJS = build/gameoflife/main.o \ |
---|
| 86 | build/libs/stdio.o \ |
---|
| 87 | build/libs/barrier.o \ |
---|
| 88 | build/libs/malloc.o \ |
---|
[374] | 89 | build/libs/spin_lock.o |
---|
| 90 | |
---|
[251] | 91 | |
---|
[258] | 92 | ### Objects to be linked for dhrystone.elf |
---|
[241] | 93 | DHRYSTONE_OBJS = build/dhrystone/dhry_1.o \ |
---|
| 94 | build/dhrystone/dhry_2.o \ |
---|
[272] | 95 | build/libs/stdlib.o \ |
---|
[258] | 96 | build/libs/stdio.o \ |
---|
| 97 | build/libs/string.o \ |
---|
| 98 | build/libs/spin_lock.o \ |
---|
[241] | 99 | build/libs/malloc.o |
---|
| 100 | |
---|
[258] | 101 | ### Objects to be linked for sort.elf |
---|
[374] | 102 | SORT_OBJS = build/sort/main.o \ |
---|
| 103 | build/libs/stdio.o \ |
---|
| 104 | build/libs/barrier.o \ |
---|
[389] | 105 | build/libs/malloc.o \ |
---|
[374] | 106 | build/libs/spin_lock.o |
---|
[241] | 107 | |
---|
[295] | 108 | ### Objects to be linked for transpose.elf |
---|
[389] | 109 | TRANSPOSE_OBJS = build/transpose/main.o \ |
---|
| 110 | build/libs/stdio.o \ |
---|
| 111 | build/libs/barrier.o \ |
---|
| 112 | build/libs/malloc.o \ |
---|
[374] | 113 | build/libs/spin_lock.o |
---|
[258] | 114 | |
---|
[339] | 115 | ### Objects to be linked for convol.elf |
---|
[389] | 116 | CONVOL_OBJS = build/convol/main.o \ |
---|
| 117 | build/libs/stdio.o \ |
---|
| 118 | build/libs/stdlib.o \ |
---|
| 119 | build/libs/barrier.o \ |
---|
| 120 | build/libs/malloc.o \ |
---|
[374] | 121 | build/libs/spin_lock.o |
---|
[339] | 122 | |
---|
[364] | 123 | CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 |
---|
[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 |
---|
[314] | 167 | mcopy -o -i $(DISK_IMAGE) transpose/images.raw ::/misc |
---|
[339] | 168 | mcopy -o -i $(DISK_IMAGE) 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 |
---|
[339] | 196 | map.bin hard_config.h giet_vsegs.ld: $(ARCH)/arch.py $(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/fbf_driver.o: giet_drivers/fbf_driver.c \ |
---|
| 220 | giet_drivers/fbf_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/xcu_driver.o: giet_drivers/xcu_driver.c \ |
---|
| 226 | giet_drivers/xcu_driver.h \ |
---|
[326] | 227 | hard_config.h \ |
---|
| 228 | giet_config.h |
---|
[258] | 229 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 230 | |
---|
[258] | 231 | build/drivers/icu_driver.o: giet_drivers/icu_driver.c \ |
---|
| 232 | giet_drivers/icu_driver.h \ |
---|
[326] | 233 | hard_config.h \ |
---|
| 234 | giet_config.h |
---|
[258] | 235 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 236 | |
---|
| 237 | build/drivers/ioc_driver.o: giet_drivers/ioc_driver.c \ |
---|
| 238 | giet_drivers/ioc_driver.h \ |
---|
[326] | 239 | hard_config.h \ |
---|
| 240 | giet_config.h |
---|
[258] | 241 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 242 | |
---|
[289] | 243 | build/drivers/bdv_driver.o: giet_drivers/bdv_driver.c \ |
---|
| 244 | giet_drivers/bdv_driver.h \ |
---|
[326] | 245 | hard_config.h \ |
---|
| 246 | giet_config.h |
---|
[289] | 247 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 248 | |
---|
| 249 | build/drivers/hba_driver.o: giet_drivers/hba_driver.c \ |
---|
| 250 | giet_drivers/hba_driver.h \ |
---|
[326] | 251 | hard_config.h \ |
---|
| 252 | giet_config.h |
---|
[289] | 253 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 254 | |
---|
| 255 | build/drivers/sdc_driver.o: giet_drivers/sdc_driver.c \ |
---|
| 256 | giet_drivers/sdc_driver.h \ |
---|
[326] | 257 | hard_config.h \ |
---|
| 258 | giet_config.h |
---|
[289] | 259 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 260 | |
---|
| 261 | build/drivers/spi_driver.o: giet_drivers/spi_driver.c \ |
---|
| 262 | giet_drivers/spi_driver.h \ |
---|
[326] | 263 | hard_config.h \ |
---|
| 264 | giet_config.h |
---|
[289] | 265 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 266 | |
---|
[295] | 267 | build/drivers/rdk_driver.o: giet_drivers/rdk_driver.c \ |
---|
| 268 | giet_drivers/rdk_driver.h \ |
---|
[326] | 269 | hard_config.h \ |
---|
| 270 | giet_config.h |
---|
[295] | 271 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 272 | |
---|
[258] | 273 | build/drivers/iob_driver.o: giet_drivers/iob_driver.c \ |
---|
| 274 | giet_drivers/iob_driver.h \ |
---|
[326] | 275 | hard_config.h \ |
---|
| 276 | giet_config.h |
---|
[258] | 277 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 278 | |
---|
| 279 | build/drivers/mmc_driver.o: giet_drivers/mmc_driver.c \ |
---|
| 280 | giet_drivers/mmc_driver.h \ |
---|
[326] | 281 | hard_config.h \ |
---|
| 282 | giet_config.h |
---|
[258] | 283 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 284 | |
---|
| 285 | build/drivers/mwr_driver.o: giet_drivers/mwr_driver.c \ |
---|
| 286 | giet_drivers/mwr_driver.h \ |
---|
[326] | 287 | hard_config.h \ |
---|
| 288 | giet_config.h |
---|
[258] | 289 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 290 | |
---|
| 291 | build/drivers/nic_driver.o: giet_drivers/nic_driver.c \ |
---|
| 292 | giet_drivers/nic_driver.h \ |
---|
[326] | 293 | hard_config.h \ |
---|
| 294 | giet_config.h |
---|
[258] | 295 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 296 | |
---|
| 297 | build/drivers/tim_driver.o: giet_drivers/tim_driver.c \ |
---|
| 298 | giet_drivers/tim_driver.h \ |
---|
[326] | 299 | hard_config.h \ |
---|
| 300 | giet_config.h |
---|
[258] | 301 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 302 | |
---|
| 303 | build/drivers/tty_driver.o: giet_drivers/tty_driver.c \ |
---|
| 304 | giet_drivers/tty_driver.h \ |
---|
[326] | 305 | hard_config.h \ |
---|
| 306 | giet_config.h |
---|
[258] | 307 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 308 | |
---|
[295] | 309 | build/drivers/pic_driver.o: giet_drivers/pic_driver.c \ |
---|
| 310 | giet_drivers/pic_driver.h \ |
---|
[326] | 311 | hard_config.h \ |
---|
| 312 | giet_config.h |
---|
[295] | 313 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 314 | |
---|
[380] | 315 | ################################ |
---|
| 316 | ### drivers library compilation |
---|
| 317 | build/drivers/libdrivers.a: $(DRIVERS_OBJS) |
---|
| 318 | $(AR) -rcs $@ $(DRIVERS_OBJS) |
---|
| 319 | |
---|
[374] | 320 | ########################## |
---|
| 321 | ### common compilation |
---|
[258] | 322 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
| 323 | giet_fat32/fat32.h \ |
---|
[326] | 324 | hard_config.h \ |
---|
| 325 | giet_config.h |
---|
[258] | 326 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 327 | |
---|
| 328 | build/common/utils.o: giet_common/utils.c \ |
---|
| 329 | giet_common/utils.h \ |
---|
[326] | 330 | hard_config.h \ |
---|
| 331 | giet_config.h |
---|
[258] | 332 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 333 | |
---|
| 334 | build/common/vmem.o: giet_common/vmem.c \ |
---|
| 335 | giet_common/vmem.h \ |
---|
[326] | 336 | hard_config.h \ |
---|
| 337 | giet_config.h |
---|
[258] | 338 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 339 | |
---|
[418] | 340 | build/common/pmem.o: giet_common/pmem.c \ |
---|
| 341 | giet_common/pmem.h \ |
---|
| 342 | hard_config.h \ |
---|
| 343 | giet_config.h |
---|
| 344 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 345 | |
---|
[374] | 346 | ######################## |
---|
[177] | 347 | ### boot compilation |
---|
[326] | 348 | build/boot/boot.elf: $(BOOT_OBJS) \ |
---|
[380] | 349 | giet_boot/boot.ld \ |
---|
| 350 | build/drivers/libdrivers.a |
---|
| 351 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) -Lbuild/drivers -ldrivers |
---|
[189] | 352 | $(DU) -D $@ > $@.txt |
---|
[158] | 353 | |
---|
[258] | 354 | build/boot/boot.o: giet_boot/boot.c \ |
---|
| 355 | giet_common/utils.h \ |
---|
| 356 | giet_fat32/fat32.h \ |
---|
[289] | 357 | giet_common/vmem.h \ |
---|
[258] | 358 | giet_drivers/tty_driver.h \ |
---|
| 359 | giet_drivers/ioc_driver.h \ |
---|
[326] | 360 | hard_config.h \ |
---|
[366] | 361 | giet_config.h |
---|
[258] | 362 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 363 | |
---|
[366] | 364 | build/boot/boot_entry.o: giet_boot/boot_entry.S \ |
---|
| 365 | hard_config.h |
---|
| 366 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 367 | |
---|
[374] | 368 | ######################### |
---|
[258] | 369 | ### kernel compilation |
---|
[326] | 370 | build/kernel/kernel.elf: $(KERNEL_OBJS) \ |
---|
[380] | 371 | giet_kernel/kernel.ld \ |
---|
| 372 | build/drivers/libdrivers.a |
---|
| 373 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) -Lbuild/drivers -ldrivers |
---|
[258] | 374 | $(DU) -D $@ > $@.txt |
---|
[158] | 375 | |
---|
[326] | 376 | build/kernel/%.o: giet_kernel/%.c \ |
---|
| 377 | hard_config.h \ |
---|
| 378 | giet_config.h |
---|
[258] | 379 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 380 | |
---|
[326] | 381 | build/kernel/%.o: giet_kernel/%.s \ |
---|
| 382 | hard_config.h \ |
---|
| 383 | giet_config.h |
---|
[258] | 384 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 385 | |
---|
[374] | 386 | ########################### |
---|
| 387 | ### user libs compilation |
---|
[258] | 388 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
| 389 | giet_libs/stdio.h \ |
---|
[326] | 390 | hard_config.h \ |
---|
[258] | 391 | giet_config.h |
---|
| 392 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 393 | |
---|
| 394 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
| 395 | giet_libs/mwmr_channel.h \ |
---|
[326] | 396 | hard_config.h \ |
---|
[258] | 397 | giet_config.h |
---|
| 398 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 399 | |
---|
| 400 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
| 401 | giet_libs/malloc.h \ |
---|
| 402 | giet_libs/malloc_private.h \ |
---|
[326] | 403 | hard_config.h \ |
---|
[258] | 404 | giet_config.h |
---|
| 405 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 406 | |
---|
| 407 | build/libs/barrier.o: giet_libs/barrier.c \ |
---|
| 408 | giet_libs/barrier.h \ |
---|
[326] | 409 | hard_config.h \ |
---|
[258] | 410 | giet_config.h |
---|
| 411 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 412 | |
---|
[259] | 413 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
| 414 | giet_libs/stdlib.h \ |
---|
[326] | 415 | hard_config.h \ |
---|
[259] | 416 | giet_config.h |
---|
| 417 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 418 | |
---|
[258] | 419 | build/libs/string.o: giet_libs/string.c \ |
---|
| 420 | giet_libs/string.h \ |
---|
[326] | 421 | hard_config.h \ |
---|
[258] | 422 | giet_config.h |
---|
| 423 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 424 | |
---|
| 425 | build/libs/spin_lock.o: giet_libs/spin_lock.c \ |
---|
| 426 | giet_libs/spin_lock.h \ |
---|
[326] | 427 | hard_config.h \ |
---|
[258] | 428 | giet_config.h |
---|
| 429 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 430 | |
---|
[374] | 431 | build/libs/sbt_barrier.o: giet_libs/sbt_barrier.c \ |
---|
| 432 | hard_config.h \ |
---|
| 433 | giet_config.h |
---|
| 434 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 435 | |
---|
| 436 | ######################################## |
---|
| 437 | ### display application compilation |
---|
[339] | 438 | build/display/display.elf: $(DISPLAY_OBJS) display/display.ld hard_config.h |
---|
[189] | 439 | $(LD) -o $@ -T display/display.ld $(DISPLAY_OBJS) |
---|
| 440 | $(DU) -D $@ > $@.txt |
---|
[158] | 441 | |
---|
[258] | 442 | build/display/main.o: display/main_cma.c |
---|
| 443 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 444 | |
---|
[374] | 445 | ######################################## |
---|
[189] | 446 | ### router compilation |
---|
[339] | 447 | build/router/router.elf: $(ROUTER_OBJS) router/router.ld hard_config.h |
---|
[189] | 448 | $(LD) -o $@ -T router/router.ld $(ROUTER_OBJS) |
---|
| 449 | $(DU) -D $@ > $@.txt |
---|
| 450 | |
---|
| 451 | build/router/main.o: router/main.c |
---|
[258] | 452 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 453 | |
---|
[374] | 454 | ######################################## |
---|
[189] | 455 | ### hello compilation |
---|
[339] | 456 | build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld hard_config.h |
---|
[189] | 457 | $(LD) -o $@ -T hello/hello.ld $(HELLO_OBJS) |
---|
| 458 | $(DU) -D $@ > $@.txt |
---|
| 459 | |
---|
| 460 | build/hello/main.o: hello/main.c |
---|
[258] | 461 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 462 | |
---|
[374] | 463 | ######################################## |
---|
[189] | 464 | ### pgcd compilation |
---|
[339] | 465 | build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld hard_config.h |
---|
[189] | 466 | $(LD) -o $@ -T pgcd/pgcd.ld $(PGCD_OBJS) |
---|
| 467 | $(DU) -D $@ > $@.txt |
---|
| 468 | |
---|
| 469 | build/pgcd/main.o: pgcd/main.c |
---|
[258] | 470 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 471 | |
---|
[374] | 472 | ######################################## |
---|
[251] | 473 | ### gameoflife compilation |
---|
| 474 | build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) gameoflife/gameoflife.ld |
---|
| 475 | $(LD) -o $@ -T gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS) |
---|
| 476 | $(DU) -D $@ > $@.txt |
---|
| 477 | |
---|
| 478 | build/gameoflife/main.o: gameoflife/main.c |
---|
[258] | 479 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< |
---|
[251] | 480 | |
---|
[374] | 481 | ######################################## |
---|
[241] | 482 | ### dhrystone compilation |
---|
[339] | 483 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld hard_config.h |
---|
[241] | 484 | $(LD) -o $@ -T dhrystone/dhrystone.ld $(DHRYSTONE_OBJS) |
---|
| 485 | $(DU) -D $@ > $@.txt |
---|
| 486 | |
---|
| 487 | build/dhrystone/dhry_1.o: dhrystone/dhry_1.c |
---|
[258] | 488 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 489 | |
---|
| 490 | build/dhrystone/dhry_2.o: dhrystone/dhry_2.c |
---|
[258] | 491 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 492 | |
---|
[374] | 493 | ######################################## |
---|
[256] | 494 | ### sort compilation |
---|
[339] | 495 | build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld hard_config.h |
---|
[256] | 496 | $(LD) -o $@ -T sort/sort.ld $(SORT_OBJS) |
---|
| 497 | $(DU) -D $@ > $@.txt |
---|
| 498 | |
---|
| 499 | build/sort/main.o: sort/main.c |
---|
[258] | 500 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[256] | 501 | |
---|
[374] | 502 | ######################################## |
---|
[295] | 503 | ### transpose compilation |
---|
[339] | 504 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld hard_config.h |
---|
[295] | 505 | $(LD) -o $@ -T transpose/transpose.ld $(TRANSPOSE_OBJS) |
---|
| 506 | $(DU) -D $@ > $@.txt |
---|
| 507 | |
---|
| 508 | build/transpose/main.o: transpose/main.c |
---|
| 509 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 510 | |
---|
[374] | 511 | ######################################## |
---|
[339] | 512 | ### convol compilation |
---|
| 513 | build/convol/convol.elf: $(CONVOL_OBJS) convol/convol.ld hard_config.h |
---|
| 514 | $(LD) -o $@ -T convol/convol.ld $(CONVOL_OBJS) |
---|
| 515 | $(DU) -D $@ > $@.txt |
---|
| 516 | |
---|
| 517 | build/convol/main.o: convol/main.c |
---|
[364] | 518 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O0 -c -o $@ $< |
---|
[339] | 519 | |
---|
[374] | 520 | ######################################## |
---|
[177] | 521 | ### clean |
---|
[158] | 522 | clean: |
---|
[326] | 523 | rm -f *.o *.elf *.bin *.txt core |
---|
| 524 | rm -f hard_config.h giet_vsegs.ld map.bin map.xml |
---|
[232] | 525 | rm -rf build/boot/* |
---|
[258] | 526 | rm -rf build/fat32/* |
---|
| 527 | rm -rf build/common/* |
---|
| 528 | rm -rf build/drivers/* |
---|
| 529 | rm -rf build/kernel/* |
---|
| 530 | rm -rf build/reset/* |
---|
[232] | 531 | rm -rf build/libs/* |
---|
| 532 | rm -rf build/pgcd/* |
---|
| 533 | rm -rf build/hello/* |
---|
| 534 | rm -rf build/display/* |
---|
| 535 | rm -rf build/router/* |
---|
[251] | 536 | rm -rf build/gameoflife/* |
---|
[241] | 537 | rm -rf build/dhrystone/* |
---|
[258] | 538 | rm -rf build/sort/* |
---|
[295] | 539 | rm -rf build/transpose/* |
---|
[339] | 540 | rm -rf build/convol/* |
---|
[366] | 541 | rm -rf $(DISK_IMAGE) |
---|