CFLAGS=-m68000 -w -Datari
LIBS=-lcurses -ltermcap

gamemenu.prg: gamemenu.o screen_mode.o inifile.o parse_csv.o menu.o run_game.o utils.o sound.o cache.o machine_type.o
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

gamemenu.o: gamemenu.c gamemenu.h

screen_mode.o: screen_mode.c gamemenu.h

inifile.o: inifile.c gamemenu.h

parse_csv.o: parse_csv.c gamemenu.h

menu.o: menu.c gamemenu.h

run_game.o: run_game.c gamemenu.h

utils.o: utils.c gamemenu.h

sound.o: sound.c gamemenu.h

cache.o: cache.c gamemenu.h

machine_type.o:	machine_type.c gamemenu.h

clean:
	rm gamemenu.prg *.o

testparse: parse_csv.c utils.o gamemenu.h
	$(CC) $(CFLAGS) -DTESTING -o testparse parse_csv.c utils.o
