# Include the variables that describe targets
include targets.mk
-default: ${G_LIB}
-
G_DIRMK := dir.mk
G_VARSMK := vars.mk
-# Package name
-P := lib
-CURDIR := lib/
+DIRNAME := lib
+P := ${DIRNAME}
+CURDIR := ${DIRNAME}/
include ${CURDIR}${G_VARSMK}
-CURDIR := lib/src/
+DIRNAME := src
+CURDIR := lib/${DIRNAME}/
SRCPATH :=
include ${CURDIR}${G_FILESMK}
-CURDIR := lib/src/locks/
-SRCPATH := locks/
+DIRNAME := locks
+CURDIR := lib/src/${DIRNAME}/
+SRCPATH := ${DIRNAME}/
include ${CURDIR}${G_FILESMK}
include $(addprefix ${SRCSDIR_$P},$(addsuffix ${G_DIRMK},${NEWDIRS}))
cleanall: cleanbin cleanobjs cleandeps
+default: ${G_LIB}
+
.PHONY: all
all: ${G_LIB} ${G_TESTS}
-# Package name
-P := tests
-CURDIR := tests/
+DIRNAME := tests
+P := ${DIRNAME}
+CURDIR := ${DIRNAME}/
include ${CURDIR}${G_VARSMK}
-D := tests_src_1
-CURDIR := tests/src/1/
-SRCPATH := 1/
+DIRNAME := 1
+D := tests_src_${DIRNAME}
+CURDIR := tests/src/${DIRNAME}/
+SRCPATH := ${DIRNAME}/
include ${CURDIR}${G_VARSMK}
${G_TESTS}: ${TARGET_$D}
+${G_TESTS}_${DIRNAME}: ${TARGET_$D}
# HACK
${TARGETTMP_$D}: tests/bind/libbear.so.0
-CURDIR := tests/src/
+DIRNAME := src
+CURDIR := tests/${DIRNAME}/
SRCPATH :=
include ${CURDIR}${G_FILESMK}
-D := tests_src_printTrace
-CURDIR := tests/src/printTrace/
-SRCPATH := printTrace/
+DIRNAME := printTrace
+D := tests_src_${DIRNAME}
+CURDIR := tests/src/${DIRNAME}/
+SRCPATH := ${DIRNAME}/
include ${CURDIR}${G_VARSMK}
${G_TESTS}: ${TARGET_$D}
+${G_TESTS}_${DIRNAME}: ${TARGET_$D}
# HACK
${TARGETTMP_$D}: tests/bind/libbear.so.0