LINKEROPT = -L/jaguar/lib -lvc
OFILES = \
startup.o \
blitter.o \
graphics.o \
setolp.o \
joystick.o \
random.o \
grid.o \
2048title.o \
start.o

jag : $(OFILES)
	vlink015 -brawbin1 -EB -M -TJagbinls $(OFILES) $(LINKEROPT) -o .\Debug\2048.bin

AS2OBJ = vasmm68k_madmac_win32 $? -Fvobj -o $@
C2OBJ = vc -DJAGUAR -O2 -c -c99 -dontwarn=51 -o $@ $?
GPU2OBJ = vasmjagrisc_madmac_win32 $? -Fvobj -mgpu -o $@

#
# GPU jaguar specific asm files
#
setolp.o : setolp.s
	$(GPU2OBJ)

#
# 68k jaguar specific asm files
#
startup.o : startup.s
	$(AS2OBJ)
blitter.o : blitter.s
	$(AS2OBJ)
2048title.o : 2048title.s
	$(AS2OBJ)

#
# 68k jaguar specific C files
#	
start.o : start.c
	$(C2OBJ)
graphics.o : graphics.c
	$(C2OBJ)
random.o : random.c
	$(C2OBJ)
joystick.o : joystick.c
	$(C2OBJ)
grid.o : grid.c
	$(C2OBJ)

clean:
    del .\*.o
    del .\Debug\*.bin /q /f
