From ebea11383f021a2080ebf5a3f0ffec7aadb1b3c5 Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Sat, 15 Nov 2008 20:44:31 -0500 Subject: [PATCH] BLDDIRS clean up --- src/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index 662824e..bcdb416 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,7 +39,9 @@ TARGETNAME := run_physics TARGETTMP := ${OBJSDIR}${TARGETNAME} TARGET := ${WORKINGDIR}${TARGETNAME} -BLDDIRS := $(addprefix ${DEPSDIR},${DIRS}) $(addprefix ${OBJSDIR},${DIRS}) ${WORKINGDIR} +DEPSBLDDIRS := $(addprefix ${DEPSDIR},${DIRS}) +OBJSBLDDIRS := $(addprefix ${OBJSDIR},${DIRS}) +BLDDIRS := ${OBJSBLDDIRS} ${DEPSBLDDIRS} ${WORKINGDIR} VERBOSE := 0 @@ -60,7 +62,7 @@ endif all: ${TARGET} # rule to copy tmp target to working directory -${TARGET}: ${TARGETTMP} +${TARGET}: ${TARGETTMP} | ${WORKINGDIR} ${Q1}echo "cp: $@" ${Q2}cp $^ $@ @@ -74,12 +76,12 @@ ${BLDDIRS}: ${Q2}mkdir -p $@ # rule to make a depend file from a .cpp -${DEPSDIR}%.d: %.cpp | ${BLDDIRS} +${DEPSDIR}%.d: %.cpp | ${DEPSBLDDIRS} ${Q1}echo "DEP: $@" ${Q2}${CXX} -MM ${CXXFLAGS} $< | sed 's,\(^.*\):,${OBJSDIR}\1 $@:,' > $@ # rule to make an object file from a .cpp -${OBJSDIR}%.o: %.cpp | ${BLDDIRS} +${OBJSDIR}%.o: %.cpp | ${OBJSBLDDIRS} ${Q1}echo "${CXX}: $@" ${Q2}${CXX} ${CXXFLAGS} -c -o $@ $< -- 2.10.2