nuclear@0: asrc = $(wildcard src/*.s) nuclear@0: obj = $(asrc:.s=.o) nuclear@0: nuclear@0: name = test nuclear@0: elf = $(name).elf nuclear@0: bin = $(name).bin nuclear@0: adf = $(name).adf nuclear@0: bootblock = boot.bin nuclear@0: nuclear@0: tool_prefix = m68k-linux-gnu- nuclear@0: nuclear@0: CC = $(tool_prefix)gcc nuclear@0: AS = $(tool_prefix)as nuclear@0: LD = $(tool_prefix)ld nuclear@0: OBJCOPY = $(tool_prefix)objcopy nuclear@0: nuclear@0: ASFLAGS = -m68000 nuclear@0: LDFLAGS = -T amiga.ld -print-gc-sections \ nuclear@0: -L/usr/lib/gcc-cross/m68k-linux-gnu/6 -lgcc nuclear@0: nuclear@0: $(adf): $(bin) $(bootblock) nuclear@0: tools/mk_adf.py $(bootblock) $(bin) $@ nuclear@0: nuclear@0: $(bin): $(elf) nuclear@0: $(OBJCOPY) -O binary $< $@ nuclear@0: nuclear@0: $(elf): $(obj) nuclear@0: $(LD) -o $@ $(obj) -Map link.map $(LDFLAGS) nuclear@0: nuclear@0: $(bootblock): src/boot/boot.o nuclear@0: $(OBJCOPY) -O binary $< $@ nuclear@0: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@0: rm -f $(obj) $(bin) $(elf)