# targets append themselves to this to be built by all
.PHONY: all
all:
-#all: ${TARGET}
DIRMK := dir.mk
VARSMK := vars.mk
# 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}
# Append to lists
SRCS += ${NEWSRCS}
-DIRS += ${CURDIR}
OBJS += $(addprefix ${OBJSDIR},${NEWOBJS})
DEPS += $(addprefix ${DEPSDIR},${NEWDEPS})
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