fixed bug in make file wrt INCDIRS
authorPatrik Gornicz <Gornicz.P@gmail.com>
Tue, 28 Apr 2009 20:31:24 +0000 (16:31 -0400)
committerPatrik Gornicz <Gornicz.P@gmail.com>
Tue, 28 Apr 2009 20:31:24 +0000 (16:31 -0400)
Makefile

index cf92b54..9deb3c6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@ OBJSBLDDIRS := ${OBJSDIR} $(addprefix ${OBJSDIR},${DIRS})
 BLDDIRS     := ${OBJSBLDDIRS} ${DEPSBLDDIRS} ${WORKINGDIR} ${DSTCFGDIR}
 
 INCDIRS     := ${SRCSDIR}
+INCFLAGS    := $(addprefix -I, ${INCDIRS})
 
 
 PRNTFMT := printf "%-5s: %s\n"
@@ -124,14 +125,14 @@ ${BLDDIRS}:
 # rule to make an object file from a .cpp
 ${OBJSDIR}%.o: ${SRCSDIR}%.cpp | $$(dir $$@)
        ${Q1}${PRNTFMT} "${CXX}" "$@"
-       ${Q2}${CXX} ${CXXFLAGS} -c -o $@ $< -I "${INCDIRS}"
+       ${Q2}${CXX} ${CXXFLAGS} -c -o $@ $< ${INCFLAGS}
 
 # rule to make a depend file from a .cpp
 #   be clever and escape the / chars in file paths
 #   DON'T simply use another sed delimiter or it can't appear in the file paths
 ${DEPSDIR}%.d: ${SRCSDIR}%.cpp | $$(dir $$@)
        ${Q1}${PRNTFMT} "DEP" "$@"
-       ${Q2}${CXX} -MM ${CXXFLAGS} $< -I "${INCDIRS}" | \
+       ${Q2}${CXX} -MM ${CXXFLAGS} $< ${INCFLAGS} | \
                sed 's/\(^.*\):/$(subst /,\/,${OBJSDIR}\1 $@):/' > $@
 
 .PHONY: cleanbin