# Very lazy makefile

# Change these to define where the game
# is installed with "make install"
PREFIX=
DATAPATH=data

help:
	@echo Type \"make linux\" or \"make windows\"

linux:
	g++ -DDATAPATH=\"$(DATAPATH)\" *.cpp -o wordz \
		       `sdl-config --cflags --libs` -lGL -lGLU

windows:
	g++ -mwindows *.cpp icon.res -o wordz.exe -lsdl -lopengl32 -lglu32
	strip wordz.exe

install:
	cp wordz $(PREFIX)/bin
	mkdir -p $(DATAPATH)
	cp data/font.bmp $(DATAPATH)
	cp data/icon.bmp $(DATAPATH)
	cp data/words $(DATAPATH)

uinstall:
	rm $(PREFIX)/bin/wordz
	rm $(DATAPATH)/font.bmp
	rm $(DATAPATH)/icon.bmp
	rm $(DATAPATH)/words
	rmdir $(DATAPATH)

clean:
	rm -f wordz wordz.exe
