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