[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 |
---|
[339] | 10 | X ?= 4 |
---|
| 11 | Y ?= 4 |
---|
| 12 | P ?= 4 |
---|
| 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 \ |
---|
| 71 | build/boot/boot.o |
---|
| 72 | |
---|
| 73 | ### Objects to be linked for display.elf |
---|
[189] | 74 | DISPLAY_OBJS = build/display/main.o \ |
---|
[258] | 75 | build/libs/stdio.o |
---|
[162] | 76 | |
---|
[258] | 77 | ### Objects to be linked for router.elf |
---|
| 78 | ROUTER_OBJS = build/router/main.o \ |
---|
| 79 | build/libs/mwmr_channel.o \ |
---|
| 80 | build/libs/stdio.o |
---|
[162] | 81 | |
---|
[258] | 82 | ### Objects to be linked for hello.elf |
---|
| 83 | HELLO_OBJS = build/hello/main.o \ |
---|
| 84 | build/libs/stdio.o |
---|
[158] | 85 | |
---|
[258] | 86 | ### Objects to be linked for pgcd.elf |
---|
| 87 | PGCD_OBJS = build/pgcd/main.o \ |
---|
| 88 | build/libs/stdio.o |
---|
[158] | 89 | |
---|
[258] | 90 | ### Objects to be linked for game.elf |
---|
| 91 | GAMEOFLIFE_OBJS = build/gameoflife/main.o \ |
---|
| 92 | build/libs/stdio.o \ |
---|
| 93 | build/libs/barrier.o |
---|
[251] | 94 | |
---|
[258] | 95 | ### Objects to be linked for dhrystone.elf |
---|
[241] | 96 | DHRYSTONE_OBJS = build/dhrystone/dhry_1.o \ |
---|
| 97 | build/dhrystone/dhry_2.o \ |
---|
[272] | 98 | build/libs/stdlib.o \ |
---|
[258] | 99 | build/libs/stdio.o \ |
---|
| 100 | build/libs/string.o \ |
---|
| 101 | build/libs/spin_lock.o \ |
---|
[241] | 102 | build/libs/malloc.o |
---|
| 103 | |
---|
[258] | 104 | ### Objects to be linked for sort.elf |
---|
| 105 | SORT_OBJS = build/sort/main.o \ |
---|
| 106 | build/libs/stdio.o \ |
---|
| 107 | build/libs/spin_lock.o \ |
---|
| 108 | build/libs/barrier.o |
---|
[241] | 109 | |
---|
[295] | 110 | ### Objects to be linked for transpose.elf |
---|
| 111 | TRANSPOSE_OBJS = build/transpose/main.o \ |
---|
| 112 | build/libs/stdio.o \ |
---|
| 113 | build/libs/barrier.o |
---|
[258] | 114 | |
---|
[339] | 115 | ### Objects to be linked for convol.elf |
---|
| 116 | CONVOL_OBJS = build/convol/main.o \ |
---|
| 117 | build/libs/stdio.o \ |
---|
[356] | 118 | build/libs/stdlib.o \ |
---|
[339] | 119 | build/libs/barrier.o |
---|
| 120 | |
---|
[356] | 121 | CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g |
---|
[158] | 122 | |
---|
[258] | 123 | GIET_INCLUDE = -Igiet_boot \ |
---|
| 124 | -Igiet_kernel \ |
---|
| 125 | -Igiet_xml \ |
---|
| 126 | -Igiet_fat32 \ |
---|
| 127 | -Igiet_drivers \ |
---|
| 128 | -Igiet_common \ |
---|
| 129 | -Igiet_libs \ |
---|
| 130 | -I. |
---|
[158] | 131 | |
---|
[258] | 132 | USER_INCLUDE = -Igiet_libs \ |
---|
| 133 | -Igiet_xml \ |
---|
| 134 | -I. |
---|
[160] | 135 | |
---|
[302] | 136 | DISK_IMAGE := hdd/virt_hdd.dmg |
---|
| 137 | |
---|
| 138 | ### Copy executable and miscellaneous files into disk image |
---|
| 139 | ### Copy bootloader into sector 2 of disk image |
---|
[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 | |
---|
[304] | 156 | mcopy -o -i $(DISK_IMAGE) build/kernel/kernel.elf ::/build/kernel |
---|
| 157 | mcopy -o -i $(DISK_IMAGE) build/display/display.elf ::/build/display |
---|
| 158 | mcopy -o -i $(DISK_IMAGE) build/sort/sort.elf ::/build/sort |
---|
| 159 | mcopy -o -i $(DISK_IMAGE) build/transpose/transpose.elf ::/build/transpose |
---|
[339] | 160 | mcopy -o -i $(DISK_IMAGE) build/convol/convol.elf ::/build/convol |
---|
[304] | 161 | mcopy -o -i $(DISK_IMAGE) build/hello/hello.elf ::/build/hello |
---|
| 162 | mcopy -o -i $(DISK_IMAGE) build/pgcd/pgcd.elf ::/build/pgcd |
---|
| 163 | mcopy -o -i $(DISK_IMAGE) build/router/router.elf ::/build/router |
---|
| 164 | mcopy -o -i $(DISK_IMAGE) build/gameoflife/gameoflife.elf ::/build/gameoflife |
---|
| 165 | mcopy -o -i $(DISK_IMAGE) build/dhrystone/dhrystone.elf ::/build/dhrystone |
---|
[314] | 166 | mcopy -o -i $(DISK_IMAGE) transpose/images.raw ::/misc |
---|
[339] | 167 | mcopy -o -i $(DISK_IMAGE) convol/philips_image.raw ::/misc |
---|
[304] | 168 | mcopy -o -i $(DISK_IMAGE) map.bin ::/ |
---|
[302] | 169 | dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc |
---|
[160] | 170 | |
---|
[258] | 171 | ### Disk image generation |
---|
[272] | 172 | ### This requires the generic LINUX/MacOS script "create_dmg" script |
---|
[258] | 173 | ### written by C.Fuguet. (should be installed in GIET-VM root directory). |
---|
[302] | 174 | $(DISK_IMAGE): |
---|
| 175 | ./create_dmg create $(basename $(DISK_IMAGE)) |
---|
[304] | 176 | mmd -o -i $(DISK_IMAGE) ::/build |
---|
| 177 | mmd -o -i $(DISK_IMAGE) ::/build/kernel |
---|
| 178 | mmd -o -i $(DISK_IMAGE) ::/build/display |
---|
| 179 | mmd -o -i $(DISK_IMAGE) ::/build/sort |
---|
| 180 | mmd -o -i $(DISK_IMAGE) ::/build/transpose |
---|
[339] | 181 | mmd -o -i $(DISK_IMAGE) ::/build/convol |
---|
[304] | 182 | mmd -o -i $(DISK_IMAGE) ::/build/hello |
---|
| 183 | mmd -o -i $(DISK_IMAGE) ::/build/pgcd |
---|
| 184 | mmd -o -i $(DISK_IMAGE) ::/build/router |
---|
| 185 | mmd -o -i $(DISK_IMAGE) ::/build/gameoflife |
---|
| 186 | mmd -o -i $(DISK_IMAGE) ::/build/dhrystone |
---|
| 187 | mmd -o -i $(DISK_IMAGE) ::/misc |
---|
| 188 | dd if=$(DISK_IMAGE) of=temp.dmg count=65536 |
---|
| 189 | mv temp.dmg $(DISK_IMAGE) |
---|
[295] | 190 | |
---|
[326] | 191 | ### mapping generation: map.bin / map.xml / hard_config.h / giet_vsegs.ld |
---|
[339] | 192 | map.bin hard_config.h giet_vsegs.ld: $(ARCH)/arch.py $(APP)/$(APP).py |
---|
[327] | 193 | giet_python/genmap --arch=$(ARCH) --x=$(X) --y=$(Y) --p=$(P) --giet=. --$(APP) --xml=. |
---|
[158] | 194 | |
---|
[258] | 195 | ### drivers compilation |
---|
[295] | 196 | build/drivers/cma_driver.o: giet_drivers/cma_driver.c \ |
---|
| 197 | giet_drivers/cma_driver.h \ |
---|
[326] | 198 | hard_config.h \ |
---|
| 199 | giet_config.h |
---|
[295] | 200 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 201 | |
---|
[258] | 202 | build/drivers/dma_driver.o: giet_drivers/dma_driver.c \ |
---|
| 203 | giet_drivers/dma_driver.h \ |
---|
[326] | 204 | hard_config.h \ |
---|
| 205 | giet_config.h |
---|
[258] | 206 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 207 | |
---|
[258] | 208 | build/drivers/fbf_driver.o: giet_drivers/fbf_driver.c \ |
---|
| 209 | giet_drivers/fbf_driver.h \ |
---|
[326] | 210 | hard_config.h \ |
---|
| 211 | giet_config.h |
---|
[258] | 212 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 213 | |
---|
[258] | 214 | build/drivers/xcu_driver.o: giet_drivers/xcu_driver.c \ |
---|
| 215 | giet_drivers/xcu_driver.h \ |
---|
[326] | 216 | hard_config.h \ |
---|
| 217 | giet_config.h |
---|
[258] | 218 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 219 | |
---|
[258] | 220 | build/drivers/icu_driver.o: giet_drivers/icu_driver.c \ |
---|
| 221 | giet_drivers/icu_driver.h \ |
---|
[326] | 222 | hard_config.h \ |
---|
| 223 | giet_config.h |
---|
[258] | 224 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 225 | |
---|
| 226 | build/drivers/ioc_driver.o: giet_drivers/ioc_driver.c \ |
---|
| 227 | giet_drivers/ioc_driver.h \ |
---|
[326] | 228 | hard_config.h \ |
---|
| 229 | giet_config.h |
---|
[258] | 230 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 231 | |
---|
[289] | 232 | build/drivers/bdv_driver.o: giet_drivers/bdv_driver.c \ |
---|
| 233 | giet_drivers/bdv_driver.h \ |
---|
[326] | 234 | hard_config.h \ |
---|
| 235 | giet_config.h |
---|
[289] | 236 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 237 | |
---|
| 238 | build/drivers/hba_driver.o: giet_drivers/hba_driver.c \ |
---|
| 239 | giet_drivers/hba_driver.h \ |
---|
[326] | 240 | hard_config.h \ |
---|
| 241 | giet_config.h |
---|
[289] | 242 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 243 | |
---|
| 244 | build/drivers/sdc_driver.o: giet_drivers/sdc_driver.c \ |
---|
| 245 | giet_drivers/sdc_driver.h \ |
---|
[326] | 246 | hard_config.h \ |
---|
| 247 | giet_config.h |
---|
[289] | 248 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 249 | |
---|
| 250 | build/drivers/spi_driver.o: giet_drivers/spi_driver.c \ |
---|
| 251 | giet_drivers/spi_driver.h \ |
---|
[326] | 252 | hard_config.h \ |
---|
| 253 | giet_config.h |
---|
[289] | 254 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 255 | |
---|
[295] | 256 | build/drivers/rdk_driver.o: giet_drivers/rdk_driver.c \ |
---|
| 257 | giet_drivers/rdk_driver.h \ |
---|
[326] | 258 | hard_config.h \ |
---|
| 259 | giet_config.h |
---|
[295] | 260 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 261 | |
---|
[258] | 262 | build/drivers/iob_driver.o: giet_drivers/iob_driver.c \ |
---|
| 263 | giet_drivers/iob_driver.h \ |
---|
[326] | 264 | hard_config.h \ |
---|
| 265 | giet_config.h |
---|
[258] | 266 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 267 | |
---|
| 268 | build/drivers/mmc_driver.o: giet_drivers/mmc_driver.c \ |
---|
| 269 | giet_drivers/mmc_driver.h \ |
---|
[326] | 270 | hard_config.h \ |
---|
| 271 | giet_config.h |
---|
[258] | 272 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 273 | |
---|
| 274 | build/drivers/mwr_driver.o: giet_drivers/mwr_driver.c \ |
---|
| 275 | giet_drivers/mwr_driver.h \ |
---|
[326] | 276 | hard_config.h \ |
---|
| 277 | giet_config.h |
---|
[258] | 278 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 279 | |
---|
| 280 | build/drivers/nic_driver.o: giet_drivers/nic_driver.c \ |
---|
| 281 | giet_drivers/nic_driver.h \ |
---|
[326] | 282 | hard_config.h \ |
---|
| 283 | giet_config.h |
---|
[258] | 284 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 285 | |
---|
| 286 | build/drivers/tim_driver.o: giet_drivers/tim_driver.c \ |
---|
| 287 | giet_drivers/tim_driver.h \ |
---|
[326] | 288 | hard_config.h \ |
---|
| 289 | giet_config.h |
---|
[258] | 290 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 291 | |
---|
| 292 | build/drivers/tty_driver.o: giet_drivers/tty_driver.c \ |
---|
| 293 | giet_drivers/tty_driver.h \ |
---|
[326] | 294 | hard_config.h \ |
---|
| 295 | giet_config.h |
---|
[258] | 296 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 297 | |
---|
[295] | 298 | build/drivers/pic_driver.o: giet_drivers/pic_driver.c \ |
---|
| 299 | giet_drivers/pic_driver.h \ |
---|
[326] | 300 | hard_config.h \ |
---|
| 301 | giet_config.h |
---|
[295] | 302 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 303 | |
---|
[258] | 304 | ### fat32 compilation |
---|
| 305 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
| 306 | giet_fat32/fat32.h \ |
---|
[326] | 307 | hard_config.h \ |
---|
| 308 | giet_config.h |
---|
[258] | 309 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 310 | |
---|
| 311 | ### utils compilation |
---|
| 312 | build/common/utils.o: giet_common/utils.c \ |
---|
| 313 | giet_common/utils.h \ |
---|
[326] | 314 | hard_config.h \ |
---|
| 315 | giet_config.h |
---|
[258] | 316 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 317 | |
---|
| 318 | ### vmem compilation |
---|
| 319 | build/common/vmem.o: giet_common/vmem.c \ |
---|
| 320 | giet_common/vmem.h \ |
---|
[326] | 321 | hard_config.h \ |
---|
| 322 | giet_config.h |
---|
[258] | 323 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 324 | |
---|
[177] | 325 | ### boot compilation |
---|
[326] | 326 | build/boot/boot.elf: $(BOOT_OBJS) \ |
---|
| 327 | giet_boot/boot.ld |
---|
[258] | 328 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) |
---|
[189] | 329 | $(DU) -D $@ > $@.txt |
---|
[158] | 330 | |
---|
[258] | 331 | build/boot/boot.o: giet_boot/boot.c \ |
---|
| 332 | giet_common/utils.h \ |
---|
| 333 | giet_fat32/fat32.h \ |
---|
[289] | 334 | giet_common/vmem.h \ |
---|
[258] | 335 | giet_drivers/tty_driver.h \ |
---|
| 336 | giet_drivers/ioc_driver.h \ |
---|
[326] | 337 | hard_config.h \ |
---|
| 338 | giet_config.h |
---|
[258] | 339 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 340 | |
---|
[258] | 341 | ### kernel compilation |
---|
[326] | 342 | build/kernel/kernel.elf: $(KERNEL_OBJS) \ |
---|
| 343 | giet_kernel/kernel.ld |
---|
[258] | 344 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) |
---|
| 345 | $(DU) -D $@ > $@.txt |
---|
[158] | 346 | |
---|
[326] | 347 | build/kernel/%.o: giet_kernel/%.c \ |
---|
| 348 | hard_config.h \ |
---|
| 349 | giet_config.h |
---|
[258] | 350 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 351 | |
---|
[326] | 352 | build/kernel/%.o: giet_kernel/%.s \ |
---|
| 353 | hard_config.h \ |
---|
| 354 | giet_config.h |
---|
[258] | 355 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 356 | |
---|
| 357 | |
---|
| 358 | |
---|
| 359 | |
---|
| 360 | ### libs compilation |
---|
| 361 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
| 362 | giet_libs/stdio.h \ |
---|
[326] | 363 | hard_config.h \ |
---|
[258] | 364 | giet_config.h |
---|
| 365 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 366 | |
---|
| 367 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
| 368 | giet_libs/mwmr_channel.h \ |
---|
[326] | 369 | hard_config.h \ |
---|
[258] | 370 | giet_config.h |
---|
| 371 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 372 | |
---|
| 373 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
| 374 | giet_libs/malloc.h \ |
---|
| 375 | giet_libs/malloc_private.h \ |
---|
[326] | 376 | hard_config.h \ |
---|
[258] | 377 | giet_config.h |
---|
| 378 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 379 | |
---|
| 380 | build/libs/barrier.o: giet_libs/barrier.c \ |
---|
| 381 | giet_libs/barrier.h \ |
---|
[326] | 382 | hard_config.h \ |
---|
[258] | 383 | giet_config.h |
---|
| 384 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 385 | |
---|
[259] | 386 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
| 387 | giet_libs/stdlib.h \ |
---|
[326] | 388 | hard_config.h \ |
---|
[259] | 389 | giet_config.h |
---|
| 390 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 391 | |
---|
[258] | 392 | build/libs/string.o: giet_libs/string.c \ |
---|
| 393 | giet_libs/string.h \ |
---|
[326] | 394 | hard_config.h \ |
---|
[258] | 395 | giet_config.h |
---|
| 396 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 397 | |
---|
| 398 | build/libs/spin_lock.o: giet_libs/spin_lock.c \ |
---|
| 399 | giet_libs/spin_lock.h \ |
---|
[326] | 400 | hard_config.h \ |
---|
[258] | 401 | giet_config.h |
---|
| 402 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 403 | |
---|
| 404 | |
---|
[189] | 405 | ### display compilation |
---|
[339] | 406 | build/display/display.elf: $(DISPLAY_OBJS) display/display.ld hard_config.h |
---|
[189] | 407 | $(LD) -o $@ -T display/display.ld $(DISPLAY_OBJS) |
---|
| 408 | $(DU) -D $@ > $@.txt |
---|
[158] | 409 | |
---|
[258] | 410 | build/display/main.o: display/main_cma.c |
---|
| 411 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 412 | |
---|
| 413 | ### router compilation |
---|
[339] | 414 | build/router/router.elf: $(ROUTER_OBJS) router/router.ld hard_config.h |
---|
[189] | 415 | $(LD) -o $@ -T router/router.ld $(ROUTER_OBJS) |
---|
| 416 | $(DU) -D $@ > $@.txt |
---|
| 417 | |
---|
| 418 | build/router/main.o: router/main.c |
---|
[258] | 419 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 420 | |
---|
| 421 | ### hello compilation |
---|
[339] | 422 | build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld hard_config.h |
---|
[189] | 423 | $(LD) -o $@ -T hello/hello.ld $(HELLO_OBJS) |
---|
| 424 | $(DU) -D $@ > $@.txt |
---|
| 425 | |
---|
| 426 | build/hello/main.o: hello/main.c |
---|
[258] | 427 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 428 | |
---|
| 429 | ### pgcd compilation |
---|
[339] | 430 | build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld hard_config.h |
---|
[189] | 431 | $(LD) -o $@ -T pgcd/pgcd.ld $(PGCD_OBJS) |
---|
| 432 | $(DU) -D $@ > $@.txt |
---|
| 433 | |
---|
| 434 | build/pgcd/main.o: pgcd/main.c |
---|
[258] | 435 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 436 | |
---|
[251] | 437 | ### gameoflife compilation |
---|
| 438 | build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) gameoflife/gameoflife.ld |
---|
| 439 | $(LD) -o $@ -T gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS) |
---|
| 440 | $(DU) -D $@ > $@.txt |
---|
| 441 | |
---|
| 442 | build/gameoflife/main.o: gameoflife/main.c |
---|
[258] | 443 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< |
---|
[251] | 444 | |
---|
[241] | 445 | ### dhrystone compilation |
---|
[339] | 446 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld hard_config.h |
---|
[241] | 447 | $(LD) -o $@ -T dhrystone/dhrystone.ld $(DHRYSTONE_OBJS) |
---|
| 448 | $(DU) -D $@ > $@.txt |
---|
| 449 | |
---|
| 450 | build/dhrystone/dhry_1.o: dhrystone/dhry_1.c |
---|
[258] | 451 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 452 | |
---|
| 453 | build/dhrystone/dhry_2.o: dhrystone/dhry_2.c |
---|
[258] | 454 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 455 | |
---|
[256] | 456 | ### sort compilation |
---|
[339] | 457 | build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld hard_config.h |
---|
[256] | 458 | $(LD) -o $@ -T sort/sort.ld $(SORT_OBJS) |
---|
| 459 | $(DU) -D $@ > $@.txt |
---|
| 460 | |
---|
| 461 | build/sort/main.o: sort/main.c |
---|
[258] | 462 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[256] | 463 | |
---|
[295] | 464 | ### transpose compilation |
---|
[339] | 465 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld hard_config.h |
---|
[295] | 466 | $(LD) -o $@ -T transpose/transpose.ld $(TRANSPOSE_OBJS) |
---|
| 467 | $(DU) -D $@ > $@.txt |
---|
| 468 | |
---|
| 469 | build/transpose/main.o: transpose/main.c |
---|
| 470 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 471 | |
---|
[339] | 472 | ### convol compilation |
---|
| 473 | build/convol/convol.elf: $(CONVOL_OBJS) convol/convol.ld hard_config.h |
---|
| 474 | $(LD) -o $@ -T convol/convol.ld $(CONVOL_OBJS) |
---|
| 475 | $(DU) -D $@ > $@.txt |
---|
| 476 | |
---|
| 477 | build/convol/main.o: convol/main.c |
---|
| 478 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 479 | |
---|
[177] | 480 | ### clean |
---|
[158] | 481 | clean: |
---|
[326] | 482 | rm -f *.o *.elf *.bin *.txt core |
---|
| 483 | rm -f hard_config.h giet_vsegs.ld map.bin map.xml |
---|
[232] | 484 | rm -rf build/boot/* |
---|
[258] | 485 | rm -rf build/fat32/* |
---|
| 486 | rm -rf build/common/* |
---|
| 487 | rm -rf build/drivers/* |
---|
| 488 | rm -rf build/kernel/* |
---|
| 489 | rm -rf build/reset/* |
---|
[232] | 490 | rm -rf build/libs/* |
---|
| 491 | rm -rf build/pgcd/* |
---|
| 492 | rm -rf build/hello/* |
---|
| 493 | rm -rf build/display/* |
---|
| 494 | rm -rf build/router/* |
---|
[251] | 495 | rm -rf build/gameoflife/* |
---|
[241] | 496 | rm -rf build/dhrystone/* |
---|
[258] | 497 | rm -rf build/sort/* |
---|
[295] | 498 | rm -rf build/transpose/* |
---|
[339] | 499 | rm -rf build/convol/* |
---|
[345] | 500 | |
---|
| 501 | distclean: clean |
---|
[258] | 502 | rm -rf hdd/virt_hdd.dmg |
---|