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