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