From df9cea63215e5d434216ce8271835811bd9eeeca Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Tue, 28 Apr 2009 16:30:00 -0400 Subject: [PATCH] public headers move to a inc directory --- Makefile | 10 +++++++--- {src/locks => inc}/Autolock.h | 0 {src/locks => inc}/Mutex.h | 0 {src => inc}/Vector2.h | 0 {src => inc}/debug.h | 0 {src => inc}/mathw.h | 0 src/debug.cpp | 4 ++-- 7 files changed, 9 insertions(+), 5 deletions(-) rename {src/locks => inc}/Autolock.h (100%) rename {src/locks => inc}/Mutex.h (100%) rename {src => inc}/Vector2.h (100%) rename {src => inc}/debug.h (100%) rename {src => inc}/mathw.h (100%) 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 ***** -- 2.10.2