giving more control to dir.mk files
[physics.git] / src / GameStates / dir.mk
index 3a1e916..5665c36 100644 (file)
@@ -1,11 +1,21 @@
+NEWSRCS := # insure blank
+
+NEWSRCS += CreatingPolygon.cpp
+NEWSRCS += GameState.cpp
+NEWSRCS += Paused.cpp
+NEWSRCS += Running.cpp
+
+
+# Post dir setup
+
 CURDIR         := GameStates/
-FILES  := # insure blank
 
-FILES += CreatingPolygon.cpp
-FILES += GameState.cpp
-FILES += Paused.cpp
-FILES += Running.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})