3 LIBSDL := `sdl-config --libs`
4 LIBS := ${LIBSDL} ${LIBGL}
8 PRFFLAGS := ${DBGFLAGS} -pg
11 CXXFLAGS := -Wall -pedantic -ansi ${DBGFLAGS}
14 SRCS := entityManager.cpp
21 SRCS += Entities/Ball.cpp
22 SRCS += Entities/Entity.cpp
23 SRCS += Entities/Line.cpp
24 SRCS += Entities/Particle.cpp
25 SRCS += Entities/PhysicsEntity.cpp
26 SRCS += Entities/Point.cpp
27 SRCS += Entities/Polygon.cpp
28 SRCS += Entities/WindParticle.cpp
30 SRCS += GameStates/CreatingPolygon.cpp
31 SRCS += GameStates/GameState.cpp
32 SRCS += GameStates/Paused.cpp
33 SRCS += GameStates/Running.cpp
35 SRCS += input/inputManager.cpp
37 SRCS += graphics/graphics.cpp
39 OBJS := ${SRCS:.cpp=.o}
42 TARGET := ../run_physics
43 DEPENDS := ${SRCS:.cpp=.d}
50 ${CXX} ${CXXFLAGS} -o ${TARGET} $^ ${LIBS}
53 # how to make a depend file from a source file
56 @${CXX} -M ${CXXFLAGS} $< | sed 's,: , $@: ,' > $@
58 #@${CXX} -M ${CXXFLAGS} $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
63 rm -f ${OBJS} ${TARGET}
67 rm -f ${DEPENDS} tags prof gmon.out
73 cd ..; tar -cjf physics.tar.bz2 src/
87 gprof -b ${TARGET} > prof