antigravitaattori/src/Makefile
2016-07-13 11:07:42 +02:00

36 lines
663 B
Makefile

CC = g++
CFLAGS = -O2 -D_REENTRANT -I/usr/include/SDL2 -Itinyxml -DTIXML_USE_STL \
-DDATADIR="\"$(DATADIR)\""
LDFLAGS = -lpng -lalut -lopenal -lGL -lGLU -lSDL2
SOURCES = background.cpp \
craft.cpp \
font.cpp \
game.cpp \
level.cpp \
m3dmaterial.cpp \
m3dmesh.cpp \
m3dtexture.cpp \
main.cpp \
menu.cpp \
player.cpp \
ring.cpp \
terrain.cpp \
vector2.cpp
OBJECTS = $(subst .cpp,.o,$(SOURCES))
all: $(OBJECTS) tinyxml
$(CC) $(LDFLAGS) -o antigrav $(OBJECTS) tinyxml/libtinyxml.a
$(OBJECTS): %.o:
$(CC) -c $(CFLAGS) $(subst .o,.cpp,$@) -o $@
tinyxml:
$(MAKE) -C tinyxml
clean:
rm -f *.o
$(MAKE) -C tinyxml clean
.PHONY: all clean tinyxml