megadrive_test1

annotate Makefile @ 4:e7138066c7ea

started the vdp.h header, and hastily rewrote the VDP test as C code
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 01 Feb 2017 13:40:50 +0200
parents 9e7f64c4fe7a
children 862f8a034cae
rev   line source
nuclear@4 1 csrc = $(wildcard src/*.c)
nuclear@0 2 asrc = $(wildcard src/*.s)
nuclear@0 3 aSsrc = $(wildcard src/*.S)
nuclear@4 4 obj = $(asrc:.s=.o) $(aSsrc:.S=.o) $(csrc:.c=.o)
nuclear@0 5
nuclear@0 6 name = test1
nuclear@0 7 elf = $(name).elf
nuclear@0 8 bin = $(name).bin
nuclear@0 9
nuclear@0 10 warn = -pedantic -Wall
nuclear@0 11 dbg = -g
nuclear@0 12 def = -DGAMENAME=\"testgame\" -DVERSTR=\"01\"
nuclear@0 13
nuclear@0 14 tool_prefix = m68k-linux-gnu-
nuclear@0 15
nuclear@0 16 CC = $(tool_prefix)gcc
nuclear@0 17 AS = $(tool_prefix)as
nuclear@0 18 LD = $(tool_prefix)ld
nuclear@0 19 OBJCOPY = $(tool_prefix)objcopy
nuclear@0 20
nuclear@4 21 CFLAGS = -m68000 -fno-builtin $(warn) $(dbg) $(opt) $(def)
nuclear@1 22 CPPFLAGS = $(def)
nuclear@0 23 ASFLAGS = -m68000
nuclear@0 24 LDFLAGS = -T megadrive.ldscript -print-gc-sections
nuclear@0 25
nuclear@0 26 $(bin): $(elf)
nuclear@0 27 $(OBJCOPY) -O binary $< $@
nuclear@0 28
nuclear@0 29 $(elf): $(obj)
nuclear@0 30 $(LD) -o $@ $(LDFLAGS) $(obj) -Map link.map
nuclear@0 31
nuclear@0 32 .PHONY: clean
nuclear@0 33 clean:
nuclear@0 34 rm -f $(obj) $(elf) $(bin)
nuclear@1 35
nuclear@1 36 .PHONY: run
nuclear@1 37 run: $(bin)
nuclear@1 38 gens-sdl $<