[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 \ |
---|
| 118 | build/libs/barrier.o |
---|
| 119 | |
---|
[345] | 120 | CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -O2 |
---|
[158] | 121 | |
---|
[258] | 122 | GIET_INCLUDE = -Igiet_boot \ |
---|
| 123 | -Igiet_kernel \ |
---|
| 124 | -Igiet_xml \ |
---|
| 125 | -Igiet_fat32 \ |
---|
| 126 | -Igiet_drivers \ |
---|
| 127 | -Igiet_common \ |
---|
| 128 | -Igiet_libs \ |
---|
| 129 | -I. |
---|
[158] | 130 | |
---|
[258] | 131 | USER_INCLUDE = -Igiet_libs \ |
---|
| 132 | -Igiet_xml \ |
---|
| 133 | -I. |
---|
[160] | 134 | |
---|
[302] | 135 | DISK_IMAGE := hdd/virt_hdd.dmg |
---|
| 136 | |
---|
| 137 | ### Copy executable and miscellaneous files into disk image |
---|
| 138 | ### Copy bootloader into sector 2 of disk image |
---|
[326] | 139 | all: map.bin \ |
---|
| 140 | hard_config.h \ |
---|
| 141 | giet_vsegs.ld \ |
---|
[258] | 142 | build/boot/boot.elf \ |
---|
| 143 | build/kernel/kernel.elf \ |
---|
| 144 | build/display/display.elf \ |
---|
| 145 | build/hello/hello.elf \ |
---|
| 146 | build/pgcd/pgcd.elf \ |
---|
[302] | 147 | build/router/router.elf \ |
---|
[258] | 148 | build/dhrystone/dhrystone.elf \ |
---|
| 149 | build/gameoflife/gameoflife.elf \ |
---|
| 150 | build/sort/sort.elf \ |
---|
[295] | 151 | build/transpose/transpose.elf \ |
---|
[339] | 152 | build/convol/convol.elf \ |
---|
[326] | 153 | $(DISK_IMAGE) |
---|
[302] | 154 | |
---|
[304] | 155 | mcopy -o -i $(DISK_IMAGE) build/kernel/kernel.elf ::/build/kernel |
---|
| 156 | mcopy -o -i $(DISK_IMAGE) build/display/display.elf ::/build/display |
---|
| 157 | mcopy -o -i $(DISK_IMAGE) build/sort/sort.elf ::/build/sort |
---|
| 158 | mcopy -o -i $(DISK_IMAGE) build/transpose/transpose.elf ::/build/transpose |
---|
[339] | 159 | mcopy -o -i $(DISK_IMAGE) build/convol/convol.elf ::/build/convol |
---|
[304] | 160 | mcopy -o -i $(DISK_IMAGE) build/hello/hello.elf ::/build/hello |
---|
| 161 | mcopy -o -i $(DISK_IMAGE) build/pgcd/pgcd.elf ::/build/pgcd |
---|
| 162 | mcopy -o -i $(DISK_IMAGE) build/router/router.elf ::/build/router |
---|
| 163 | mcopy -o -i $(DISK_IMAGE) build/gameoflife/gameoflife.elf ::/build/gameoflife |
---|
| 164 | mcopy -o -i $(DISK_IMAGE) build/dhrystone/dhrystone.elf ::/build/dhrystone |
---|
[314] | 165 | mcopy -o -i $(DISK_IMAGE) transpose/images.raw ::/misc |
---|
[339] | 166 | mcopy -o -i $(DISK_IMAGE) convol/philips_image.raw ::/misc |
---|
[304] | 167 | mcopy -o -i $(DISK_IMAGE) map.bin ::/ |
---|
[302] | 168 | dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc |
---|
[160] | 169 | |
---|
[258] | 170 | ### Disk image generation |
---|
[272] | 171 | ### This requires the generic LINUX/MacOS script "create_dmg" script |
---|
[258] | 172 | ### written by C.Fuguet. (should be installed in GIET-VM root directory). |
---|
[302] | 173 | $(DISK_IMAGE): |
---|
| 174 | ./create_dmg create $(basename $(DISK_IMAGE)) |
---|
[304] | 175 | mmd -o -i $(DISK_IMAGE) ::/build |
---|
| 176 | mmd -o -i $(DISK_IMAGE) ::/build/kernel |
---|
| 177 | mmd -o -i $(DISK_IMAGE) ::/build/display |
---|
| 178 | mmd -o -i $(DISK_IMAGE) ::/build/sort |
---|
| 179 | mmd -o -i $(DISK_IMAGE) ::/build/transpose |
---|
[339] | 180 | mmd -o -i $(DISK_IMAGE) ::/build/convol |
---|
[304] | 181 | mmd -o -i $(DISK_IMAGE) ::/build/hello |
---|
| 182 | mmd -o -i $(DISK_IMAGE) ::/build/pgcd |
---|
| 183 | mmd -o -i $(DISK_IMAGE) ::/build/router |
---|
| 184 | mmd -o -i $(DISK_IMAGE) ::/build/gameoflife |
---|
| 185 | mmd -o -i $(DISK_IMAGE) ::/build/dhrystone |
---|
| 186 | mmd -o -i $(DISK_IMAGE) ::/misc |
---|
| 187 | dd if=$(DISK_IMAGE) of=temp.dmg count=65536 |
---|
| 188 | mv temp.dmg $(DISK_IMAGE) |
---|
[295] | 189 | |
---|
[326] | 190 | ### mapping generation: map.bin / map.xml / hard_config.h / giet_vsegs.ld |
---|
[339] | 191 | map.bin hard_config.h giet_vsegs.ld: $(ARCH)/arch.py $(APP)/$(APP).py |
---|
[327] | 192 | giet_python/genmap --arch=$(ARCH) --x=$(X) --y=$(Y) --p=$(P) --giet=. --$(APP) --xml=. |
---|
[158] | 193 | |
---|
[258] | 194 | ### drivers compilation |
---|
[295] | 195 | build/drivers/cma_driver.o: giet_drivers/cma_driver.c \ |
---|
| 196 | giet_drivers/cma_driver.h \ |
---|
[326] | 197 | hard_config.h \ |
---|
| 198 | giet_config.h |
---|
[295] | 199 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 200 | |
---|
[258] | 201 | build/drivers/dma_driver.o: giet_drivers/dma_driver.c \ |
---|
| 202 | giet_drivers/dma_driver.h \ |
---|
[326] | 203 | hard_config.h \ |
---|
| 204 | giet_config.h |
---|
[258] | 205 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 206 | |
---|
[258] | 207 | build/drivers/fbf_driver.o: giet_drivers/fbf_driver.c \ |
---|
| 208 | giet_drivers/fbf_driver.h \ |
---|
[326] | 209 | hard_config.h \ |
---|
| 210 | giet_config.h |
---|
[258] | 211 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 212 | |
---|
[258] | 213 | build/drivers/xcu_driver.o: giet_drivers/xcu_driver.c \ |
---|
| 214 | giet_drivers/xcu_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/icu_driver.o: giet_drivers/icu_driver.c \ |
---|
| 220 | giet_drivers/icu_driver.h \ |
---|
[326] | 221 | hard_config.h \ |
---|
| 222 | giet_config.h |
---|
[258] | 223 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 224 | |
---|
| 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 | |
---|
[258] | 303 | ### fat32 compilation |
---|
| 304 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
| 305 | giet_fat32/fat32.h \ |
---|
[326] | 306 | hard_config.h \ |
---|
| 307 | giet_config.h |
---|
[258] | 308 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 309 | |
---|
| 310 | ### utils compilation |
---|
| 311 | build/common/utils.o: giet_common/utils.c \ |
---|
| 312 | giet_common/utils.h \ |
---|
[326] | 313 | hard_config.h \ |
---|
| 314 | giet_config.h |
---|
[258] | 315 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 316 | |
---|
| 317 | ### vmem compilation |
---|
| 318 | build/common/vmem.o: giet_common/vmem.c \ |
---|
| 319 | giet_common/vmem.h \ |
---|
[326] | 320 | hard_config.h \ |
---|
| 321 | giet_config.h |
---|
[258] | 322 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 323 | |
---|
[177] | 324 | ### boot compilation |
---|
[326] | 325 | build/boot/boot.elf: $(BOOT_OBJS) \ |
---|
| 326 | giet_boot/boot.ld |
---|
[258] | 327 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) |
---|
[189] | 328 | $(DU) -D $@ > $@.txt |
---|
[158] | 329 | |
---|
[258] | 330 | build/boot/boot.o: giet_boot/boot.c \ |
---|
| 331 | giet_common/utils.h \ |
---|
| 332 | giet_fat32/fat32.h \ |
---|
[289] | 333 | giet_common/vmem.h \ |
---|
[258] | 334 | giet_drivers/tty_driver.h \ |
---|
| 335 | giet_drivers/ioc_driver.h \ |
---|
[326] | 336 | hard_config.h \ |
---|
| 337 | giet_config.h |
---|
[258] | 338 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 339 | |
---|
[258] | 340 | ### kernel compilation |
---|
[326] | 341 | build/kernel/kernel.elf: $(KERNEL_OBJS) \ |
---|
| 342 | giet_kernel/kernel.ld |
---|
[258] | 343 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) |
---|
| 344 | $(DU) -D $@ > $@.txt |
---|
[158] | 345 | |
---|
[326] | 346 | build/kernel/%.o: giet_kernel/%.c \ |
---|
| 347 | hard_config.h \ |
---|
| 348 | giet_config.h |
---|
[258] | 349 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 350 | |
---|
[326] | 351 | build/kernel/%.o: giet_kernel/%.s \ |
---|
| 352 | hard_config.h \ |
---|
| 353 | giet_config.h |
---|
[258] | 354 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 355 | |
---|
| 356 | |
---|
| 357 | |
---|
| 358 | |
---|
| 359 | ### libs compilation |
---|
| 360 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
| 361 | giet_libs/stdio.h \ |
---|
[326] | 362 | hard_config.h \ |
---|
[258] | 363 | giet_config.h |
---|
| 364 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 365 | |
---|
| 366 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
| 367 | giet_libs/mwmr_channel.h \ |
---|
[326] | 368 | hard_config.h \ |
---|
[258] | 369 | giet_config.h |
---|
| 370 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 371 | |
---|
| 372 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
| 373 | giet_libs/malloc.h \ |
---|
| 374 | giet_libs/malloc_private.h \ |
---|
[326] | 375 | hard_config.h \ |
---|
[258] | 376 | giet_config.h |
---|
| 377 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 378 | |
---|
| 379 | build/libs/barrier.o: giet_libs/barrier.c \ |
---|
| 380 | giet_libs/barrier.h \ |
---|
[326] | 381 | hard_config.h \ |
---|
[258] | 382 | giet_config.h |
---|
| 383 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 384 | |
---|
[259] | 385 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
| 386 | giet_libs/stdlib.h \ |
---|
[326] | 387 | hard_config.h \ |
---|
[259] | 388 | giet_config.h |
---|
| 389 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 390 | |
---|
[258] | 391 | build/libs/string.o: giet_libs/string.c \ |
---|
| 392 | giet_libs/string.h \ |
---|
[326] | 393 | hard_config.h \ |
---|
[258] | 394 | giet_config.h |
---|
| 395 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 396 | |
---|
| 397 | build/libs/spin_lock.o: giet_libs/spin_lock.c \ |
---|
| 398 | giet_libs/spin_lock.h \ |
---|
[326] | 399 | hard_config.h \ |
---|
[258] | 400 | giet_config.h |
---|
| 401 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 402 | |
---|
| 403 | |
---|
[189] | 404 | ### display compilation |
---|
[339] | 405 | build/display/display.elf: $(DISPLAY_OBJS) display/display.ld hard_config.h |
---|
[189] | 406 | $(LD) -o $@ -T display/display.ld $(DISPLAY_OBJS) |
---|
| 407 | $(DU) -D $@ > $@.txt |
---|
[158] | 408 | |
---|
[258] | 409 | build/display/main.o: display/main_cma.c |
---|
| 410 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 411 | |
---|
| 412 | ### router compilation |
---|
[339] | 413 | build/router/router.elf: $(ROUTER_OBJS) router/router.ld hard_config.h |
---|
[189] | 414 | $(LD) -o $@ -T router/router.ld $(ROUTER_OBJS) |
---|
| 415 | $(DU) -D $@ > $@.txt |
---|
| 416 | |
---|
| 417 | build/router/main.o: router/main.c |
---|
[258] | 418 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 419 | |
---|
| 420 | ### hello compilation |
---|
[339] | 421 | build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld hard_config.h |
---|
[189] | 422 | $(LD) -o $@ -T hello/hello.ld $(HELLO_OBJS) |
---|
| 423 | $(DU) -D $@ > $@.txt |
---|
| 424 | |
---|
| 425 | build/hello/main.o: hello/main.c |
---|
[258] | 426 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 427 | |
---|
| 428 | ### pgcd compilation |
---|
[339] | 429 | build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld hard_config.h |
---|
[189] | 430 | $(LD) -o $@ -T pgcd/pgcd.ld $(PGCD_OBJS) |
---|
| 431 | $(DU) -D $@ > $@.txt |
---|
| 432 | |
---|
| 433 | build/pgcd/main.o: pgcd/main.c |
---|
[258] | 434 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 435 | |
---|
[251] | 436 | ### gameoflife compilation |
---|
| 437 | build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) gameoflife/gameoflife.ld |
---|
| 438 | $(LD) -o $@ -T gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS) |
---|
| 439 | $(DU) -D $@ > $@.txt |
---|
| 440 | |
---|
| 441 | build/gameoflife/main.o: gameoflife/main.c |
---|
[258] | 442 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< |
---|
[251] | 443 | |
---|
[241] | 444 | ### dhrystone compilation |
---|
[339] | 445 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld hard_config.h |
---|
[241] | 446 | $(LD) -o $@ -T dhrystone/dhrystone.ld $(DHRYSTONE_OBJS) |
---|
| 447 | $(DU) -D $@ > $@.txt |
---|
| 448 | |
---|
| 449 | build/dhrystone/dhry_1.o: dhrystone/dhry_1.c |
---|
[258] | 450 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 451 | |
---|
| 452 | build/dhrystone/dhry_2.o: dhrystone/dhry_2.c |
---|
[258] | 453 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 454 | |
---|
[256] | 455 | ### sort compilation |
---|
[339] | 456 | build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld hard_config.h |
---|
[256] | 457 | $(LD) -o $@ -T sort/sort.ld $(SORT_OBJS) |
---|
| 458 | $(DU) -D $@ > $@.txt |
---|
| 459 | |
---|
| 460 | build/sort/main.o: sort/main.c |
---|
[258] | 461 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[256] | 462 | |
---|
[295] | 463 | ### transpose compilation |
---|
[339] | 464 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld hard_config.h |
---|
[295] | 465 | $(LD) -o $@ -T transpose/transpose.ld $(TRANSPOSE_OBJS) |
---|
| 466 | $(DU) -D $@ > $@.txt |
---|
| 467 | |
---|
| 468 | build/transpose/main.o: transpose/main.c |
---|
| 469 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 470 | |
---|
[339] | 471 | ### convol compilation |
---|
| 472 | build/convol/convol.elf: $(CONVOL_OBJS) convol/convol.ld hard_config.h |
---|
| 473 | $(LD) -o $@ -T convol/convol.ld $(CONVOL_OBJS) |
---|
| 474 | $(DU) -D $@ > $@.txt |
---|
| 475 | |
---|
| 476 | build/convol/main.o: convol/main.c |
---|
| 477 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 478 | |
---|
[177] | 479 | ### clean |
---|
[158] | 480 | clean: |
---|
[326] | 481 | rm -f *.o *.elf *.bin *.txt core |
---|
| 482 | rm -f hard_config.h giet_vsegs.ld map.bin map.xml |
---|
[232] | 483 | rm -rf build/boot/* |
---|
[258] | 484 | rm -rf build/fat32/* |
---|
| 485 | rm -rf build/common/* |
---|
| 486 | rm -rf build/drivers/* |
---|
| 487 | rm -rf build/kernel/* |
---|
| 488 | rm -rf build/reset/* |
---|
[232] | 489 | rm -rf build/libs/* |
---|
| 490 | rm -rf build/pgcd/* |
---|
| 491 | rm -rf build/hello/* |
---|
| 492 | rm -rf build/display/* |
---|
| 493 | rm -rf build/router/* |
---|
[251] | 494 | rm -rf build/gameoflife/* |
---|
[241] | 495 | rm -rf build/dhrystone/* |
---|
[258] | 496 | rm -rf build/sort/* |
---|
[295] | 497 | rm -rf build/transpose/* |
---|
[339] | 498 | rm -rf build/convol/* |
---|
[345] | 499 | |
---|
| 500 | distclean: clean |
---|
[258] | 501 | rm -rf hdd/virt_hdd.dmg |
---|