amiga_boottest
view 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 source
1 asrc = $(wildcard src/*.s)
2 obj = $(asrc:.s=.o)
4 name = test
5 elf = $(name).elf
6 bin = $(name).bin
7 adf = $(name).adf
8 bootblock = boot.bin
10 tool_prefix = m68k-linux-gnu-
12 CC = $(tool_prefix)gcc
13 AS = $(tool_prefix)as
14 LD = $(tool_prefix)ld
15 OBJCOPY = $(tool_prefix)objcopy
17 ASFLAGS = -m68000
18 LDFLAGS = -T amiga.ld -print-gc-sections \
19 -L/usr/lib/gcc-cross/m68k-linux-gnu/6 -lgcc
21 $(adf): $(bin) $(bootblock)
22 tools/mk_adf.py $(bootblock) $(bin) $@
24 $(bin): $(elf)
25 $(OBJCOPY) -O binary $< $@
27 $(elf): $(obj)
28 $(LD) -o $@ $(obj) -Map link.map $(LDFLAGS)
30 $(bootblock): src/boot/boot.o
31 $(OBJCOPY) -O binary $< $@
33 .PHONY: clean
34 clean:
35 rm -f $(obj) $(bin) $(elf)