+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})