DIRS += graphics/
DIRS += locks/
-SRCS := # := start
-include $(addsuffix /files.mk,${DIRS})
+SRCSDIR := src/
+SRCS := # := start
-WORKINGDIR := ../bind/
+# include all of the files.mk
+include $(addprefix ${SRCSDIR},$(addsuffix files.mk,${DIRS}))
-OBJSDIR := ../objsd/
+WORKINGDIR := bind/
+
+OBJSDIR := objsd/
OBJS := ${SRCS:.cpp=.o}
OBJS := $(addprefix ${OBJSDIR},${OBJS})
-DEPSDIR := ../deps/
+DEPSDIR := deps/
DEPS := ${SRCS:.cpp=.d}
DEPS := $(addprefix ${DEPSDIR},${DEPS})
CFGDIRNAME := configs/
-SRCCFGDIR := ../${CFGDIRNAME}
+SRCCFGDIR := ${CFGDIRNAME}
DSTCFGDIR := ${WORKINGDIR}${CFGDIRNAME}
CFGS := # := start
TARGETNAME := run_physics
TARGETTMP := ${OBJSDIR}${TARGETNAME}
-TARGET := ${WORKINGDIR}${TARGETNAME}
+TARGET := ${WORKINGDIR}${TARGETNAME}
DEPSBLDDIRS := $(addprefix ${DEPSDIR},${DIRS})
OBJSBLDDIRS := $(addprefix ${OBJSDIR},${DIRS})
${Q2}mkdir -p $@
# rule to make an object file from a .cpp
-${OBJSDIR}%.o: %.cpp | ${OBJSBLDDIRS}
+${OBJSDIR}%.o: ${SRCSDIR}%.cpp | ${OBJSBLDDIRS}
${Q1}echo "${CXX}: $@"
${Q2}${CXX} ${CXXFLAGS} -c -o $@ $<
# rule to make a depend file from a .cpp
-${DEPSDIR}%.d: %.cpp | ${DEPSBLDDIRS}
+${DEPSDIR}%.d: ${SRCSDIR}%.cpp | ${DEPSBLDDIRS}
${Q1}echo "DEP: $@"
${Q2}${CXX} -MM ${CXXFLAGS} $< | sed 's,\(^.*\):,${OBJSDIR}\1 $@:,' > $@