[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 | |
---|
[258] | 9 | ### FAT parameters definition for Disk image |
---|
| 10 | ### sector_size = 512 |
---|
| 11 | ### partition_begin_lba = 300 |
---|
| 12 | ### sector_per_cluster = 8 |
---|
| 13 | ### partition sectors = 524832 |
---|
[204] | 14 | |
---|
[302] | 15 | MAP_XML ?= mappings/4c_1p_sort_leti.xml |
---|
[162] | 16 | |
---|
[258] | 17 | ### Objects to be linked for kernel.elf |
---|
[289] | 18 | KERNEL_OBJS = build/common/utils.o \ |
---|
| 19 | build/common/vmem.o \ |
---|
[258] | 20 | build/fat32/fat32.o \ |
---|
| 21 | build/drivers/dma_driver.o \ |
---|
[295] | 22 | build/drivers/cma_driver.o \ |
---|
[258] | 23 | build/drivers/fbf_driver.o \ |
---|
| 24 | build/drivers/xcu_driver.o \ |
---|
| 25 | build/drivers/icu_driver.o \ |
---|
| 26 | build/drivers/ioc_driver.o \ |
---|
[289] | 27 | build/drivers/bdv_driver.o \ |
---|
| 28 | build/drivers/hba_driver.o \ |
---|
| 29 | build/drivers/sdc_driver.o \ |
---|
| 30 | build/drivers/spi_driver.o \ |
---|
[295] | 31 | build/drivers/rdk_driver.o \ |
---|
[258] | 32 | build/drivers/iob_driver.o \ |
---|
| 33 | build/drivers/mmc_driver.o \ |
---|
| 34 | build/drivers/mwr_driver.o \ |
---|
| 35 | build/drivers/nic_driver.o \ |
---|
| 36 | build/drivers/tim_driver.o \ |
---|
| 37 | build/drivers/tty_driver.o \ |
---|
[295] | 38 | build/drivers/pic_driver.o \ |
---|
[258] | 39 | build/kernel/giet.o \ |
---|
| 40 | build/kernel/switch.o \ |
---|
| 41 | build/kernel/ctx_handler.o \ |
---|
| 42 | build/kernel/exc_handler.o \ |
---|
| 43 | build/kernel/sys_handler.o \ |
---|
| 44 | build/kernel/irq_handler.o \ |
---|
| 45 | build/kernel/kernel_init.o |
---|
[162] | 46 | |
---|
[258] | 47 | ### Objects to be linked for boot.elf |
---|
[289] | 48 | BOOT_OBJS = build/common/utils.o \ |
---|
| 49 | build/common/vmem.o \ |
---|
[258] | 50 | build/fat32/fat32.o \ |
---|
[295] | 51 | build/drivers/dma_driver.o \ |
---|
[258] | 52 | build/drivers/tty_driver.o \ |
---|
[295] | 53 | build/drivers/pic_driver.o \ |
---|
[258] | 54 | build/drivers/xcu_driver.o \ |
---|
| 55 | build/drivers/ioc_driver.o \ |
---|
[299] | 56 | build/drivers/iob_driver.o \ |
---|
[289] | 57 | build/drivers/bdv_driver.o \ |
---|
| 58 | build/drivers/sdc_driver.o \ |
---|
| 59 | build/drivers/spi_driver.o \ |
---|
[295] | 60 | build/drivers/rdk_driver.o \ |
---|
[258] | 61 | build/drivers/mmc_driver.o \ |
---|
[295] | 62 | build/drivers/mwr_driver.o \ |
---|
[258] | 63 | build/kernel/ctx_handler.o \ |
---|
| 64 | build/kernel/switch.o \ |
---|
| 65 | build/boot/boot.o |
---|
| 66 | |
---|
| 67 | ### Objects to be linked for display.elf |
---|
[189] | 68 | DISPLAY_OBJS = build/display/main.o \ |
---|
[258] | 69 | build/libs/stdio.o |
---|
[162] | 70 | |
---|
[258] | 71 | ### Objects to be linked for router.elf |
---|
| 72 | ROUTER_OBJS = build/router/main.o \ |
---|
| 73 | build/libs/mwmr_channel.o \ |
---|
| 74 | build/libs/stdio.o |
---|
[162] | 75 | |
---|
[258] | 76 | ### Objects to be linked for hello.elf |
---|
| 77 | HELLO_OBJS = build/hello/main.o \ |
---|
| 78 | build/libs/stdio.o |
---|
[158] | 79 | |
---|
[258] | 80 | ### Objects to be linked for pgcd.elf |
---|
| 81 | PGCD_OBJS = build/pgcd/main.o \ |
---|
| 82 | build/libs/stdio.o |
---|
[158] | 83 | |
---|
[258] | 84 | ### Objects to be linked for game.elf |
---|
| 85 | GAMEOFLIFE_OBJS = build/gameoflife/main.o \ |
---|
| 86 | build/libs/stdio.o \ |
---|
| 87 | build/libs/barrier.o |
---|
[251] | 88 | |
---|
[258] | 89 | ### Objects to be linked for dhrystone.elf |
---|
[241] | 90 | DHRYSTONE_OBJS = build/dhrystone/dhry_1.o \ |
---|
| 91 | build/dhrystone/dhry_2.o \ |
---|
[272] | 92 | build/libs/stdlib.o \ |
---|
[258] | 93 | build/libs/stdio.o \ |
---|
| 94 | build/libs/string.o \ |
---|
| 95 | build/libs/spin_lock.o \ |
---|
[241] | 96 | build/libs/malloc.o |
---|
| 97 | |
---|
[258] | 98 | ### Objects to be linked for sort.elf |
---|
| 99 | SORT_OBJS = build/sort/main.o \ |
---|
| 100 | build/libs/stdio.o \ |
---|
| 101 | build/libs/spin_lock.o \ |
---|
| 102 | build/libs/barrier.o |
---|
[241] | 103 | |
---|
[295] | 104 | ### Objects to be linked for transpose.elf |
---|
| 105 | TRANSPOSE_OBJS = build/transpose/main.o \ |
---|
| 106 | build/libs/stdio.o \ |
---|
| 107 | build/libs/malloc.o \ |
---|
| 108 | build/libs/spin_lock.o \ |
---|
| 109 | build/libs/barrier.o |
---|
[258] | 110 | |
---|
[272] | 111 | CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 |
---|
[158] | 112 | |
---|
[289] | 113 | |
---|
[258] | 114 | GIET_INCLUDE = -Igiet_boot \ |
---|
| 115 | -Igiet_kernel \ |
---|
| 116 | -Igiet_xml \ |
---|
| 117 | -Igiet_fat32 \ |
---|
| 118 | -Igiet_drivers \ |
---|
| 119 | -Igiet_common \ |
---|
| 120 | -Igiet_libs \ |
---|
| 121 | -I. |
---|
[158] | 122 | |
---|
[258] | 123 | USER_INCLUDE = -Igiet_libs \ |
---|
| 124 | -Igiet_xml \ |
---|
| 125 | -I. |
---|
[160] | 126 | |
---|
[302] | 127 | DISK_IMAGE := hdd/virt_hdd.dmg |
---|
| 128 | |
---|
| 129 | ### Copy executable and miscellaneous files into disk image |
---|
| 130 | ### Copy bootloader into sector 2 of disk image |
---|
| 131 | all: $(DISK_IMAGE) \ |
---|
| 132 | $(MAP_XML) \ |
---|
| 133 | giet_config.h \ |
---|
| 134 | map.bin \ |
---|
[258] | 135 | build/boot/boot.elf \ |
---|
| 136 | build/kernel/kernel.elf \ |
---|
| 137 | build/display/display.elf \ |
---|
| 138 | build/hello/hello.elf \ |
---|
| 139 | build/pgcd/pgcd.elf \ |
---|
[302] | 140 | build/router/router.elf \ |
---|
[258] | 141 | build/dhrystone/dhrystone.elf \ |
---|
| 142 | build/gameoflife/gameoflife.elf \ |
---|
| 143 | build/sort/sort.elf \ |
---|
[295] | 144 | build/transpose/transpose.elf \ |
---|
[302] | 145 | |
---|
| 146 | mcopy -so -i $(DISK_IMAGE) build ::/ |
---|
| 147 | mcopy -so -i $(DISK_IMAGE) hdd/misc ::/ |
---|
| 148 | mcopy -so -i $(DISK_IMAGE) map.bin ::/ |
---|
| 149 | dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc |
---|
[160] | 150 | |
---|
[258] | 151 | ### Disk image generation |
---|
[272] | 152 | ### This requires the generic LINUX/MacOS script "create_dmg" script |
---|
[258] | 153 | ### written by C.Fuguet. (should be installed in GIET-VM root directory). |
---|
[302] | 154 | $(DISK_IMAGE): |
---|
| 155 | ./create_dmg create $(basename $(DISK_IMAGE)) |
---|
[295] | 156 | |
---|
[177] | 157 | ### mapping compilation |
---|
[204] | 158 | map.bin: $(MAP_XML) |
---|
[258] | 159 | $(MAKE) -C giet_xml |
---|
| 160 | giet_xml/xml2bin $< . |
---|
[158] | 161 | |
---|
[258] | 162 | ### drivers compilation |
---|
[295] | 163 | build/drivers/cma_driver.o: giet_drivers/cma_driver.c \ |
---|
| 164 | giet_drivers/cma_driver.h \ |
---|
| 165 | giet_config.h \ |
---|
| 166 | $(MAP_XML) |
---|
| 167 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 168 | |
---|
[258] | 169 | build/drivers/dma_driver.o: giet_drivers/dma_driver.c \ |
---|
| 170 | giet_drivers/dma_driver.h \ |
---|
| 171 | giet_config.h \ |
---|
| 172 | $(MAP_XML) |
---|
| 173 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 174 | |
---|
[258] | 175 | build/drivers/fbf_driver.o: giet_drivers/fbf_driver.c \ |
---|
| 176 | giet_drivers/fbf_driver.h \ |
---|
| 177 | giet_config.h \ |
---|
| 178 | $(MAP_XML) |
---|
| 179 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 180 | |
---|
[258] | 181 | build/drivers/xcu_driver.o: giet_drivers/xcu_driver.c \ |
---|
| 182 | giet_drivers/xcu_driver.h \ |
---|
| 183 | giet_config.h \ |
---|
| 184 | $(MAP_XML) |
---|
| 185 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 186 | |
---|
[258] | 187 | build/drivers/icu_driver.o: giet_drivers/icu_driver.c \ |
---|
| 188 | giet_drivers/icu_driver.h \ |
---|
| 189 | giet_config.h \ |
---|
| 190 | $(MAP_XML) |
---|
| 191 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 192 | |
---|
| 193 | build/drivers/ioc_driver.o: giet_drivers/ioc_driver.c \ |
---|
| 194 | giet_drivers/ioc_driver.h \ |
---|
| 195 | giet_config.h \ |
---|
| 196 | $(MAP_XML) |
---|
| 197 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 198 | |
---|
[289] | 199 | build/drivers/bdv_driver.o: giet_drivers/bdv_driver.c \ |
---|
| 200 | giet_drivers/bdv_driver.h \ |
---|
| 201 | giet_config.h \ |
---|
| 202 | $(MAP_XML) |
---|
| 203 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 204 | |
---|
| 205 | build/drivers/hba_driver.o: giet_drivers/hba_driver.c \ |
---|
| 206 | giet_drivers/hba_driver.h \ |
---|
| 207 | giet_config.h \ |
---|
| 208 | $(MAP_XML) |
---|
| 209 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 210 | |
---|
| 211 | build/drivers/sdc_driver.o: giet_drivers/sdc_driver.c \ |
---|
| 212 | giet_drivers/sdc_driver.h \ |
---|
| 213 | giet_config.h \ |
---|
| 214 | $(MAP_XML) |
---|
| 215 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 216 | |
---|
| 217 | build/drivers/spi_driver.o: giet_drivers/spi_driver.c \ |
---|
| 218 | giet_drivers/spi_driver.h \ |
---|
| 219 | giet_config.h \ |
---|
| 220 | $(MAP_XML) |
---|
| 221 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 222 | |
---|
[295] | 223 | build/drivers/rdk_driver.o: giet_drivers/rdk_driver.c \ |
---|
| 224 | giet_drivers/rdk_driver.h \ |
---|
| 225 | giet_config.h \ |
---|
| 226 | $(MAP_XML) |
---|
| 227 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 228 | |
---|
[258] | 229 | build/drivers/iob_driver.o: giet_drivers/iob_driver.c \ |
---|
| 230 | giet_drivers/iob_driver.h \ |
---|
| 231 | giet_config.h \ |
---|
| 232 | $(MAP_XML) |
---|
| 233 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 234 | |
---|
| 235 | build/drivers/mmc_driver.o: giet_drivers/mmc_driver.c \ |
---|
| 236 | giet_drivers/mmc_driver.h \ |
---|
| 237 | giet_config.h \ |
---|
| 238 | $(MAP_XML) |
---|
| 239 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 240 | |
---|
| 241 | build/drivers/mwr_driver.o: giet_drivers/mwr_driver.c \ |
---|
| 242 | giet_drivers/mwr_driver.h \ |
---|
| 243 | giet_config.h \ |
---|
| 244 | $(MAP_XML) |
---|
| 245 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 246 | |
---|
| 247 | build/drivers/nic_driver.o: giet_drivers/nic_driver.c \ |
---|
| 248 | giet_drivers/nic_driver.h \ |
---|
| 249 | giet_config.h \ |
---|
| 250 | $(MAP_XML) |
---|
| 251 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 252 | |
---|
| 253 | build/drivers/tim_driver.o: giet_drivers/tim_driver.c \ |
---|
| 254 | giet_drivers/tim_driver.h \ |
---|
| 255 | giet_config.h \ |
---|
| 256 | $(MAP_XML) |
---|
| 257 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 258 | |
---|
| 259 | build/drivers/tty_driver.o: giet_drivers/tty_driver.c \ |
---|
| 260 | giet_drivers/tty_driver.h \ |
---|
| 261 | giet_config.h \ |
---|
| 262 | $(MAP_XML) |
---|
| 263 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 264 | |
---|
[295] | 265 | build/drivers/pic_driver.o: giet_drivers/pic_driver.c \ |
---|
| 266 | giet_drivers/pic_driver.h \ |
---|
| 267 | giet_config.h \ |
---|
| 268 | $(MAP_XML) |
---|
| 269 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 270 | |
---|
[258] | 271 | ### fat32 compilation |
---|
| 272 | build/fat32/fat32.o: giet_fat32/fat32.c \ |
---|
| 273 | giet_fat32/fat32.h \ |
---|
| 274 | giet_config.h \ |
---|
| 275 | $(MAP_XML) |
---|
| 276 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 277 | |
---|
| 278 | ### utils compilation |
---|
| 279 | build/common/utils.o: giet_common/utils.c \ |
---|
| 280 | giet_common/utils.h \ |
---|
| 281 | giet_config.h \ |
---|
| 282 | $(MAP_XML) |
---|
| 283 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 284 | |
---|
| 285 | ### vmem compilation |
---|
| 286 | build/common/vmem.o: giet_common/vmem.c \ |
---|
| 287 | giet_common/vmem.h \ |
---|
| 288 | giet_config.h \ |
---|
| 289 | $(MAP_XML) |
---|
| 290 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 291 | |
---|
[177] | 292 | ### boot compilation |
---|
[258] | 293 | build/boot/boot.elf: $(BOOT_OBJS) |
---|
| 294 | $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) |
---|
[189] | 295 | $(DU) -D $@ > $@.txt |
---|
[158] | 296 | |
---|
[258] | 297 | build/boot/boot.o: giet_boot/boot.c \ |
---|
| 298 | giet_common/utils.h \ |
---|
| 299 | giet_fat32/fat32.h \ |
---|
[289] | 300 | giet_common/vmem.h \ |
---|
[258] | 301 | giet_drivers/tty_driver.h \ |
---|
| 302 | giet_drivers/ioc_driver.h \ |
---|
| 303 | giet_config.h \ |
---|
| 304 | $(MAP_XML) |
---|
| 305 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[158] | 306 | |
---|
[258] | 307 | ### kernel compilation |
---|
| 308 | build/kernel/kernel.elf: $(KERNEL_OBJS) giet_kernel/kernel.ld |
---|
| 309 | $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) |
---|
| 310 | $(DU) -D $@ > $@.txt |
---|
[158] | 311 | |
---|
[258] | 312 | build/kernel/%.o: giet_kernel/%.c giet_config.h $(MAP_XML) |
---|
| 313 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 314 | |
---|
| 315 | build/kernel/%.o: giet_kernel/%.s giet_config.h $(MAP_XML) |
---|
| 316 | $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 317 | |
---|
| 318 | |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | ### libs compilation |
---|
| 322 | build/libs/stdio.o: giet_libs/stdio.c \ |
---|
| 323 | giet_libs/stdio.h \ |
---|
| 324 | giet_config.h |
---|
| 325 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 326 | |
---|
| 327 | build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ |
---|
| 328 | giet_libs/mwmr_channel.h \ |
---|
| 329 | giet_config.h |
---|
| 330 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 331 | |
---|
| 332 | build/libs/malloc.o: giet_libs/malloc.c \ |
---|
| 333 | giet_libs/malloc.h \ |
---|
| 334 | giet_libs/malloc_private.h \ |
---|
| 335 | giet_config.h |
---|
| 336 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 337 | |
---|
| 338 | build/libs/barrier.o: giet_libs/barrier.c \ |
---|
| 339 | giet_libs/barrier.h \ |
---|
| 340 | giet_config.h |
---|
| 341 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 342 | |
---|
[259] | 343 | build/libs/stdlib.o: giet_libs/stdlib.c \ |
---|
| 344 | giet_libs/stdlib.h \ |
---|
| 345 | giet_config.h |
---|
| 346 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 347 | |
---|
[258] | 348 | build/libs/string.o: giet_libs/string.c \ |
---|
| 349 | giet_libs/string.h \ |
---|
| 350 | giet_config.h |
---|
| 351 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 352 | |
---|
| 353 | build/libs/spin_lock.o: giet_libs/spin_lock.c \ |
---|
| 354 | giet_libs/spin_lock.h \ |
---|
| 355 | giet_config.h |
---|
| 356 | $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< |
---|
| 357 | |
---|
| 358 | |
---|
| 359 | |
---|
| 360 | |
---|
[189] | 361 | ### display compilation |
---|
| 362 | build/display/display.elf: $(DISPLAY_OBJS) display/display.ld |
---|
| 363 | $(LD) -o $@ -T display/display.ld $(DISPLAY_OBJS) |
---|
| 364 | $(DU) -D $@ > $@.txt |
---|
[158] | 365 | |
---|
[258] | 366 | build/display/main.o: display/main_cma.c |
---|
| 367 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 368 | |
---|
| 369 | ### router compilation |
---|
| 370 | build/router/router.elf: $(ROUTER_OBJS) router/router.ld |
---|
| 371 | $(LD) -o $@ -T router/router.ld $(ROUTER_OBJS) |
---|
| 372 | $(DU) -D $@ > $@.txt |
---|
| 373 | |
---|
| 374 | build/router/main.o: router/main.c |
---|
[258] | 375 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 376 | |
---|
| 377 | ### hello compilation |
---|
| 378 | build/hello/hello.elf: $(HELLO_OBJS) hello/hello.ld |
---|
| 379 | $(LD) -o $@ -T hello/hello.ld $(HELLO_OBJS) |
---|
| 380 | $(DU) -D $@ > $@.txt |
---|
| 381 | |
---|
| 382 | build/hello/main.o: hello/main.c |
---|
[258] | 383 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 384 | |
---|
| 385 | ### pgcd compilation |
---|
| 386 | build/pgcd/pgcd.elf: $(PGCD_OBJS) pgcd/pgcd.ld |
---|
| 387 | $(LD) -o $@ -T pgcd/pgcd.ld $(PGCD_OBJS) |
---|
| 388 | $(DU) -D $@ > $@.txt |
---|
| 389 | |
---|
| 390 | build/pgcd/main.o: pgcd/main.c |
---|
[258] | 391 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[189] | 392 | |
---|
[251] | 393 | ### gameoflife compilation |
---|
| 394 | build/gameoflife/gameoflife.elf: $(GAMEOFLIFE_OBJS) gameoflife/gameoflife.ld |
---|
| 395 | $(LD) -o $@ -T gameoflife/gameoflife.ld $(GAMEOFLIFE_OBJS) |
---|
| 396 | $(DU) -D $@ > $@.txt |
---|
| 397 | |
---|
| 398 | build/gameoflife/main.o: gameoflife/main.c |
---|
[258] | 399 | $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< |
---|
[251] | 400 | |
---|
[241] | 401 | ### dhrystone compilation |
---|
| 402 | build/dhrystone/dhrystone.elf: $(DHRYSTONE_OBJS) dhrystone/dhrystone.ld |
---|
| 403 | $(LD) -o $@ -T dhrystone/dhrystone.ld $(DHRYSTONE_OBJS) |
---|
| 404 | $(DU) -D $@ > $@.txt |
---|
| 405 | |
---|
| 406 | build/dhrystone/dhry_1.o: dhrystone/dhry_1.c |
---|
[258] | 407 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 408 | |
---|
| 409 | build/dhrystone/dhry_2.o: dhrystone/dhry_2.c |
---|
[258] | 410 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[241] | 411 | |
---|
[256] | 412 | ### sort compilation |
---|
[258] | 413 | build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld |
---|
[256] | 414 | $(LD) -o $@ -T sort/sort.ld $(SORT_OBJS) |
---|
| 415 | $(DU) -D $@ > $@.txt |
---|
| 416 | |
---|
| 417 | build/sort/main.o: sort/main.c |
---|
[258] | 418 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
[256] | 419 | |
---|
[295] | 420 | ### transpose compilation |
---|
| 421 | build/transpose/transpose.elf: $(TRANSPOSE_OBJS) transpose/transpose.ld |
---|
| 422 | $(LD) -o $@ -T transpose/transpose.ld $(TRANSPOSE_OBJS) |
---|
| 423 | $(DU) -D $@ > $@.txt |
---|
| 424 | |
---|
| 425 | build/transpose/main.o: transpose/main.c |
---|
| 426 | $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< |
---|
| 427 | |
---|
[177] | 428 | ### clean |
---|
[158] | 429 | clean: |
---|
[252] | 430 | rm -f *.o *.elf *.bin *.txt core giet_vsegs.ld hard_config.h map.bin*~ |
---|
[258] | 431 | $(MAKE) -s clean -C giet_xml |
---|
[232] | 432 | rm -rf build/boot/* |
---|
[258] | 433 | rm -rf build/fat32/* |
---|
| 434 | rm -rf build/common/* |
---|
| 435 | rm -rf build/drivers/* |
---|
| 436 | rm -rf build/kernel/* |
---|
| 437 | rm -rf build/reset/* |
---|
[232] | 438 | rm -rf build/libs/* |
---|
| 439 | rm -rf build/pgcd/* |
---|
| 440 | rm -rf build/hello/* |
---|
| 441 | rm -rf build/display/* |
---|
| 442 | rm -rf build/router/* |
---|
[251] | 443 | rm -rf build/gameoflife/* |
---|
[241] | 444 | rm -rf build/dhrystone/* |
---|
[258] | 445 | rm -rf build/sort/* |
---|
[295] | 446 | rm -rf build/transpose/* |
---|
[258] | 447 | rm -rf build/map.bin |
---|
[302] | 448 | |
---|
| 449 | distclean: clean |
---|
[258] | 450 | rm -rf hdd/virt_hdd.dmg |
---|