[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 |
---|
[158] | 8 | |
---|
[326] | 9 | ARCH ?= ../tsar-trunk-svn-2013/platforms/tsar_generic_iob |
---|
[364] | 10 | X ?= 2 |
---|
| 11 | Y ?= 2 |
---|
| 12 | P ?= 2 |
---|
[339] | 13 | APP ?= convol |
---|
[326] | 14 | |
---|
| 15 | .PHONY: map.bin |
---|
| 16 | |
---|
[258] | 17 | ### FAT parameters definition for Disk image |
---|
| 18 | ### sector_size = 512 |
---|
| 19 | ### partition_begin_lba = 300 |
---|
| 20 | ### sector_per_cluster = 8 |
---|
| 21 | ### partition sectors = 524832 |
---|
[204] | 22 | |
---|
[258] | 23 | ### Objects to be linked for kernel.elf |
---|
[289] | 24 | KERNEL_OBJS = build/common/utils.o \ |
---|
| 25 | build/common/vmem.o \ |
---|
[258] | 26 | build/fat32/fat32.o \ |
---|
| 27 | build/drivers/dma_driver.o \ |
---|
[295] | 28 | build/drivers/cma_driver.o \ |
---|
[258] | 29 | build/drivers/fbf_driver.o \ |
---|
| 30 | build/drivers/xcu_driver.o \ |
---|
| 31 | build/drivers/icu_driver.o \ |
---|
| 32 | build/drivers/ioc_driver.o \ |
---|
[289] | 33 | build/drivers/bdv_driver.o \ |
---|
| 34 | build/drivers/hba_driver.o \ |
---|
| 35 | build/drivers/sdc_driver.o \ |
---|
| 36 | build/drivers/spi_driver.o \ |
---|
[295] | 37 | build/drivers/rdk_driver.o \ |
---|
[258] | 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 \ |
---|
[295] | 44 | build/drivers/pic_driver.o \ |
---|
[258] | 45 | build/kernel/giet.o \ |
---|
| 46 | build/kernel/switch.o \ |
---|
| 47 | build/kernel/ctx_handler.o \ |
---|
| 48 | build/kernel/exc_handler.o \ |
---|
| 49 | build/kernel/sys_handler.o \ |
---|
| 50 | build/kernel/irq_handler.o \ |
---|
| 51 | build/kernel/kernel_init.o |
---|
[162] | 52 | |
---|
[258] | 53 | ### Objects to be linked for boot.elf |
---|
[289] | 54 | BOOT_OBJS = build/common/utils.o \ |
---|
| 55 | build/common/vmem.o \ |
---|
[258] | 56 | build/fat32/fat32.o \ |
---|
[295] | 57 | build/drivers/dma_driver.o \ |
---|
[258] | 58 | build/drivers/tty_driver.o \ |
---|
[295] | 59 | build/drivers/pic_driver.o \ |
---|
[258] | 60 | build/drivers/xcu_driver.o \ |
---|
| 61 | build/drivers/ioc_driver.o \ |
---|
[299] | 62 | build/drivers/iob_driver.o \ |
---|
[289] | 63 | build/drivers/bdv_driver.o \ |
---|
| 64 | build/drivers/sdc_driver.o \ |
---|
| 65 | build/drivers/spi_driver.o \ |
---|
[295] | 66 | build/drivers/rdk_driver.o \ |
---|
[258] | 67 | build/drivers/mmc_driver.o \ |
---|
[295] | 68 | build/drivers/mwr_driver.o \ |
---|
[258] | 69 | build/kernel/ctx_handler.o \ |
---|
| 70 | build/kernel/switch.o \ |
---|
[366] | 71 | build/boot/boot.o \ |
---|
| 72 | build/boot/boot_entry.o |
---|
[258] | 73 | |
---|
| 74 | ### Objects to be linked for display.elf |
---|
[189] | 75 | DISPLAY_OBJS = build/display/main.o \ |
---|
[258] | 76 | build/libs/stdio.o |
---|
[162] | 77 | |
---|
[258] | 78 | ### Objects to be linked for router.elf |
---|
| 79 | ROUTER_OBJS = build/router/main.o \ |
---|
| 80 | build/libs/mwmr_channel.o \ |
---|
| 81 | build/libs/stdio.o |
---|
[162] | 82 | |
---|
[258] | 83 | ### Objects to be linked for hello.elf |
---|
| 84 | HELLO_OBJS = build/hello/main.o \ |
---|
| 85 | build/libs/stdio.o |
---|
[158] | 86 | |
---|
[258] | 87 | ### Objects to be linked for pgcd.elf |
---|
| 88 | PGCD_OBJS = build/pgcd/main.o \ |
---|
| 89 | build/libs/stdio.o |
---|
[158] | 90 | |
---|
[258] | 91 | ### Objects to be linked for game.elf |
---|
[374] | 92 | GAMEOFLIFE_OBJS = build/gameoflife/main.o \ |
---|
| 93 | build/libs/stdio.o \ |
---|
| 94 | build/libs/barrier.o \ |
---|
| 95 | build/libs/remote_malloc.o \ |
---|
| 96 | build/libs/spin_lock.o |
---|
| 97 | |
---|
[251] | 98 | |
---|
[258] | 99 | ### Objects to be linked for dhrystone.elf |
---|
[241] | 100 | DHRYSTONE_OBJS = build/dhrystone/dhry_1.o \ |
---|
| 101 | build/dhrystone/dhry_2.o \ |
---|
[272] | 102 | build/libs/stdlib.o \ |
---|
[258] | 103 | build/libs/stdio.o \ |
---|
| 104 | build/libs/string.o \ |
---|
| 105 | build/libs/spin_lock.o \ |
---|
[241] | 106 | build/libs/malloc.o |
---|
| 107 | |
---|
[258] | 108 | ### Objects to be linked for sort.elf |
---|
[374] | 109 | SORT_OBJS = build/sort/main.o \ |
---|
| 110 | build/libs/stdio.o \ |
---|
| 111 | build/libs/barrier.o \ |
---|
| 112 | build/libs/remote_malloc.o \ |
---|
| 113 | build/libs/spin_lock.o |
---|
[241] | 114 | |
---|
[295] | 115 | ### Objects to be linked for transpose.elf |
---|
[374] | 116 | TRANSPOSE_OBJS = build/transpose/main.o \ |
---|
| 117 | build/libs/stdio.o \ |
---|
| 118 | build/libs/barrier.o \ |
---|
| 119 | build/libs/remote_malloc.o \ |
---|
| 120 | build/libs/spin_lock.o |
---|
[258] | 121 | |
---|
[339] | 122 | ### Objects to be linked for convol.elf |
---|
[374] | 123 | CONVOL_OBJS = build/convol/main.o \ |
---|
| 124 | build/libs/stdio.o \ |
---|
| 125 | build/libs/stdlib.o \ |
---|
| 126 | build/libs/barrier.o \ |
---|
| 127 | build/libs/remote_malloc.o \ |
---|
| 128 | build/libs/spin_lock.o |
---|
[339] | 129 | |
---|
[364] | 130 | CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 |
---|
[158] | 131 | |
---|
[258] | 132 | GIET_INCLUDE = -Igiet_boot \ |
---|
| 133 | -Igiet_kernel \ |
---|
| 134 | -Igiet_xml \ |
---|
| 135 | -Igiet_fat32 \ |
---|
| 136 | -Igiet_drivers \ |
---|
| 137 | -Igiet_common \ |
---|
| 138 | -Igiet_libs \ |
---|
| 139 | -I. |
---|
[158] | 140 | |
---|
[258] | 141 | USER_INCLUDE = -Igiet_libs \ |
---|
| 142 | -Igiet_xml \ |
---|
| 143 | -I. |
---|
[160] | 144 | |
---|
[302] | 145 | DISK_IMAGE := hdd/virt_hdd.dmg |
---|
| 146 | |
---|
[326] | 147 | all: map.bin \ |
---|
| 148 | hard_config.h \ |
---|
| 149 | giet_vsegs.ld \ |
---|
[258] | 150 | build/boot/boot.elf \ |
---|
| 151 | build/kernel/kernel.elf \ |
---|
| 152 | build/display/display.elf \ |
---|
| 153 | build/hello/hello.elf \ |
---|
| 154 | build/pgcd/pgcd.elf \ |
---|
[302] | 155 | build/router/router.elf \ |
---|
[258] | 156 | build/dhrystone/dhrystone.elf \ |
---|
| 157 | build/gameoflife/gameoflife.elf \ |
---|
| 158 | build/sort/sort.elf \ |
---|
[295] | 159 | build/transpose/transpose.elf \ |
---|
[339] | 160 | build/convol/convol.elf \ |
---|
[326] | 161 | $(DISK_IMAGE) |
---|
[302] | 162 | |
---|
[364] | 163 | ### Copy always all files into disk image |
---|
[304] | 164 | mcopy -o -i $(DISK_IMAGE) build/kernel/kernel.elf ::/build/kernel |
---|
| 165 | mcopy -o -i $(DISK_IMAGE) build/display/display.elf ::/build/display |
---|
| 166 | mcopy -o -i $(DISK_IMAGE) build/sort/sort.elf ::/build/sort |
---|
| 167 | mcopy -o -i $(DISK_IMAGE) build/transpose/transpose.elf ::/build/transpose |
---|
[339] | 168 | mcopy -o -i $(DISK_IMAGE) build/convol/convol.elf ::/build/convol |
---|
[304] | 169 | mcopy -o -i $(DISK_IMAGE) build/hello/hello.elf ::/build/hello |
---|
| 170 | mcopy -o -i $(DISK_IMAGE) build/pgcd/pgcd.elf ::/build/pgcd |
---|
| 171 | mcopy -o -i $(DISK_IMAGE) build/router/router.elf ::/build/router |
---|
| 172 | mcopy -o -i $(DISK_IMAGE) build/gameoflife/gameoflife.elf ::/build/gameoflife |
---|
| 173 | mcopy -o -i $(DISK_IMAGE) build/dhrystone/dhrystone.elf ::/build/dhrystone |
---|
[314] | 174 | mcopy -o -i $(DISK_IMAGE) transpose/images.raw ::/misc |
---|
[339] | 175 | mcopy -o -i $(DISK_IMAGE) convol/philips_image.raw ::/misc |
---|
[304] | 176 | mcopy -o -i $(DISK_IMAGE) map.bin ::/ |
---|
[364] | 177 | ### Copy bootloader into sector 2 of disk image |
---|
[302] | 178 | dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc |
---|
[364] | 179 | ### Checking root directory |
---|
[366] | 180 | mdir -/ -b -i $(DISK_IMAGE) ::/ |
---|
[160] | 181 | |
---|
[364] | 182 | ### Disk image generation (no files in this step) |
---|
[272] | 183 | ### This requires the generic LINUX/MacOS script "create_dmg" script |
---|
[258] | 184 | ### written by C.Fuguet. (should be installed in GIET-VM root directory). |
---|
[302] | 185 | $(DISK_IMAGE): |
---|
| 186 | ./create_dmg create $(basename $(DISK_IMAGE)) |
---|
[304] | 187 | mmd -o -i $(DISK_IMAGE) ::/build |
---|
| 188 | mmd -o -i $(DISK_IMAGE) ::/build/kernel |
---|
| 189 | mmd -o -i $(DISK_IMAGE) ::/build/display |
---|
| 190 | mmd -o -i $(DISK_IMAGE) ::/build/sort |
---|
| 191 | mmd -o -i $(DISK_IMAGE) ::/build/transpose |
---|
[339] | 192 | mmd -o -i $(DISK_IMAGE) ::/build/convol |
---|
[304] | 193 | mmd -o -i $(DISK_IMAGE) ::/build/hello |
---|
| 194 | mmd -o -i $(DISK_IMAGE) ::/build/pgcd |
---|
| 195 | mmd -o -i $(DISK_IMAGE) ::/build/router |
---|
| 196 | mmd -o -i $(DISK_IMAGE) ::/build/gameoflife |
---|
| 197 | mmd -o -i $(DISK_IMAGE) ::/build/dhrystone |
---|
| 198 | mmd -o -i $(DISK_IMAGE) ::/misc |
---|
| 199 | dd if=$(DISK_IMAGE) of=temp.dmg count=65536 |
---|
| 200 | mv temp.dmg $(DISK_IMAGE) |
---|
[295] | 201 | |
---|
[326] | 202 | ### mapping generation: map.bin / map.xml / hard_config.h / giet_vsegs.ld |
---|
[339] | 203 | map.bin hard_config.h giet_vsegs.ld: $(ARCH)/arch.py $(APP)/$(APP).py |
---|
[327] | 204 | giet_python/genmap --arch=$(ARCH) --x=$(X) --y=$(Y) --p=$(P) --giet=. --$(APP) --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 | |
---|
[374] | 315 | ########################## |
---|
| 316 | ### common compilation |
---|
[258] | 317 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
| 318 | giet_fat32/fat32.h \ |
---|
[326] | 319 | hard_config.h \ |
---|
| 320 | giet_config.h |
---|
[258] | 321 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 322 | |
---|
| 323 | build/common/utils.o: giet_common/utils.c \ |
---|
| 324 | giet_common/utils.h \ |
---|
[326] | 325 | hard_config.h \ |
---|
| 326 | giet_config.h |
---|
[258] | 327 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 328 | |
---|
| 329 | build/common/vmem.o: giet_common/vmem.c \ |
---|
| 330 | giet_common/vmem.h \ |
---|
[326] | 331 | hard_config.h \ |
---|
| 332 | giet_config.h |
---|
[258] | 333 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 334 | |
---|
[374] | 335 | ######################## |
---|
[177] | 336 | ### boot compilation |
---|
[326] | 337 | build/boot/boot.elf: $(BOOT_OBJS) \ |
---|
| 338 | giet_boot/boot.ld |
---|
[258] | 339 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) |
---|
[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) \ |
---|
| 359 | giet_kernel/kernel.ld |
---|
[258] | 360 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) |
---|
| 361 | $(DU) -D $@ > $@.txt |
---|
[158] | 362 | |
---|
[326] | 363 | build/kernel/%.o: giet_kernel/%.c \ |
---|
| 364 | hard_config.h \ |
---|
| 365 | giet_config.h |
---|
[258] | 366 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 367 | |
---|
[326] | 368 | build/kernel/%.o: giet_kernel/%.s \ |
---|
| 369 | hard_config.h \ |
---|
| 370 | giet_config.h |
---|
[258] | 371 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 372 | |
---|
[374] | 373 | ########################### |
---|
| 374 | ### user libs compilation |
---|
[258] | 375 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
| 376 | giet_libs/stdio.h \ |
---|
[326] | 377 | hard_config.h \ |
---|
[258] | 378 | giet_config.h |
---|
| 379 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 380 | |
---|
| 381 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
| 382 | giet_libs/mwmr_channel.h \ |
---|
[326] | 383 | hard_config.h \ |
---|
[258] | 384 | giet_config.h |
---|
| 385 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 386 | |
---|
| 387 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
| 388 | giet_libs/malloc.h \ |
---|
| 389 | giet_libs/malloc_private.h \ |
---|
[326] | 390 | hard_config.h \ |
---|
[258] | 391 | giet_config.h |
---|
| 392 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 393 | |
---|
| 394 | build/libs/barrier.o: giet_libs/barrier.c \ |
---|
| 395 | giet_libs/barrier.h \ |
---|
[326] | 396 | hard_config.h \ |
---|
[258] | 397 | giet_config.h |
---|
| 398 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 399 | |
---|
[259] | 400 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
| 401 | giet_libs/stdlib.h \ |
---|
[326] | 402 | hard_config.h \ |
---|
[259] | 403 | giet_config.h |
---|
| 404 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 405 | |
---|
[258] | 406 | build/libs/string.o: giet_libs/string.c \ |
---|
| 407 | giet_libs/string.h \ |
---|
[326] | 408 | hard_config.h \ |
---|
[258] | 409 | giet_config.h |
---|
| 410 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 411 | |
---|
| 412 | build/libs/spin_lock.o: giet_libs/spin_lock.c \ |
---|
| 413 | giet_libs/spin_lock.h \ |
---|
[326] | 414 | hard_config.h \ |
---|
[258] | 415 | giet_config.h |
---|
| 416 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 417 | |
---|
[374] | 418 | build/libs/remote_malloc.o: giet_libs/remote_malloc.c \ |
---|
| 419 | giet_libs/spin_lock.h \ |
---|
| 420 | hard_config.h \ |
---|
| 421 | giet_config.h |
---|
| 422 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
[258] | 423 | |
---|
[374] | 424 | build/libs/sbt_barrier.o: giet_libs/sbt_barrier.c \ |
---|
| 425 | hard_config.h \ |
---|
| 426 | giet_config.h |
---|
| 427 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 428 | |
---|
| 429 | ######################################## |
---|
| 430 | ### display application compilation |
---|
[339] | 431 | build/display/display.elf: $(DISPLAY_OBJS) display/display.ld hard_config.h |
---|
[189] | 432 | $(LD) -o $@ -T display/display.ld $(DISPLAY_OBJS) |
---|
| 433 | $(DU) -D $@ > $@.txt |
---|
[158] | 434 | |
---|
[258] | 435 | build/display/main.o: display/main_cma.c |
---|
| 436 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 437 | |
---|
[374] | 438 | ######################################## |
---|
[189] | 439 | ### router compilation |
---|
[339] | 440 | build/router/router.elf: $(ROUTER_OBJS) router/router.ld hard_config.h |
---|
[189] | 441 | $(LD) -o $@ -T router/router.ld $(ROUTER_OBJS) |
---|
| 442 | $(DU) -D $@ > $@.txt |
---|
| 443 | |
---|
| 444 | build/router/main.o: router/main.c |
---|
[258] | 445 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 446 | |
---|
[374] | 447 | ######################################## |
---|
[189] | 448 | ### hello compilation |
---|
[339] | 449 | build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld hard_config.h |
---|
[189] | 450 | $(LD) -o $@ -T hello/hello.ld $(HELLO_OBJS) |
---|
| 451 | $(DU) -D $@ > $@.txt |
---|
| 452 | |
---|
| 453 | build/hello/main.o: hello/main.c |
---|
[258] | 454 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 455 | |
---|
[374] | 456 | ######################################## |
---|
[189] | 457 | ### pgcd compilation |
---|
[339] | 458 | build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld hard_config.h |
---|
[189] | 459 | $(LD) -o $@ -T pgcd/pgcd.ld $(PGCD_OBJS) |
---|
| 460 | $(DU) -D $@ > $@.txt |
---|
| 461 | |
---|
| 462 | build/pgcd/main.o: pgcd/main.c |
---|
[258] | 463 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 464 | |
---|
[374] | 465 | ######################################## |
---|
[251] | 466 | ### gameoflife compilation |
---|
| 467 | build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) gameoflife/gameoflife.ld |
---|
| 468 | $(LD) -o $@ -T gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS) |
---|
| 469 | $(DU) -D $@ > $@.txt |
---|
| 470 | |
---|
| 471 | build/gameoflife/main.o: gameoflife/main.c |
---|
[258] | 472 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< |
---|
[251] | 473 | |
---|
[374] | 474 | ######################################## |
---|
[241] | 475 | ### dhrystone compilation |
---|
[339] | 476 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld hard_config.h |
---|
[241] | 477 | $(LD) -o $@ -T dhrystone/dhrystone.ld $(DHRYSTONE_OBJS) |
---|
| 478 | $(DU) -D $@ > $@.txt |
---|
| 479 | |
---|
| 480 | build/dhrystone/dhry_1.o: dhrystone/dhry_1.c |
---|
[258] | 481 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 482 | |
---|
| 483 | build/dhrystone/dhry_2.o: dhrystone/dhry_2.c |
---|
[258] | 484 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 485 | |
---|
[374] | 486 | ######################################## |
---|
[256] | 487 | ### sort compilation |
---|
[339] | 488 | build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld hard_config.h |
---|
[256] | 489 | $(LD) -o $@ -T sort/sort.ld $(SORT_OBJS) |
---|
| 490 | $(DU) -D $@ > $@.txt |
---|
| 491 | |
---|
| 492 | build/sort/main.o: sort/main.c |
---|
[258] | 493 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[256] | 494 | |
---|
[374] | 495 | ######################################## |
---|
[295] | 496 | ### transpose compilation |
---|
[339] | 497 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld hard_config.h |
---|
[295] | 498 | $(LD) -o $@ -T transpose/transpose.ld $(TRANSPOSE_OBJS) |
---|
| 499 | $(DU) -D $@ > $@.txt |
---|
| 500 | |
---|
| 501 | build/transpose/main.o: transpose/main.c |
---|
| 502 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 503 | |
---|
[374] | 504 | ######################################## |
---|
[339] | 505 | ### convol compilation |
---|
| 506 | build/convol/convol.elf: $(CONVOL_OBJS) convol/convol.ld hard_config.h |
---|
| 507 | $(LD) -o $@ -T convol/convol.ld $(CONVOL_OBJS) |
---|
| 508 | $(DU) -D $@ > $@.txt |
---|
| 509 | |
---|
| 510 | build/convol/main.o: convol/main.c |
---|
[364] | 511 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O0 -c -o $@ $< |
---|
[339] | 512 | |
---|
[374] | 513 | ######################################## |
---|
[177] | 514 | ### clean |
---|
[158] | 515 | clean: |
---|
[326] | 516 | rm -f *.o *.elf *.bin *.txt core |
---|
| 517 | rm -f hard_config.h giet_vsegs.ld map.bin map.xml |
---|
[232] | 518 | rm -rf build/boot/* |
---|
[258] | 519 | rm -rf build/fat32/* |
---|
| 520 | rm -rf build/common/* |
---|
| 521 | rm -rf build/drivers/* |
---|
| 522 | rm -rf build/kernel/* |
---|
| 523 | rm -rf build/reset/* |
---|
[232] | 524 | rm -rf build/libs/* |
---|
| 525 | rm -rf build/pgcd/* |
---|
| 526 | rm -rf build/hello/* |
---|
| 527 | rm -rf build/display/* |
---|
| 528 | rm -rf build/router/* |
---|
[251] | 529 | rm -rf build/gameoflife/* |
---|
[241] | 530 | rm -rf build/dhrystone/* |
---|
[258] | 531 | rm -rf build/sort/* |
---|
[295] | 532 | rm -rf build/transpose/* |
---|
[339] | 533 | rm -rf build/convol/* |
---|
[366] | 534 | rm -rf $(DISK_IMAGE) |
---|