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