From: Patrik Gornicz Date: Fri, 5 Jun 2009 04:03:10 +0000 (-0400) Subject: removed DIRS varible, setup CXXFLAGS to be target specific X-Git-Tag: libbear-premerge~74 X-Git-Url: http://gitweb.pgornicz.com/?a=commitdiff_plain;h=5e9368985888f77dc5782a4d94ef45920ef87b03;p=libbear.git removed DIRS varible, setup CXXFLAGS to be target specific --- diff --git a/Makefile b/Makefile index b70bff2..737559d 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ BUILD := DEBUG # targets append themselves to this to be built by all .PHONY: all all: -#all: ${TARGET} DIRMK := dir.mk VARSMK := vars.mk @@ -20,12 +19,11 @@ include ${VARSMK} # lists populated by dir.mk files in subdirectories SRCS := # := start -DIRS := # := start OBJS := # := start DEPS := # := start BLDDIRS := # := start -# include all of the dir.mk files in src +# include all of the dir.mk include src/${DIRMK} diff --git a/src/files.mk b/src/files.mk index c9eb874..f5bef4f 100644 --- a/src/files.mk +++ b/src/files.mk @@ -19,7 +19,6 @@ NEWDEPS := ${NEWSRCS:.cpp=.d} # Append to lists SRCS += ${NEWSRCS} -DIRS += ${CURDIR} OBJS += $(addprefix ${OBJSDIR},${NEWOBJS}) DEPS += $(addprefix ${DEPSDIR},${NEWDEPS}) diff --git a/src/locks/files.mk b/src/locks/files.mk index 845d68b..61b36a6 100644 --- a/src/locks/files.mk +++ b/src/locks/files.mk @@ -15,7 +15,6 @@ NEWDEPS := ${NEWSRCS:.cpp=.d} # Append to lists SRCS += ${NEWSRCS} -DIRS += ${CURDIR} OBJS += $(addprefix ${OBJSDIR},${NEWOBJS}) DEPS += $(addprefix ${DEPSDIR},${NEWDEPS}) diff --git a/src/vars.mk b/src/vars.mk index 61aa670..f26a344 100644 --- a/src/vars.mk +++ b/src/vars.mk @@ -63,14 +63,15 @@ LIBFLAGS := -fPIC INCFLAGS := $(addprefix -I, ${INCDIRS}) LNKFLAGS := -shared -Wl,-soname,${SONAME} -CXXFLAGS += ${LIBFLAGS} +# setup CXXFLAGS specific to the library target and all prerequisites +${TARGET}: CXXFLAGS += ${LIBFLAGS} ifeq (${BUILD},WIN32) - CXXFLAGS += ${OPTFLAGS} +${TARGET}: CXXFLAGS += ${OPTFLAGS} else ifeq (${BUILD},FINAL) - CXXFLAGS += ${OPTFLAGS} +${TARGET}: CXXFLAGS += ${OPTFLAGS} else - CXXFLAGS += ${DBGFLAGS} +${TARGET}: CXXFLAGS += ${DBGFLAGS} endif endif