endif
-# include all of the dir.mk
-DIRS := # := start
+# cause the fancy $${@D} directory rules to work out
+.SECONDEXPANSION:
+
+.PHONY: all
+all: ${TARGET}
+
+
+# lists populated by dir.mk files in subdirectories
SRCS := # := start
+DIRS := # := start
OBJS := # := start
DEPS := # := start
+
DIRMK := dir.mk
+
+# include all of the dir.mk files in src
include ${SRCSDIR}${DIRMK}
BLDDIRS += ${WORKINGDIR}
-.PHONY: all
-all: ${TARGET}
-
INSTALL := install
# HACK install
rm /usr/lib/${LINKERNAME}
rm /usr/lib/${SONAME}
-# cause the fancy $${@D} directory rules to work out
-.SECONDEXPANSION:
-
# how to link the main target
${TARGETTMP}: ${OBJS} | $${@D}
${Q1}${PRNTFMT} "${CXX}" "$@"
-NEWSRCS := # insure blank
+NEWSRCS := # := start; empty
NEWSRCS += Vector2.cpp
NEWSRCS += mathw.cpp
NEWSRCS += debug.cpp
NEWSRCS += Timer.cpp
NEWSRCS += Ticks.cpp
-NEWDIRS := # insure blank
-
+NEWDIRS := # := start; empty
NEWDIRS += locks/
# Post dir setup
# Append to lists
SRCS += ${NEWSRCS}
-DIRS += ${NEWDIRS}
+DIRS += ${CURDIR}
OBJS += $(addprefix ${OBJSDIR},${NEWOBJS})
DEPS += $(addprefix ${DEPSDIR},${NEWDEPS})
-NEWSRCS := # insure blank
+NEWSRCS := # := start; empty
NEWSRCS += Autolock.cpp
NEWSRCS += Lock.cpp
+NEWDIRS := # := start; empty
# Post dir setup
-CURDIR := locks/
+CURDIR := locks/
NEWSRCS := $(addprefix ${CURDIR},${NEWSRCS})
+NEWDIRS := $(addprefix ${CURDIR},${NEWDIRS})
NEWOBJS := ${NEWSRCS:.cpp=.o}
NEWDEPS := ${NEWSRCS:.cpp=.d}
# Append to lists
SRCS += ${NEWSRCS}
+DIRS += ${CURDIR}
OBJS += $(addprefix ${OBJSDIR},${NEWOBJS})
DEPS += $(addprefix ${DEPSDIR},${NEWDEPS})
+
+
+include $(addprefix ${SRCSDIR},$(addsuffix ${DIRMK},${NEWDIRS}))