amiga_boottest
diff Makefile @ 0:51422ea54b9d
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 21 Feb 2018 12:00:13 +0200 |
parents | |
children | 48093e4bd99a |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Wed Feb 21 12:00:13 2018 +0200 1.3 @@ -0,0 +1,35 @@ 1.4 +asrc = $(wildcard src/*.s) 1.5 +obj = $(asrc:.s=.o) 1.6 + 1.7 +name = test 1.8 +elf = $(name).elf 1.9 +bin = $(name).bin 1.10 +adf = $(name).adf 1.11 +bootblock = boot.bin 1.12 + 1.13 +tool_prefix = m68k-linux-gnu- 1.14 + 1.15 +CC = $(tool_prefix)gcc 1.16 +AS = $(tool_prefix)as 1.17 +LD = $(tool_prefix)ld 1.18 +OBJCOPY = $(tool_prefix)objcopy 1.19 + 1.20 +ASFLAGS = -m68000 1.21 +LDFLAGS = -T amiga.ld -print-gc-sections \ 1.22 + -L/usr/lib/gcc-cross/m68k-linux-gnu/6 -lgcc 1.23 + 1.24 +$(adf): $(bin) $(bootblock) 1.25 + tools/mk_adf.py $(bootblock) $(bin) $@ 1.26 + 1.27 +$(bin): $(elf) 1.28 + $(OBJCOPY) -O binary $< $@ 1.29 + 1.30 +$(elf): $(obj) 1.31 + $(LD) -o $@ $(obj) -Map link.map $(LDFLAGS) 1.32 + 1.33 +$(bootblock): src/boot/boot.o 1.34 + $(OBJCOPY) -O binary $< $@ 1.35 + 1.36 +.PHONY: clean 1.37 +clean: 1.38 + rm -f $(obj) $(bin) $(elf)