From f5380bc68a49710df6c10b089da232afb791344e Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Tue, 28 Apr 2009 16:31:24 -0400 Subject: [PATCH] fixed bug in make file wrt INCDIRS --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cf92b54..9deb3c6 100644 --- 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 -- 2.10.2