aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules/32.mk4
-rw-r--r--rules/64.mk6
-rw-r--r--rules/common.mk13
-rw-r--r--rules/noarch.mk4
4 files changed, 20 insertions, 7 deletions
diff --git a/rules/32.mk b/rules/32.mk
index 3bd29ba..4e32741 100644
--- a/rules/32.mk
+++ b/rules/32.mk
@@ -23,6 +23,10 @@
ifeq (,$(__32_mk))
+include /usr/share/cibs/rules/common.mk
+
+$(eval $(call add-variant,32))
+
build-stamp : build-32-stamp
configure-stamp : configure-32-stamp
install-stamp : install-32-stamp
diff --git a/rules/64.mk b/rules/64.mk
index 29b63b7..ca13218 100644
--- a/rules/64.mk
+++ b/rules/64.mk
@@ -23,6 +23,10 @@
ifeq (,$(__64_mk))
+include /usr/share/cibs/rules/common.mk
+
+$(eval $(call add-variant,64))
+
build-stamp : build-64-stamp
configure-stamp : configure-64-stamp
install-stamp : install-64-stamp
@@ -35,7 +39,7 @@ protodirs += $(destdir.64)
# $(build64) file path=...
# in manifests are included
build64 :=
-
+:
__64_mk := included
endif
diff --git a/rules/common.mk b/rules/common.mk
index 820b8f0..815ce94 100644
--- a/rules/common.mk
+++ b/rules/common.mk
@@ -40,14 +40,15 @@ mach := $(shell uname -p)
mach32 :=
mach64 := amd64
+define add-variant
+destdir.$1 = $(workdir)/proto/$1
+builddir.$1 = $(workdir)/build/$1
+endef
+
+
workdir := $(CURDIR)/work
sourcedir := $(workdir)/source
-destdir.32 := $(workdir)/proto/32
-destdir.64 := $(workdir)/proto/64
-destdir.noarch := $(workdir)/proto/noarch
-builddir.32 := $(workdir)/build/32
-builddir.64 := $(workdir)/build/64
-builddir.noarch := $(workdir)/build/noarch
+$(eval $(call add-variant,64))
CC.32 = gcc -m32
CC.64 = gcc -m64
diff --git a/rules/noarch.mk b/rules/noarch.mk
index 92103fa..e22d9be 100644
--- a/rules/noarch.mk
+++ b/rules/noarch.mk
@@ -23,6 +23,10 @@
ifeq (,$(__noarch_mk))
+include /usr/share/cibs/rules/common.mk
+
+$(eval $(call add-variant,noarch))
+
build-stamp : build-noarch-stamp
configure-stamp : configure-noarch-stamp
install-stamp : install-noarch-stamp