aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules/common.mk9
-rw-r--r--rules/ips.mk6
2 files changed, 9 insertions, 6 deletions
diff --git a/rules/common.mk b/rules/common.mk
index 150906a..ffe40a9 100644
--- a/rules/common.mk
+++ b/rules/common.mk
@@ -42,15 +42,18 @@ mach64 := amd64
variants :=
+workdir-base := work
+workdir := $(CURDIR)/$(workdir-base)
+sourcedir := $(workdir)/source
+
define add-variant
+protodir-base.$1 = $(workdir-base)/proto/$1
+builddir-base.$1 = $(workdir-base)/build/$1
protodir.$1 = $(workdir)/proto/$1
builddir.$1 = $(workdir)/build/$1
variants += $1
-protodirs += $(protodir.$1)
endef
-workdir := $(CURDIR)/work
-sourcedir := $(workdir)/source
CC.32 = gcc -m32
CC.64 = gcc -m64
diff --git a/rules/ips.mk b/rules/ips.mk
index 52bbca7..186b425 100644
--- a/rules/ips.mk
+++ b/rules/ips.mk
@@ -47,13 +47,13 @@ pkg-define += \
# Add $(protodir.<variant>) to use in manifest:
# file $(protodir.64) path=usr/include/header.64.h
-pkg-define += $(foreach _,$(variants),-Dprotodir.$(_)="$(protodir.$(_))")
+pkg-define += $(foreach _,$(variants),-Dprotodir.$(_)="$(protodir-base.$(_))")
# Same for $(builddir.xxx):
-pkg-define += $(foreach _,$(variants),-Dbuilddir.$(_)="$(builddir.$(_))")
+pkg-define += $(foreach _,$(variants),-Dbuilddir.$(_)="$(builddir-base.$(_))")
# Where to find files:
-pkg-protos = $(protodirs:%=-d "%")
+pkg-protos = $(foreach _,$(variants),-d "$(protodir.$(_))")
pkg-protos += -d .
transformations := \