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