fixed depend mistake
[physics.git] / src / Makefile
index 9f7a154..3eb3e59 100644 (file)
@@ -66,7 +66,7 @@ ${TARGET}: ${OBJS}
 # rule to make a depend file from a .cpp
 ${DEPSDIR}%.d: %.cpp
        ${Q1}echo "DEP: $@"
-       ${Q2}${CXX} -MM ${CXXFLAGS} $< | sed 's,: , $@: ,' > $@
+       ${Q2}${CXX} -MM ${CXXFLAGS} $< | sed 's,\(^.*\):,${OBJSDIR}\1 $@:,' > $@
 
 # rule to make an object file from a .cpp
 ${OBJSDIR}%.o: %.cpp