all:	AmigaVGB dasm gblist contrib

clean:
	rm *.o *.lnk AmigaVGB dasm gblist listall testall

dist:
	rm *.o *.lnk
	lha -r a RAM:AmigaVGB.lha SC:AmigaVGB
	cp AmigaVGB.readme RAM:

AmigaVGB: AmigaVGB.o GB.o Z80.o Debug.o Amiga.o
	sc LINK AmigaVGB.o GB.o Z80.o Debug.o Amiga.o STRIPDEBUG TO AmigaVGB

dasm: dasm.c
	sc LINK STRIPDEBUG dasm.c

gblist:	gblist.c
	sc LINK STRIPDEBUG gblist.c

contrib: listall testall

listall: listall.c
	sc LINK STRIPDEBUG listall.c

testall: testall.c
	sc LINK STRIPDEBUG testall.c

AmigaVGB.o: AmigaVGB.c GB.h AmigaHelp.h
	sc AmigaVGB.c
GB.o: GB.c GB.h Z80.h
	sc GB.c
Z80.o: Z80.c Z80.h Tables.h Codes.h CodesCB.h
	sc Z80.c
Amiga.o: Amiga.c GB.h AmigaRawkeys.h Common.h
	sc Amiga.c
Debug.o: Debug.c GB.h Z80.h
	sc Debug.c