Commit | Line | Data |
---|---|---|
ad9f1fb6 | 1 | |
ad9f1fb6 PG |
2 | LIBGL = -lGL -lGLU |
3 | LIBSDL = `sdl-config --libs` | |
4 | LIBS = ${LIBSDL} ${LIBGL} | |
5 | ||
6 | CXX = g++ | |
7 | CXXFLAGS = -ggdb -Wall -pedantic | |
8 | ||
046b034c PG |
9 | SRCS := entityManager.cpp |
10 | SRCS += game.cpp | |
11 | SRCS += graphics.cpp | |
12 | SRCS += main.cpp | |
13 | SRCS += mathw.cpp | |
14 | SRCS += ticks.cpp | |
15 | SRCS += Vector2.cpp | |
16 | ||
17 | SRCS += Entities/Ball.cpp | |
18 | SRCS += Entities/Entity.cpp | |
19 | SRCS += Entities/Line.cpp | |
20 | SRCS += Entities/Particle.cpp | |
21 | SRCS += Entities/PhysicsEntity.cpp | |
22 | SRCS += Entities/Point.cpp | |
23 | SRCS += Entities/Polygon.cpp | |
24 | SRCS += Entities/WindParticle.cpp | |
25 | ||
26 | SRCS += GameStates/CreatingPolygon.cpp | |
27 | SRCS += GameStates/GameState.cpp | |
28 | SRCS += GameStates/Paused.cpp | |
29 | SRCS += GameStates/Running.cpp | |
30 | ||
ad9f1fb6 PG |
31 | OBJS = ${SRCS:.cpp=.o} |
32 | ||
046b034c | 33 | TARGET = ../run_physics |
ad9f1fb6 PG |
34 | DEPEND = depend.mk |
35 | ||
ad9f1fb6 | 36 | |
046b034c PG |
37 | .PHONY: all |
38 | all: ${TARGET} | |
ad9f1fb6 | 39 | |
046b034c PG |
40 | ${TARGET}: ${OBJS} |
41 | ${CXX} ${CXXFLAGS} -o ${TARGET} $^ ${LIBS} | |
ad9f1fb6 | 42 | |
046b034c PG |
43 | .PHONY: depend |
44 | depend: ${SRCS} | |
45 | ${CXX} -MM $^ > ${DEPEND} | |
ad9f1fb6 | 46 | |
ad9f1fb6 | 47 | |
046b034c | 48 | .PHONY: clean |
ad9f1fb6 | 49 | clean: |
046b034c | 50 | rm -f ${OBJS} ${TARGET} *~ |
ad9f1fb6 | 51 | |
046b034c | 52 | .PHONY: distclean |
ad9f1fb6 PG |
53 | distclean: clean |
54 | rm -f tags depend.mk | |
55 | touch depend.mk | |
56 | ||
046b034c PG |
57 | tags: ${SRCS} |
58 | ctags $^ | |
59 | ||
ad9f1fb6 PG |
60 | tar: clean |
61 | cd ..; tar -cjf bluestar.tar.bz2 images/ source/ | |
62 | ||
63 | ||
046b034c PG |
64 | .PHONY: run |
65 | run: all | |
27b74820 | 66 | ${TARGET} |
ad9f1fb6 PG |
67 | |
68 | include ${DEPEND} | |
69 |