# I, the copyright holder of this work, hereby release it into the public
# domain. This applies worldwide. In case this is not legally possible: I
# grant anyone the right to use this work for any purpose, without any
# conditions, unless such conditions are required by law.

LIBRARIES = -lnotcurses -lnotcurses-core
OBJECT_FILES = map.o display.o players.o squeals.o items.o utils.o

all: clean testmap fernandotel

clean:
	rm -f *.csv *.o fernandotel testmap

objects:
	gcc -g -o map.o -c map.c
	gcc -g -o display.o -c display.c
	gcc -g -o players.o -c players.c
	gcc -g -o items.o -c items.c
	gcc -g -o squeals.o -c squeals.c
	gcc -g -o utils.o -c utils.c

fernandotel: objects
	gcc -g -o fernandotel.o -c fernandotel.c
	gcc -g -o fernandotel $(OBJECT_FILES) fernandotel.o $(LIBRARIES)

testmap: objects
	gcc -g -o testmap.o -c testmap.c
	gcc -g -o testmap $(OBJECT_FILES) testmap.o $(LIBRARIES)
