From: Patrik Gornicz Date: Tue, 28 Apr 2009 20:30:00 +0000 (-0400) Subject: public headers move to a inc directory X-Git-Tag: libbear-premerge~102 X-Git-Url: http://gitweb.pgornicz.com/?a=commitdiff_plain;h=df9cea63215e5d434216ce8271835811bd9eeeca;p=libbear.git public headers move to a inc directory --- diff --git a/Makefile b/Makefile index 00be4b2..f5a4664 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,8 @@ DEPSBLDDIRS := ${DEPSDIR} $(addprefix ${DEPSDIR},${DIRS}) OBJSBLDDIRS := ${OBJSDIR} $(addprefix ${OBJSDIR},${DIRS}) BLDDIRS := ${OBJSBLDDIRS} ${DEPSBLDDIRS} ${WORKINGDIR} ${DSTCFGDIR} -INCDIRS := ${SRCSDIR} +INCDIRS := ${SRCSDIR} inc/ +INCFLAGS := $(addprefix -I, ${INCDIRS}) PRNTFMT := printf "%-5s: %s\n" @@ -60,6 +61,9 @@ endif .PHONY: all all: ${TARGET} +install: + + # cause the fancy $$ directory rules to work out .SECONDEXPANSION: @@ -81,14 +85,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 diff --git a/src/locks/Autolock.h b/inc/Autolock.h similarity index 100% rename from src/locks/Autolock.h rename to inc/Autolock.h diff --git a/src/locks/Mutex.h b/inc/Mutex.h similarity index 100% rename from src/locks/Mutex.h rename to inc/Mutex.h diff --git a/src/Vector2.h b/inc/Vector2.h similarity index 100% rename from src/Vector2.h rename to inc/Vector2.h diff --git a/src/debug.h b/inc/debug.h similarity index 100% rename from src/debug.h rename to inc/debug.h diff --git a/src/mathw.h b/inc/mathw.h similarity index 100% rename from src/mathw.h rename to inc/mathw.h diff --git a/src/debug.cpp b/src/debug.cpp index 4e659d2..0b3c985 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -24,8 +24,8 @@ using std::endl; #include -#include "locks/Mutex.h" -#include "locks/Autolock.h" +#include "Mutex.h" +#include "Autolock.h" /// ***** Public Methods *****