input system setup, debug header started
[physics.git] / src / Makefile
1
2 LIBGL = -lGL -lGLU
3 LIBSDL = `sdl-config --libs`
4 LIBS = ${LIBSDL} ${LIBGL}
5
6 CXX = g++
7 CXXFLAGS = -ggdb -Wall -pedantic
8
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
31 SRCS += input/inputManager.cpp
32
33 OBJS = ${SRCS:.cpp=.o}
34
35 TARGET = ../run_physics
36 DEPEND = depend.mk
37
38
39 .PHONY: all
40 all: ${TARGET}
41
42 ${TARGET}: ${OBJS}
43         ${CXX} ${CXXFLAGS} -o ${TARGET} $^ ${LIBS}
44
45 .PHONY: depend
46 depend: ${SRCS}
47         ${CXX} -MM $^ > ${DEPEND}
48
49
50 .PHONY: clean
51 clean:
52         rm -f ${OBJS} ${TARGET} *~
53
54 .PHONY: distclean
55 distclean: clean
56         rm -f tags depend.mk
57         touch depend.mk
58
59 tags: ${SRCS}
60         ctags $^
61
62 tar: clean
63         cd ..; tar -cjf bluestar.tar.bz2 images/ source/
64
65
66 .PHONY: run
67 run: all
68         ${TARGET}
69
70 include ${DEPEND}
71