From: Patrik Gornicz Date: Sun, 16 Nov 2008 01:44:31 +0000 (-0500) Subject: BLDDIRS clean up X-Git-Tag: physics-premerge~100 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=commitdiff_plain;h=ebea11383f021a2080ebf5a3f0ffec7aadb1b3c5;p=libbear.git BLDDIRS clean up --- 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 $@ $<