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