[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 |
---|
| 184 | map.bin: $(ARCH)/genmap.py $(APP)/$(APP).py |
---|
| 185 | giet_python/tsarmap --arch=$(ARCH) --x=$(X) --y=$(Y) --p=$(P) --giet=. --$(APP) --xml=. |
---|
[158] | 186 | |
---|
[326] | 187 | hard_config.h: $(ARCH)/genmap.py $(APP)/$(APP).py |
---|
| 188 | giet_python/tsarmap --arch=$(ARCH) --x=$(X) --y=$(Y) --p=$(P) --giet=. --$(APP) --xml=. |
---|
| 189 | |
---|
| 190 | giet_vsegs.ld: $(ARCH)/genmap.py $(APP)/$(APP).py |
---|
| 191 | giet_python/tsarmap --arch=$(ARCH) --x=$(X) --y=$(Y) --p=$(P) --giet=. --$(APP) --xml=. |
---|
| 192 | |
---|
[258] | 193 | ### drivers compilation |
---|
[295] | 194 | build/drivers/cma_driver.o: giet_drivers/cma_driver.c \ |
---|
| 195 | giet_drivers/cma_driver.h \ |
---|
[326] | 196 | hard_config.h \ |
---|
| 197 | giet_config.h |
---|
[295] | 198 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 199 | |
---|
[258] | 200 | build/drivers/dma_driver.o: giet_drivers/dma_driver.c \ |
---|
| 201 | giet_drivers/dma_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/fbf_driver.o: giet_drivers/fbf_driver.c \ |
---|
| 207 | giet_drivers/fbf_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/xcu_driver.o: giet_drivers/xcu_driver.c \ |
---|
| 213 | giet_drivers/xcu_driver.h \ |
---|
[326] | 214 | hard_config.h \ |
---|
| 215 | giet_config.h |
---|
[258] | 216 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 217 | |
---|
[258] | 218 | build/drivers/icu_driver.o: giet_drivers/icu_driver.c \ |
---|
| 219 | giet_drivers/icu_driver.h \ |
---|
[326] | 220 | hard_config.h \ |
---|
| 221 | giet_config.h |
---|
[258] | 222 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 223 | |
---|
| 224 | build/drivers/ioc_driver.o: giet_drivers/ioc_driver.c \ |
---|
| 225 | giet_drivers/ioc_driver.h \ |
---|
[326] | 226 | hard_config.h \ |
---|
| 227 | giet_config.h |
---|
[258] | 228 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 229 | |
---|
[289] | 230 | build/drivers/bdv_driver.o: giet_drivers/bdv_driver.c \ |
---|
| 231 | giet_drivers/bdv_driver.h \ |
---|
[326] | 232 | hard_config.h \ |
---|
| 233 | giet_config.h |
---|
[289] | 234 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 235 | |
---|
| 236 | build/drivers/hba_driver.o: giet_drivers/hba_driver.c \ |
---|
| 237 | giet_drivers/hba_driver.h \ |
---|
[326] | 238 | hard_config.h \ |
---|
| 239 | giet_config.h |
---|
[289] | 240 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 241 | |
---|
| 242 | build/drivers/sdc_driver.o: giet_drivers/sdc_driver.c \ |
---|
| 243 | giet_drivers/sdc_driver.h \ |
---|
[326] | 244 | hard_config.h \ |
---|
| 245 | giet_config.h |
---|
[289] | 246 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 247 | |
---|
| 248 | build/drivers/spi_driver.o: giet_drivers/spi_driver.c \ |
---|
| 249 | giet_drivers/spi_driver.h \ |
---|
[326] | 250 | hard_config.h \ |
---|
| 251 | giet_config.h |
---|
[289] | 252 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 253 | |
---|
[295] | 254 | build/drivers/rdk_driver.o: giet_drivers/rdk_driver.c \ |
---|
| 255 | giet_drivers/rdk_driver.h \ |
---|
[326] | 256 | hard_config.h \ |
---|
| 257 | giet_config.h |
---|
[295] | 258 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 259 | |
---|
[258] | 260 | build/drivers/iob_driver.o: giet_drivers/iob_driver.c \ |
---|
| 261 | giet_drivers/iob_driver.h \ |
---|
[326] | 262 | hard_config.h \ |
---|
| 263 | giet_config.h |
---|
[258] | 264 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 265 | |
---|
| 266 | build/drivers/mmc_driver.o: giet_drivers/mmc_driver.c \ |
---|
| 267 | giet_drivers/mmc_driver.h \ |
---|
[326] | 268 | hard_config.h \ |
---|
| 269 | giet_config.h |
---|
[258] | 270 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 271 | |
---|
| 272 | build/drivers/mwr_driver.o: giet_drivers/mwr_driver.c \ |
---|
| 273 | giet_drivers/mwr_driver.h \ |
---|
[326] | 274 | hard_config.h \ |
---|
| 275 | giet_config.h |
---|
[258] | 276 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 277 | |
---|
| 278 | build/drivers/nic_driver.o: giet_drivers/nic_driver.c \ |
---|
| 279 | giet_drivers/nic_driver.h \ |
---|
[326] | 280 | hard_config.h \ |
---|
| 281 | giet_config.h |
---|
[258] | 282 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 283 | |
---|
| 284 | build/drivers/tim_driver.o: giet_drivers/tim_driver.c \ |
---|
| 285 | giet_drivers/tim_driver.h \ |
---|
[326] | 286 | hard_config.h \ |
---|
| 287 | giet_config.h |
---|
[258] | 288 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 289 | |
---|
| 290 | build/drivers/tty_driver.o: giet_drivers/tty_driver.c \ |
---|
| 291 | giet_drivers/tty_driver.h \ |
---|
[326] | 292 | hard_config.h \ |
---|
| 293 | giet_config.h |
---|
[258] | 294 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 295 | |
---|
[295] | 296 | build/drivers/pic_driver.o: giet_drivers/pic_driver.c \ |
---|
| 297 | giet_drivers/pic_driver.h \ |
---|
[326] | 298 | hard_config.h \ |
---|
| 299 | giet_config.h |
---|
[295] | 300 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 301 | |
---|
[258] | 302 | ### fat32 compilation |
---|
| 303 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
| 304 | giet_fat32/fat32.h \ |
---|
[326] | 305 | hard_config.h \ |
---|
| 306 | giet_config.h |
---|
[258] | 307 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 308 | |
---|
| 309 | ### utils compilation |
---|
| 310 | build/common/utils.o: giet_common/utils.c \ |
---|
| 311 | giet_common/utils.h \ |
---|
[326] | 312 | hard_config.h \ |
---|
| 313 | giet_config.h |
---|
[258] | 314 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 315 | |
---|
| 316 | ### vmem compilation |
---|
| 317 | build/common/vmem.o: giet_common/vmem.c \ |
---|
| 318 | giet_common/vmem.h \ |
---|
[326] | 319 | hard_config.h \ |
---|
| 320 | giet_config.h |
---|
[258] | 321 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 322 | |
---|
[177] | 323 | ### boot compilation |
---|
[326] | 324 | build/boot/boot.elf: $(BOOT_OBJS) \ |
---|
| 325 | giet_boot/boot.ld |
---|
[258] | 326 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) |
---|
[189] | 327 | $(DU) -D $@ > $@.txt |
---|
[158] | 328 | |
---|
[258] | 329 | build/boot/boot.o: giet_boot/boot.c \ |
---|
| 330 | giet_common/utils.h \ |
---|
| 331 | giet_fat32/fat32.h \ |
---|
[289] | 332 | giet_common/vmem.h \ |
---|
[258] | 333 | giet_drivers/tty_driver.h \ |
---|
| 334 | giet_drivers/ioc_driver.h \ |
---|
[326] | 335 | hard_config.h \ |
---|
| 336 | giet_config.h |
---|
[258] | 337 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 338 | |
---|
[258] | 339 | ### kernel compilation |
---|
[326] | 340 | build/kernel/kernel.elf: $(KERNEL_OBJS) \ |
---|
| 341 | giet_kernel/kernel.ld |
---|
[258] | 342 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) |
---|
| 343 | $(DU) -D $@ > $@.txt |
---|
[158] | 344 | |
---|
[326] | 345 | build/kernel/%.o: giet_kernel/%.c \ |
---|
| 346 | hard_config.h \ |
---|
| 347 | giet_config.h |
---|
[258] | 348 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 349 | |
---|
[326] | 350 | build/kernel/%.o: giet_kernel/%.s \ |
---|
| 351 | hard_config.h \ |
---|
| 352 | giet_config.h |
---|
[258] | 353 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 354 | |
---|
| 355 | |
---|
| 356 | |
---|
| 357 | |
---|
| 358 | ### libs compilation |
---|
| 359 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
| 360 | giet_libs/stdio.h \ |
---|
[326] | 361 | hard_config.h \ |
---|
[258] | 362 | giet_config.h |
---|
| 363 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 364 | |
---|
| 365 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
| 366 | giet_libs/mwmr_channel.h \ |
---|
[326] | 367 | hard_config.h \ |
---|
[258] | 368 | giet_config.h |
---|
| 369 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 370 | |
---|
| 371 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
| 372 | giet_libs/malloc.h \ |
---|
| 373 | giet_libs/malloc_private.h \ |
---|
[326] | 374 | hard_config.h \ |
---|
[258] | 375 | giet_config.h |
---|
| 376 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 377 | |
---|
| 378 | build/libs/barrier.o: giet_libs/barrier.c \ |
---|
| 379 | giet_libs/barrier.h \ |
---|
[326] | 380 | hard_config.h \ |
---|
[258] | 381 | giet_config.h |
---|
| 382 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 383 | |
---|
[259] | 384 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
| 385 | giet_libs/stdlib.h \ |
---|
[326] | 386 | hard_config.h \ |
---|
[259] | 387 | giet_config.h |
---|
| 388 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 389 | |
---|
[258] | 390 | build/libs/string.o: giet_libs/string.c \ |
---|
| 391 | giet_libs/string.h \ |
---|
[326] | 392 | hard_config.h \ |
---|
[258] | 393 | giet_config.h |
---|
| 394 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 395 | |
---|
| 396 | build/libs/spin_lock.o: giet_libs/spin_lock.c \ |
---|
| 397 | giet_libs/spin_lock.h \ |
---|
[326] | 398 | hard_config.h \ |
---|
[258] | 399 | giet_config.h |
---|
| 400 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 401 | |
---|
| 402 | |
---|
| 403 | |
---|
| 404 | |
---|
[189] | 405 | ### display compilation |
---|
| 406 | build/display/display.elf: $(DISPLAY_OBJS) display/display.ld |
---|
| 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 |
---|
| 414 | build/router/router.elf: $(ROUTER_OBJS) router/router.ld |
---|
| 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 |
---|
| 422 | build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld |
---|
| 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 |
---|
| 430 | build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld |
---|
| 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 |
---|
| 446 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld |
---|
| 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 |
---|
[258] | 457 | build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld |
---|
[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 |
---|
| 465 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld |
---|
| 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 | |
---|
[177] | 472 | ### clean |
---|
[158] | 473 | clean: |
---|
[326] | 474 | rm -f *.o *.elf *.bin *.txt core |
---|
| 475 | rm -f hard_config.h giet_vsegs.ld map.bin map.xml |
---|
[232] | 476 | rm -rf build/boot/* |
---|
[258] | 477 | rm -rf build/fat32/* |
---|
| 478 | rm -rf build/common/* |
---|
| 479 | rm -rf build/drivers/* |
---|
| 480 | rm -rf build/kernel/* |
---|
| 481 | rm -rf build/reset/* |
---|
[232] | 482 | rm -rf build/libs/* |
---|
| 483 | rm -rf build/pgcd/* |
---|
| 484 | rm -rf build/hello/* |
---|
| 485 | rm -rf build/display/* |
---|
| 486 | rm -rf build/router/* |
---|
[251] | 487 | rm -rf build/gameoflife/* |
---|
[241] | 488 | rm -rf build/dhrystone/* |
---|
[258] | 489 | rm -rf build/sort/* |
---|
[295] | 490 | rm -rf build/transpose/* |
---|
[258] | 491 | rm -rf hdd/virt_hdd.dmg |
---|