From f1e07aade4d3e52a3d99efc14f86fb9387005f3b Mon Sep 17 00:00:00 2001 From: Patrik Gornicz Date: Sat, 20 Jun 2009 13:19:02 -0400 Subject: [PATCH] added packages file to describe items in packages that other packages can safely use --- Makefile | 3 ++- lib/dir.mk | 2 +- packages.mk | 4 ++++ targets.mk | 13 ++++++------- tests/dir.mk | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 packages.mk diff --git a/Makefile b/Makefile index 3a4a13f..c20587b 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,8 @@ BUILD := DEBUG .PHONY: default default: -# Include the variables that describe targets + +include packages.mk include targets.mk diff --git a/lib/dir.mk b/lib/dir.mk index 830486b..95b0e27 100644 --- a/lib/dir.mk +++ b/lib/dir.mk @@ -6,7 +6,7 @@ T_DIRNAME := lib # top define DIRNAME := ${T_DIRNAME} D := ${DIRNAME} -P := $D +P := ${P_LIB} CURDIR := ${DIRNAME}/ T_DIRNAME := diff --git a/packages.mk b/packages.mk new file mode 100644 index 0000000..b6a5887 --- /dev/null +++ b/packages.mk @@ -0,0 +1,4 @@ + +P_LIB := lib +P_TESTS := tests + diff --git a/targets.mk b/targets.mk index 0382474..e7503a6 100644 --- a/targets.mk +++ b/targets.mk @@ -1,21 +1,20 @@ -G_LIB := lib +G_LIB := ${P_LIB} .PHONY: ${G_LIB} -G_OBJS_LIB := objs-lib +G_OBJS_LIB := objs-${G_LIB} .PHONY: ${G_OBJS_LIB} -G_DEPS_LIB := deps-lib +G_DEPS_LIB := deps-${G_LIB} .PHONY: ${G_DEPS_LIB} - -G_TESTS := tests +G_TESTS := ${P_TESTS} .PHONY: ${G_TESTS} -G_OBJS_TESTS := objs-tests +G_OBJS_TESTS := objs-${G_TESTS} .PHONY: ${G_OBJS_TESTS} -G_DEPS_TESTS := deps-tests +G_DEPS_TESTS := deps-${G_TESTS} .PHONY: ${G_DEPS_TESTS} diff --git a/tests/dir.mk b/tests/dir.mk index 6c4595f..0c8e448 100644 --- a/tests/dir.mk +++ b/tests/dir.mk @@ -6,7 +6,7 @@ T_DIRNAME := tests # top define DIRNAME := ${T_DIRNAME} D := ${DIRNAME} -P := $D +P := ${P_TESTS} CURDIR := ${DIRNAME}/ T_DIRNAME := -- 2.10.2