include ${CURDIR}${VARSMK}
-# steps on variables
-include ${SRCSDIR}${DIRMK}
+include ${CURDIR}pre-${DIRMK}
+ # steps on variables
+ include ${SRCSDIR}${DIRMK}
-# Restore variables
-CURDIR := lib/
-#SRCPATH := # Not used at this level
+ # Restore variables
+ CURDIR := lib/
+ #SRCPATH := # Not used at this level
+include ${CURDIR}post-${DIRMK}
include ${CURDIR}${RULESMK}
--- /dev/null
+
+INCFLAGS := $(addprefix -I, ${INCDIRS})
+
+# add flags specific to the library target and all prerequisites
+${OBJS}: CXXFLAGS += -fPIC
+${OBJS}: INCFLAGS := ${INCFLAGS}
+
+${TARGET}: LNKFLAGS += -shared -Wl,-soname,${SONAME}
+
+${DEPS}: INCFLAGS := ${INCFLAGS}
+
--- /dev/null
+
+# lists populated by dir.mk files in subdirectories
+SRCS := # := start
+OBJS := # := start
+DEPS := # := start
+
+BLDDIRS := # := start
+
+BLDDIRS += ${OBJSDIR}
+BLDDIRS += ${DEPSDIR}
+BLDDIRS += ${WORKINGDIR}
+
rm /usr/lib/${LINKERNAME}
rm /usr/lib/${SONAME}
+
+${LIB}: ${TARGET}
+${LIB_OBJS}: ${OBJS}
+${LIB_DEPS}: ${DEPS}
+
+
# how to link the main target
${TARGETTMP}: ${OBJS} | $${@D}
${Q1}${PRNTFMT} "${CXX}" "$@"
${Q2}${CXX} ${CXXFLAGS} ${LNKFLAGS} -o $@ $^ ${LIBS}
-# TARGET will be built by default
-all: ${TARGET}
-
# rule to copy tmp target to working directory
${TARGET}: ${TARGETTMP} | $${@D}
${Q1}${PRNTFMT} "cp" "$@"
libdir := ${exec_prefix}/lib
INSTALL := install
-# HACK needed for deps
-INCFLAGS := $(addprefix -I, ${INCDIRS})
-
-# add flags specific to the library target and all prerequisites
-${TARGET}: CXXFLAGS += -fPIC
-${TARGET}: INCFLAGS += $(addprefix -I, ${INCDIRS})
-${TARGET}: LNKFLAGS += -shared -Wl,-soname,${SONAME}
-
-
-# lists populated by dir.mk files in subdirectories
-SRCS := # := start
-OBJS := # := start
-DEPS := # := start
-
-BLDDIRS := # := start
-
-BLDDIRS += ${OBJSDIR}
-BLDDIRS += ${DEPSDIR}
-BLDDIRS += ${WORKINGDIR}
LIB := lib
.PHONY: ${LIB}
-#LIB_OBJS := lib-objs
-#.PHONY: ${LIB_OBJS}
+LIB_OBJS := lib-objs
+.PHONY: ${LIB_OBJS}
-#LIB_DEPS := lib-deps
-#.PHONY: ${LIB_DEPS}
+LIB_DEPS := lib-deps
+.PHONY: ${LIB_DEPS}
# TESTS: build all of the tests
TESTS := tests