X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?p=physics.git;a=blobdiff_plain;f=src%2FMakefile;h=95fdbfc78c5cfb058bb3c6cc4ff448a0500fe8b4;hp=a391724ad91ca756501c0c963da7666bce68a8c9;hb=0376f786586cb8183437837007be8df7f054fb80;hpb=e268f6ef72bca3f090ad46451fbe66ee5b31c066 diff --git a/src/Makefile b/src/Makefile index a391724..95fdbfc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,45 +13,17 @@ VALFLAGS := --leak-check=full TARGET := ../run_physics SRCS := # simply to keep every line below the same -SRCS += game.cpp -SRCS += main.cpp -SRCS += mathw.cpp -SRCS += ticks.cpp -SRCS += Vector2.cpp -SRCS += handleSignal.cpp - -SRCS += entityCreator.cpp -SRCS += entityManager.cpp -SRCS += effectManager.cpp -SRCS += collisionManager.cpp -SRCS += CollisionInfo.cpp - -SRCS += Entities/Ball.cpp -SRCS += Entities/Entity.cpp -SRCS += Entities/Line.cpp -SRCS += Entities/Particle.cpp -SRCS += Entities/PhysicsEntity.cpp -SRCS += Entities/Point.cpp -SRCS += Entities/Polygon.cpp -SRCS += Entities/WindParticle.cpp - -SRCS += GameStates/CreatingPolygon.cpp -SRCS += GameStates/GameState.cpp -SRCS += GameStates/Paused.cpp -SRCS += GameStates/Running.cpp - -SRCS += Effects/Effect.cpp -SRCS += Effects/Gravity.cpp -SRCS += Effects/GravityWell.cpp -SRCS += Effects/Screen.cpp - -SRCS += config/config.cpp -SRCS += config/reader.cpp -SRCS += config/keys.cpp - -SRCS += input/inputManager.cpp - -SRCS += graphics/graphics.cpp + +DIRS := # := start +DIRS += . +DIRS += Entities +DIRS += GameStates +DIRS += Effects +DIRS += config +DIRS += input +DIRS += graphics + +include $(addsuffix /files.mk,${DIRS}) OBJSDIR := ../objs/ OBJS := ${SRCS:.cpp=.o} @@ -86,6 +58,8 @@ endif .PHONY: all all: ${TARGET} + echo "${SRCS}" + echo "${FILES}" ${TARGET}: ${OBJS} ${Q1}echo "${CXX}: $@" @@ -94,7 +68,7 @@ ${TARGET}: ${OBJS} # rule to make a depend file from a .cpp ${DEPSDIR}%.d: %.cpp ${Q1}echo "DEP: $@" - ${Q2}${CXX} -M ${CXXFLAGS} $< | sed 's,: , $@: ,' > $@ + ${Q2}${CXX} -MM ${CXXFLAGS} $< | sed 's,: , $@: ,' > $@ # rule to make an object file from a .cpp ${OBJSDIR}%.o: %.cpp