3 LIBSDL := `sdl-config --libs`
4 LIBS := ${LIBSDL} ${LIBGL}
8 PRFFLAGS := ${DBGFLAGS} -pg
11 CXXFLAGS := -Wall -pedantic -ansi ${DBGFLAGS}
14 SRCS := entityManager.cpp
15 SRCS += entityCreator.cpp
22 SRCS += Entities/Ball.cpp
23 SRCS += Entities/Entity.cpp
24 SRCS += Entities/Line.cpp
25 SRCS += Entities/Particle.cpp
26 SRCS += Entities/PhysicsEntity.cpp
27 SRCS += Entities/Point.cpp
28 SRCS += Entities/Polygon.cpp
29 SRCS += Entities/WindParticle.cpp
31 SRCS += GameStates/CreatingPolygon.cpp
32 SRCS += GameStates/GameState.cpp
33 SRCS += GameStates/Paused.cpp
34 SRCS += GameStates/Running.cpp
36 SRCS += input/inputManager.cpp
38 SRCS += graphics/graphics.cpp
40 OBJS := ${SRCS:.cpp=.o}
43 TARGET := ../run_physics
44 DEPENDS := ${SRCS:.cpp=.d}
52 @${CXX} ${CXXFLAGS} -o ${TARGET} $^ ${LIBS}
54 # how to make a depend file from a source file
57 @${CXX} -M ${CXXFLAGS} $< | sed 's,: , $@: ,' > $@
58 #@${CXX} -M ${CXXFLAGS} $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
62 @${CXX} ${CXXFLAGS} -c -o $@ $<
67 rm -f ${OBJS} ${TARGET}
71 rm -f ${DEPENDS} tags prof gmon.out
77 cd ..; tar -cjf physics.tar.bz2 src/
91 gprof -b ${TARGET} > prof