removed DIRS varible, setup CXXFLAGS to be target specific
authorPatrik Gornicz <Gornicz.P@gmail.com>
Fri, 5 Jun 2009 04:03:10 +0000 (00:03 -0400)
committerPatrik Gornicz <Gornicz.P@gmail.com>
Fri, 5 Jun 2009 04:03:10 +0000 (00:03 -0400)
Makefile
src/files.mk
src/locks/files.mk
src/vars.mk

index b70bff2..737559d 100644 (file)
--- 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}
 
index c9eb874..f5bef4f 100644 (file)
@@ -19,7 +19,6 @@ NEWDEPS := ${NEWSRCS:.cpp=.d}
 # Append to lists
 
 SRCS    += ${NEWSRCS}
-DIRS    += ${CURDIR}
 OBJS    += $(addprefix ${OBJSDIR},${NEWOBJS})
 DEPS    += $(addprefix ${DEPSDIR},${NEWDEPS})
 
index 845d68b..61b36a6 100644 (file)
@@ -15,7 +15,6 @@ NEWDEPS := ${NEWSRCS:.cpp=.d}
 # Append to lists
 
 SRCS    += ${NEWSRCS}
-DIRS    += ${CURDIR}
 OBJS    += $(addprefix ${OBJSDIR},${NEWOBJS})
 DEPS    += $(addprefix ${DEPSDIR},${NEWDEPS})
 
index 61aa670..f26a344 100644 (file)
@@ -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