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}
49 # quiet the echo command
51 # quiet the command that is `replaced' by an echo
54 # EAT the echo command as if it was not there
55 Q1 := @true # NOTE: the space between @true and the # is VERY important!!
56 # do not quiet the command output
64 ${Q1}echo "${CXX}: $@"
65 ${Q2}${CXX} ${CXXFLAGS} -o ${TARGET} $^ ${LIBS}
67 # how to make a depend file from a source file
70 ${Q2}${CXX} -M ${CXXFLAGS} $< | sed 's,: , $@: ,' > $@
71 #@${CXX} -M ${CXXFLAGS} $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
74 ${Q1}echo "${CXX}: $@"
75 ${Q2}${CXX} ${CXXFLAGS} -c -o $@ $<
80 ${Q1}echo "CLEAN: OBJS"
82 ${Q1}echo "CLEAN: TARGET"
87 ${Q1}echo "CLEAN: DEPENDS"
89 ${Q1}echo "CLEAN: tags prof gmon.out"
90 ${Q2}rm -f tags prof gmon.out
96 cd ..; tar -cjf physics.tar.bz2 src/
110 gprof -b ${TARGET} > prof