Better handling of display format w/ surface formats
[tennix.git] / makefile
blob3a484a37deef2e56ab15d79ac1a134d132c2dd7d
1 CC = gcc
2 RELEASE = svn
4 LIBS = $$(sdl-config --libs) -lSDL_mixer -lSDL_image
5 CFLAGS = -Wall $$(sdl-config --cflags)
7 SRC = tennix.c game.c graphics.c input.c sound.c
8 OBJ = tennix.o game.o graphics.o input.o sound.o
10 WIN32LIBS = *.dll
11 DATAFILES = data/*.bmp data/*.png data/*.wav
13 tennix: $(OBJ)
14 $(CC) $(CFLAGS) -o tennix $(OBJ) $(LIBS)
15 test -x `which upx` && test -f tennix.exe && `which upx` tennix.exe || true
17 tennix.o: tennix.c tennix.h game.h graphics.h input.h sound.h
18 graphics.o: graphics.c graphics.h tennix.h input.h
19 game.o: game.c game.h graphics.h tennix.h sound.h
20 sound.o: sound.c sound.h tennix.h
22 release-win32: tennix
23 zip tennix-$(RELEASE).zip tennix.exe $(WIN32LIBS) $(DATAFILES)
25 release-bin: tennix
26 tar czvf tennix-$(RELEASE)-bin.tar.gz tennix $(DATAFILES)
28 clean:
29 rm -f *.o tennix{,.exe}
31 distclean: clean
32 rm -f tennix-$(RELEASE).zip tennix-$(RELEASE)-bin.tar.gz
34 .PHONY: distclean clean release-bin release-win32