giving more control to dir.mk files
[physics.git] / src / Entities / dir.mk
index e1e39d1..d51df6e 100644 (file)
@@ -1,15 +1,25 @@
+NEWSRCS := # insure blank
+
+NEWSRCS += Ball.cpp
+NEWSRCS += Entity.cpp
+NEWSRCS += Line.cpp
+NEWSRCS += Particle.cpp
+NEWSRCS += PhysicsEntity.cpp
+NEWSRCS += Point.cpp
+NEWSRCS += Polygon.cpp
+NEWSRCS += WindParticle.cpp
+
+
+# Post dir setup
+
 CURDIR         := Entities/
-FILES  := # insure blank
 
-FILES += Ball.cpp
-FILES += Entity.cpp
-FILES += Line.cpp
-FILES += Particle.cpp
-FILES += PhysicsEntity.cpp
-FILES += Point.cpp
-FILES += Polygon.cpp
-FILES += WindParticle.cpp
+NEWSRCS := $(addprefix ${CURDIR},${NEWSRCS})
+NEWOBJS := ${NEWSRCS:.cpp=.o}
+NEWDEPS := ${NEWSRCS:.cpp=.d}
 
-FILES := $(addprefix ${CURDIR},${FILES})
+# Append to lists
 
-SRCS += ${FILES}
+SRCS    += ${NEWSRCS}
+OBJS    += $(addprefix ${OBJSDIR},${NEWOBJS})
+DEPS    += $(addprefix ${DEPSDIR},${NEWDEPS})