amiga_boottest
view Makefile @ 1:48093e4bd99a
stuff
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 21 Feb 2018 18:00:45 +0200 |
parents | 51422ea54b9d |
children | 58ebd84822e7 |
line source
1 src = $(wildcard src/*.c)
2 asrc = $(wildcard src/*.s)
3 obj = $(src:.c=.o) $(asrc:.s=.o)
5 name = test
6 elf = $(name).elf
7 bin = $(name).bin
8 adf = $(name).adf
9 bootblock = boot.bin
11 tool_prefix = m68k-linux-gnu-
13 CC = $(tool_prefix)gcc
14 AS = $(tool_prefix)as
15 LD = $(tool_prefix)ld
16 OBJCOPY = $(tool_prefix)objcopy
18 ASFLAGS = -m68000
19 CFLAGS = -m68000 -pedantic -Wall
20 LDFLAGS = -T amiga.ld -print-gc-sections \
21 -L/usr/lib/gcc-cross/m68k-linux-gnu/6 -lgcc
23 $(adf): $(bin) $(bootblock)
24 tools/mk_adf.py $(bootblock) $(bin) $@
26 $(bin): $(elf)
27 $(OBJCOPY) -O binary $< $@
29 $(elf): $(obj)
30 $(LD) -o $@ $(obj) -Map link.map $(LDFLAGS)
32 $(bootblock): src/boot/boot.o
33 $(OBJCOPY) -O binary $< $@
35 .PHONY: clean
36 clean:
37 rm -f $(obj) $(bin) $(elf)