summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/Makefile4
-rw-r--r--sys/arch/alpha/compile/.cvsignore6
-rw-r--r--sys/arch/alpha/compile/GENERIC.MP/Makefile1
-rw-r--r--sys/arch/alpha/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/alpha/compile/Makefile8
-rw-r--r--sys/arch/alpha/compile/Makefile.inc19
-rw-r--r--sys/arch/alpha/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/alpha/compile/RAMDISKB/Makefile1
-rw-r--r--sys/arch/alpha/compile/RAMDISKBIG/Makefile1
-rw-r--r--sys/arch/alpha/compile/RAMDISKC/Makefile1
-rw-r--r--sys/arch/alpha/conf/Makefile.alpha6
-rw-r--r--sys/arch/amd64/Makefile4
-rw-r--r--sys/arch/amd64/compile/.cvsignore4
-rw-r--r--sys/arch/amd64/compile/GENERIC.MP/Makefile1
-rw-r--r--sys/arch/amd64/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/amd64/compile/Makefile8
-rw-r--r--sys/arch/amd64/compile/Makefile.inc19
-rw-r--r--sys/arch/amd64/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/amd64/compile/RAMDISK_CD/Makefile1
-rw-r--r--sys/arch/amd64/conf/Makefile.amd646
-rw-r--r--sys/arch/armv7/Makefile4
-rw-r--r--sys/arch/armv7/compile/.cvsignore2
-rw-r--r--sys/arch/armv7/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/armv7/compile/Makefile8
-rw-r--r--sys/arch/armv7/compile/Makefile.inc19
-rw-r--r--sys/arch/armv7/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/armv7/conf/Makefile.armv74
-rw-r--r--sys/arch/hppa/Makefile4
-rw-r--r--sys/arch/hppa/compile/.cvsignore3
-rw-r--r--sys/arch/hppa/compile/GENERIC.MP/Makefile1
-rw-r--r--sys/arch/hppa/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/hppa/compile/Makefile8
-rw-r--r--sys/arch/hppa/compile/Makefile.inc19
-rw-r--r--sys/arch/hppa/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/hppa/conf/Makefile.hppa6
-rw-r--r--sys/arch/i386/Makefile4
-rw-r--r--sys/arch/i386/compile/.cvsignore4
-rw-r--r--sys/arch/i386/compile/GENERIC.MP/Makefile1
-rw-r--r--sys/arch/i386/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/i386/compile/Makefile8
-rw-r--r--sys/arch/i386/compile/Makefile.inc19
-rw-r--r--sys/arch/i386/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/i386/compile/RAMDISK_CD/Makefile1
-rw-r--r--sys/arch/i386/conf/Makefile.i3866
-rw-r--r--sys/arch/i386/conf/RAMDISK_CD3
-rw-r--r--sys/arch/landisk/Makefile4
-rw-r--r--sys/arch/landisk/compile/.cvsignore2
-rw-r--r--sys/arch/landisk/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/landisk/compile/Makefile8
-rw-r--r--sys/arch/landisk/compile/Makefile.inc19
-rw-r--r--sys/arch/landisk/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/landisk/conf/Makefile.landisk6
-rw-r--r--sys/arch/loongson/Makefile4
-rw-r--r--sys/arch/loongson/compile/.cvsignore2
-rw-r--r--sys/arch/loongson/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/loongson/compile/Makefile8
-rw-r--r--sys/arch/loongson/compile/Makefile.inc19
-rw-r--r--sys/arch/loongson/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/loongson/conf/Makefile.loongson6
-rw-r--r--sys/arch/luna88k/Makefile4
-rw-r--r--sys/arch/luna88k/compile/.cvsignore3
-rw-r--r--sys/arch/luna88k/compile/GENERIC.MP/Makefile1
-rw-r--r--sys/arch/luna88k/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/luna88k/compile/Makefile8
-rw-r--r--sys/arch/luna88k/compile/Makefile.inc19
-rw-r--r--sys/arch/luna88k/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/luna88k/conf/Makefile.luna88k6
-rw-r--r--sys/arch/macppc/Makefile4
-rw-r--r--sys/arch/macppc/compile/.cvsignore3
-rw-r--r--sys/arch/macppc/compile/GENERIC.MP/Makefile1
-rw-r--r--sys/arch/macppc/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/macppc/compile/Makefile8
-rw-r--r--sys/arch/macppc/compile/Makefile.inc19
-rw-r--r--sys/arch/macppc/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/macppc/conf/Makefile.macppc6
-rw-r--r--sys/arch/octeon/Makefile4
-rw-r--r--sys/arch/octeon/compile/.cvsignore3
-rw-r--r--sys/arch/octeon/compile/GENERIC.MP/Makefile1
-rw-r--r--sys/arch/octeon/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/octeon/compile/Makefile9
-rw-r--r--sys/arch/octeon/compile/Makefile.inc19
-rw-r--r--sys/arch/octeon/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/octeon/conf/Makefile.octeon6
-rw-r--r--sys/arch/sgi/Makefile4
-rw-r--r--sys/arch/sgi/compile/.cvsignore14
-rw-r--r--sys/arch/sgi/compile/GENERIC-IP22/Makefile1
-rw-r--r--sys/arch/sgi/compile/GENERIC-IP26/Makefile1
-rw-r--r--sys/arch/sgi/compile/GENERIC-IP27.MP/Makefile1
-rw-r--r--sys/arch/sgi/compile/GENERIC-IP27/Makefile1
-rw-r--r--sys/arch/sgi/compile/GENERIC-IP28/Makefile1
-rw-r--r--sys/arch/sgi/compile/GENERIC-IP30.MP/Makefile1
-rw-r--r--sys/arch/sgi/compile/GENERIC-IP30/Makefile1
-rw-r--r--sys/arch/sgi/compile/GENERIC-IP32/Makefile1
-rw-r--r--sys/arch/sgi/compile/Makefile11
-rw-r--r--sys/arch/sgi/compile/Makefile.inc19
-rw-r--r--sys/arch/sgi/compile/RAMDISK-IP22/Makefile1
-rw-r--r--sys/arch/sgi/compile/RAMDISK-IP26/Makefile1
-rw-r--r--sys/arch/sgi/compile/RAMDISK-IP27/Makefile1
-rw-r--r--sys/arch/sgi/compile/RAMDISK-IP28/Makefile1
-rw-r--r--sys/arch/sgi/compile/RAMDISK-IP30/Makefile1
-rw-r--r--sys/arch/sgi/compile/RAMDISK-IP32/Makefile1
-rw-r--r--sys/arch/sgi/conf/Makefile.sgi6
-rw-r--r--sys/arch/socppc/Makefile4
-rw-r--r--sys/arch/socppc/compile/.cvsignore2
-rw-r--r--sys/arch/socppc/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/socppc/compile/Makefile8
-rw-r--r--sys/arch/socppc/compile/Makefile.inc19
-rw-r--r--sys/arch/socppc/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/socppc/conf/Makefile.socppc6
-rw-r--r--sys/arch/sparc64/Makefile4
-rw-r--r--sys/arch/sparc64/compile/.cvsignore5
-rw-r--r--sys/arch/sparc64/compile/GENERIC.MP/Makefile1
-rw-r--r--sys/arch/sparc64/compile/GENERIC/Makefile1
-rw-r--r--sys/arch/sparc64/compile/Makefile9
-rw-r--r--sys/arch/sparc64/compile/Makefile.inc19
-rw-r--r--sys/arch/sparc64/compile/RAMDISK/Makefile1
-rw-r--r--sys/arch/sparc64/compile/RAMDISKU1/Makefile1
-rw-r--r--sys/arch/sparc64/compile/RAMDISKU5/Makefile1
-rw-r--r--sys/arch/sparc64/conf/Makefile.sparc646
119 files changed, 488 insertions, 105 deletions
diff --git a/sys/arch/alpha/Makefile b/sys/arch/alpha/Makefile
index 1ecf3ffe40d..59905a2471b 100644
--- a/sys/arch/alpha/Makefile
+++ b/sys/arch/alpha/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.12 2013/12/08 14:46:39 espie Exp $
+# $OpenBSD: Makefile,v 1.13 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/alpha/compile/.cvsignore b/sys/arch/alpha/compile/.cvsignore
deleted file mode 100644
index f9df98b101c..00000000000
--- a/sys/arch/alpha/compile/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-GENERIC
-GENERIC.MP
-RAMDISK
-RAMDISKB
-RAMDISKC
-RAMDISKBIG
diff --git a/sys/arch/alpha/compile/GENERIC.MP/Makefile b/sys/arch/alpha/compile/GENERIC.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/alpha/compile/GENERIC.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/alpha/compile/GENERIC/Makefile b/sys/arch/alpha/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/alpha/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/alpha/compile/Makefile b/sys/arch/alpha/compile/Makefile
new file mode 100644
index 00000000000..138b506d104
--- /dev/null
+++ b/sys/arch/alpha/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:42:59 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC GENERIC.MP RAMDISK RAMDISKB RAMDISKBIG RAMDISKC
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/alpha/compile/Makefile.inc b/sys/arch/alpha/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/alpha/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/alpha/compile/RAMDISK/Makefile b/sys/arch/alpha/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/alpha/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/alpha/compile/RAMDISKB/Makefile b/sys/arch/alpha/compile/RAMDISKB/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/alpha/compile/RAMDISKB/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/alpha/compile/RAMDISKBIG/Makefile b/sys/arch/alpha/compile/RAMDISKBIG/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/alpha/compile/RAMDISKBIG/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/alpha/compile/RAMDISKC/Makefile b/sys/arch/alpha/compile/RAMDISKC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/alpha/compile/RAMDISKC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha
index a6ab7f91a33..ac8b8fa891e 100644
--- a/sys/arch/alpha/conf/Makefile.alpha
+++ b/sys/arch/alpha/conf/Makefile.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.alpha,v 1.89 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.alpha,v 1.90 2016/10/14 18:43:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -126,6 +126,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/amd64/Makefile b/sys/arch/amd64/Makefile
index 8edc0a87e73..e07dd88fa92 100644
--- a/sys/arch/amd64/Makefile
+++ b/sys/arch/amd64/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 2013/12/08 14:46:39 espie Exp $
+# $OpenBSD: Makefile,v 1.11 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/amd64/compile/.cvsignore b/sys/arch/amd64/compile/.cvsignore
deleted file mode 100644
index 4741f3d9201..00000000000
--- a/sys/arch/amd64/compile/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-GENERIC
-GENERIC.MP
-RAMDISK
-RAMDISK_CD
diff --git a/sys/arch/amd64/compile/GENERIC.MP/Makefile b/sys/arch/amd64/compile/GENERIC.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/amd64/compile/GENERIC.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/amd64/compile/GENERIC/Makefile b/sys/arch/amd64/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/amd64/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/amd64/compile/Makefile b/sys/arch/amd64/compile/Makefile
new file mode 100644
index 00000000000..522b9b708d7
--- /dev/null
+++ b/sys/arch/amd64/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:42:59 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC GENERIC.MP RAMDISK RAMDISK_CD
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/amd64/compile/Makefile.inc b/sys/arch/amd64/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/amd64/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/amd64/compile/RAMDISK/Makefile b/sys/arch/amd64/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/amd64/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/amd64/compile/RAMDISK_CD/Makefile b/sys/arch/amd64/compile/RAMDISK_CD/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/amd64/compile/RAMDISK_CD/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64
index a198d4256bb..9ca31c55d45 100644
--- a/sys/arch/amd64/conf/Makefile.amd64
+++ b/sys/arch/amd64/conf/Makefile.amd64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.amd64,v 1.68 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.amd64,v 1.69 2016/10/14 18:43:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -130,6 +130,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/armv7/Makefile b/sys/arch/armv7/Makefile
index 87b1e547b33..749b3d6025e 100644
--- a/sys/arch/armv7/Makefile
+++ b/sys/arch/armv7/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 2016/05/31 18:37:03 tedu Exp $
+# $OpenBSD: Makefile,v 1.5 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/armv7/compile/.cvsignore b/sys/arch/armv7/compile/.cvsignore
deleted file mode 100644
index b72af3039e6..00000000000
--- a/sys/arch/armv7/compile/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-GENERIC
-RAMDISK
diff --git a/sys/arch/armv7/compile/GENERIC/Makefile b/sys/arch/armv7/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/armv7/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/armv7/compile/Makefile b/sys/arch/armv7/compile/Makefile
new file mode 100644
index 00000000000..4f5fc1a4e9a
--- /dev/null
+++ b/sys/arch/armv7/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:42:59 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC RAMDISK
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/armv7/compile/Makefile.inc b/sys/arch/armv7/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/armv7/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/armv7/compile/RAMDISK/Makefile b/sys/arch/armv7/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/armv7/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7
index 6cf7f820a8a..9fc0d03bda8 100644
--- a/sys/arch/armv7/conf/Makefile.armv7
+++ b/sys/arch/armv7/conf/Makefile.armv7
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.armv7,v 1.14 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.armv7,v 1.15 2016/10/14 18:43:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -131,6 +131,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/hppa/Makefile b/sys/arch/hppa/Makefile
index 548f468c3b2..cb643a39fa9 100644
--- a/sys/arch/hppa/Makefile
+++ b/sys/arch/hppa/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.11 2013/12/08 14:46:39 espie Exp $
+# $OpenBSD: Makefile,v 1.12 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/hppa/compile/.cvsignore b/sys/arch/hppa/compile/.cvsignore
deleted file mode 100644
index d3160b418c1..00000000000
--- a/sys/arch/hppa/compile/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-GENERIC
-GENERIC.MP
-RAMDISK
diff --git a/sys/arch/hppa/compile/GENERIC.MP/Makefile b/sys/arch/hppa/compile/GENERIC.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/hppa/compile/GENERIC.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/hppa/compile/GENERIC/Makefile b/sys/arch/hppa/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/hppa/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/hppa/compile/Makefile b/sys/arch/hppa/compile/Makefile
new file mode 100644
index 00000000000..22989def225
--- /dev/null
+++ b/sys/arch/hppa/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:42:59 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC GENERIC.MP RAMDISK
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/hppa/compile/Makefile.inc b/sys/arch/hppa/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/hppa/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/hppa/compile/RAMDISK/Makefile b/sys/arch/hppa/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/hppa/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa
index c921c89d344..0ceda0c9797 100644
--- a/sys/arch/hppa/conf/Makefile.hppa
+++ b/sys/arch/hppa/conf/Makefile.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa,v 1.82 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.hppa,v 1.83 2016/10/14 18:43:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -136,6 +136,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/i386/Makefile b/sys/arch/i386/Makefile
index 8b4ed0182b1..5a29eb95dce 100644
--- a/sys/arch/i386/Makefile
+++ b/sys/arch/i386/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.21 2013/12/08 14:46:39 espie Exp $
+# $OpenBSD: Makefile,v 1.22 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/i386/compile/.cvsignore b/sys/arch/i386/compile/.cvsignore
deleted file mode 100644
index 4741f3d9201..00000000000
--- a/sys/arch/i386/compile/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-GENERIC
-GENERIC.MP
-RAMDISK
-RAMDISK_CD
diff --git a/sys/arch/i386/compile/GENERIC.MP/Makefile b/sys/arch/i386/compile/GENERIC.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/i386/compile/GENERIC.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/i386/compile/GENERIC/Makefile b/sys/arch/i386/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/i386/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/i386/compile/Makefile b/sys/arch/i386/compile/Makefile
new file mode 100644
index 00000000000..522b9b708d7
--- /dev/null
+++ b/sys/arch/i386/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:42:59 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC GENERIC.MP RAMDISK RAMDISK_CD
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/i386/compile/Makefile.inc b/sys/arch/i386/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/i386/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/i386/compile/RAMDISK/Makefile b/sys/arch/i386/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/i386/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/i386/compile/RAMDISK_CD/Makefile b/sys/arch/i386/compile/RAMDISK_CD/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/i386/compile/RAMDISK_CD/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386
index e1e2c12e239..00eaacfe87d 100644
--- a/sys/arch/i386/conf/Makefile.i386
+++ b/sys/arch/i386/conf/Makefile.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.i386,v 1.95 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.i386,v 1.96 2016/10/14 18:43:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -132,6 +132,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/i386/conf/RAMDISK_CD b/sys/arch/i386/conf/RAMDISK_CD
index e7798c57a9f..ce87d1a2cee 100644
--- a/sys/arch/i386/conf/RAMDISK_CD
+++ b/sys/arch/i386/conf/RAMDISK_CD
@@ -1,9 +1,10 @@
-# $OpenBSD: RAMDISK_CD,v 1.231 2016/09/04 10:22:06 tedu Exp $
+# $OpenBSD: RAMDISK_CD,v 1.232 2016/10/14 18:43:01 deraadt Exp $
machine i386
maxusers 4
option TIMEZONE=0
+option COPTS=-Os
option DST=0
option SMALL_KERNEL
option NO_PROPOLICE
diff --git a/sys/arch/landisk/Makefile b/sys/arch/landisk/Makefile
index ccfc1263999..8d2a6022abf 100644
--- a/sys/arch/landisk/Makefile
+++ b/sys/arch/landisk/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.8 2016/05/31 18:37:04 tedu Exp $
+# $OpenBSD: Makefile,v 1.9 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/landisk/compile/.cvsignore b/sys/arch/landisk/compile/.cvsignore
deleted file mode 100644
index b72af3039e6..00000000000
--- a/sys/arch/landisk/compile/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-GENERIC
-RAMDISK
diff --git a/sys/arch/landisk/compile/GENERIC/Makefile b/sys/arch/landisk/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/landisk/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/landisk/compile/Makefile b/sys/arch/landisk/compile/Makefile
new file mode 100644
index 00000000000..4f5fc1a4e9a
--- /dev/null
+++ b/sys/arch/landisk/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:42:59 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC RAMDISK
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/landisk/compile/Makefile.inc b/sys/arch/landisk/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/landisk/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/landisk/compile/RAMDISK/Makefile b/sys/arch/landisk/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/landisk/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk
index 9da500698bd..019922c3738 100644
--- a/sys/arch/landisk/conf/Makefile.landisk
+++ b/sys/arch/landisk/conf/Makefile.landisk
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.landisk,v 1.55 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.landisk,v 1.56 2016/10/14 18:43:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -125,6 +125,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/loongson/Makefile b/sys/arch/loongson/Makefile
index e2497e3437c..373a7cd0d96 100644
--- a/sys/arch/loongson/Makefile
+++ b/sys/arch/loongson/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2016/05/31 18:37:04 tedu Exp $
+# $OpenBSD: Makefile,v 1.8 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/loongson/compile/.cvsignore b/sys/arch/loongson/compile/.cvsignore
deleted file mode 100644
index b72af3039e6..00000000000
--- a/sys/arch/loongson/compile/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-GENERIC
-RAMDISK
diff --git a/sys/arch/loongson/compile/GENERIC/Makefile b/sys/arch/loongson/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/loongson/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/loongson/compile/Makefile b/sys/arch/loongson/compile/Makefile
new file mode 100644
index 00000000000..471034dc9b0
--- /dev/null
+++ b/sys/arch/loongson/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:43:00 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC RAMDISK
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/loongson/compile/Makefile.inc b/sys/arch/loongson/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/loongson/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/loongson/compile/RAMDISK/Makefile b/sys/arch/loongson/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/loongson/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson
index f4e715e299e..204d261b5bf 100644
--- a/sys/arch/loongson/conf/Makefile.loongson
+++ b/sys/arch/loongson/conf/Makefile.loongson
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.loongson,v 1.47 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.loongson,v 1.48 2016/10/14 18:43:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -28,7 +28,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -137,6 +137,8 @@ symbols.sort: ${_machdir}/${_mach}/symbols.raw
grep -v '^#' ${_machdir}/${_mach}/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/luna88k/Makefile b/sys/arch/luna88k/Makefile
index 43da4e6052f..2d04d9a82df 100644
--- a/sys/arch/luna88k/Makefile
+++ b/sys/arch/luna88k/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.12 2016/05/31 18:37:04 tedu Exp $
+# $OpenBSD: Makefile,v 1.13 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/luna88k/compile/.cvsignore b/sys/arch/luna88k/compile/.cvsignore
deleted file mode 100644
index d3160b418c1..00000000000
--- a/sys/arch/luna88k/compile/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-GENERIC
-GENERIC.MP
-RAMDISK
diff --git a/sys/arch/luna88k/compile/GENERIC.MP/Makefile b/sys/arch/luna88k/compile/GENERIC.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/luna88k/compile/GENERIC.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/luna88k/compile/GENERIC/Makefile b/sys/arch/luna88k/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/luna88k/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/luna88k/compile/Makefile b/sys/arch/luna88k/compile/Makefile
new file mode 100644
index 00000000000..4c1ba402478
--- /dev/null
+++ b/sys/arch/luna88k/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:43:00 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC GENERIC.MP RAMDISK
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/luna88k/compile/Makefile.inc b/sys/arch/luna88k/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/luna88k/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/luna88k/compile/RAMDISK/Makefile b/sys/arch/luna88k/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/luna88k/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k
index 46b516a2fb8..21efb29ca58 100644
--- a/sys/arch/luna88k/conf/Makefile.luna88k
+++ b/sys/arch/luna88k/conf/Makefile.luna88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.luna88k,v 1.60 2016/04/29 12:44:52 mpi Exp $
+# $OpenBSD: Makefile.luna88k,v 1.61 2016/10/14 18:43:01 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized \
@@ -130,6 +130,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/macppc/Makefile b/sys/arch/macppc/Makefile
index 32ab5e9ab62..eac34cca820 100644
--- a/sys/arch/macppc/Makefile
+++ b/sys/arch/macppc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.11 2016/05/31 18:37:04 tedu Exp $
+# $OpenBSD: Makefile,v 1.12 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/macppc/compile/.cvsignore b/sys/arch/macppc/compile/.cvsignore
deleted file mode 100644
index d3160b418c1..00000000000
--- a/sys/arch/macppc/compile/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-GENERIC
-GENERIC.MP
-RAMDISK
diff --git a/sys/arch/macppc/compile/GENERIC.MP/Makefile b/sys/arch/macppc/compile/GENERIC.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/macppc/compile/GENERIC.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/macppc/compile/GENERIC/Makefile b/sys/arch/macppc/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/macppc/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/macppc/compile/Makefile b/sys/arch/macppc/compile/Makefile
new file mode 100644
index 00000000000..4c1ba402478
--- /dev/null
+++ b/sys/arch/macppc/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:43:00 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC GENERIC.MP RAMDISK
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/macppc/compile/Makefile.inc b/sys/arch/macppc/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/macppc/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/macppc/compile/RAMDISK/Makefile b/sys/arch/macppc/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/macppc/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc
index f6ac0af8c7b..490d9fde5ba 100644
--- a/sys/arch/macppc/conf/Makefile.macppc
+++ b/sys/arch/macppc/conf/Makefile.macppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.macppc,v 1.73 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.macppc,v 1.74 2016/10/14 18:43:02 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -125,6 +125,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/octeon/Makefile b/sys/arch/octeon/Makefile
index 1c8f869d2e8..cda6b5d3709 100644
--- a/sys/arch/octeon/Makefile
+++ b/sys/arch/octeon/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 2016/05/31 18:37:04 tedu Exp $
+# $OpenBSD: Makefile,v 1.7 2016/10/14 18:42:58 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR=
+SUBDIR= compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/octeon/compile/.cvsignore b/sys/arch/octeon/compile/.cvsignore
deleted file mode 100644
index d3160b418c1..00000000000
--- a/sys/arch/octeon/compile/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-GENERIC
-GENERIC.MP
-RAMDISK
diff --git a/sys/arch/octeon/compile/GENERIC.MP/Makefile b/sys/arch/octeon/compile/GENERIC.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/octeon/compile/GENERIC.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/octeon/compile/GENERIC/Makefile b/sys/arch/octeon/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/octeon/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/octeon/compile/Makefile b/sys/arch/octeon/compile/Makefile
new file mode 100644
index 00000000000..039afc61e7d
--- /dev/null
+++ b/sys/arch/octeon/compile/Makefile
@@ -0,0 +1,9 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:43:00 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC GENERIC.MP RAMDISK
+.endif
+
+.include <bsd.subdir.mk>
+
diff --git a/sys/arch/octeon/compile/Makefile.inc b/sys/arch/octeon/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/octeon/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/octeon/compile/RAMDISK/Makefile b/sys/arch/octeon/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/octeon/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon
index 9fcf0af0991..8d63bcdd3a1 100644
--- a/sys/arch/octeon/conf/Makefile.octeon
+++ b/sys/arch/octeon/conf/Makefile.octeon
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.octeon,v 1.23 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.octeon,v 1.24 2016/10/14 18:43:02 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -28,7 +28,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -138,6 +138,8 @@ symbols.sort: ${_machdir}/${_mach}/symbols.raw
grep -v '^#' ${_machdir}/${_mach}/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/sgi/Makefile b/sys/arch/sgi/Makefile
index 9456f0badb6..8fd1e04fa30 100644
--- a/sys/arch/sgi/Makefile
+++ b/sys/arch/sgi/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.9 2016/05/31 18:37:04 tedu Exp $
+# $OpenBSD: Makefile,v 1.10 2016/10/14 18:42:59 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC-IP30
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/sgi/compile/.cvsignore b/sys/arch/sgi/compile/.cvsignore
deleted file mode 100644
index 74dcc58ecef..00000000000
--- a/sys/arch/sgi/compile/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-GENERIC-IP22
-GENERIC-IP26
-GENERIC-IP27
-GENERIC-IP27.MP
-GENERIC-IP28
-GENERIC-IP30
-GENERIC-IP30.MP
-GENERIC-IP32
-RAMDISK-IP22
-RAMDISK-IP26
-RAMDISK-IP27
-RAMDISK-IP28
-RAMDISK-IP30
-RAMDISK-IP32
diff --git a/sys/arch/sgi/compile/GENERIC-IP22/Makefile b/sys/arch/sgi/compile/GENERIC-IP22/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/GENERIC-IP22/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/GENERIC-IP26/Makefile b/sys/arch/sgi/compile/GENERIC-IP26/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/GENERIC-IP26/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/GENERIC-IP27.MP/Makefile b/sys/arch/sgi/compile/GENERIC-IP27.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/GENERIC-IP27.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/GENERIC-IP27/Makefile b/sys/arch/sgi/compile/GENERIC-IP27/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/GENERIC-IP27/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/GENERIC-IP28/Makefile b/sys/arch/sgi/compile/GENERIC-IP28/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/GENERIC-IP28/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/GENERIC-IP30.MP/Makefile b/sys/arch/sgi/compile/GENERIC-IP30.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/GENERIC-IP30.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/GENERIC-IP30/Makefile b/sys/arch/sgi/compile/GENERIC-IP30/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/GENERIC-IP30/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/GENERIC-IP32/Makefile b/sys/arch/sgi/compile/GENERIC-IP32/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/GENERIC-IP32/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/Makefile b/sys/arch/sgi/compile/Makefile
new file mode 100644
index 00000000000..0f147f11628
--- /dev/null
+++ b/sys/arch/sgi/compile/Makefile
@@ -0,0 +1,11 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:43:00 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC-IP22 GENERIC-IP26 GENERIC-IP27 GENERIC-IP27.MP \
+# GENERIC-IP28 GENERIC-IP30 GENERIC-IP30.MP GENERIC-IP32 \
+# RAMDISK-IP22 RAMDISK-IP26 RAMDISK-IP27 RAMDISK-IP28 \
+# RAMDISK-IP30 RAMDISK-IP32
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/sgi/compile/Makefile.inc b/sys/arch/sgi/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/sgi/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/sgi/compile/RAMDISK-IP22/Makefile b/sys/arch/sgi/compile/RAMDISK-IP22/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/RAMDISK-IP22/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/RAMDISK-IP26/Makefile b/sys/arch/sgi/compile/RAMDISK-IP26/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/RAMDISK-IP26/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/RAMDISK-IP27/Makefile b/sys/arch/sgi/compile/RAMDISK-IP27/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/RAMDISK-IP27/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/RAMDISK-IP28/Makefile b/sys/arch/sgi/compile/RAMDISK-IP28/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/RAMDISK-IP28/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/RAMDISK-IP30/Makefile b/sys/arch/sgi/compile/RAMDISK-IP30/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/RAMDISK-IP30/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/compile/RAMDISK-IP32/Makefile b/sys/arch/sgi/compile/RAMDISK-IP32/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sgi/compile/RAMDISK-IP32/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi
index b199dcdbffa..3a2b7e8c106 100644
--- a/sys/arch/sgi/conf/Makefile.sgi
+++ b/sys/arch/sgi/conf/Makefile.sgi
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sgi,v 1.71 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.sgi,v 1.72 2016/10/14 18:43:02 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -28,7 +28,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -137,6 +137,8 @@ symbols.sort: ${_machdir}/${_mach}/symbols.raw
grep -v '^#' ${_machdir}/${_mach}/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/socppc/Makefile b/sys/arch/socppc/Makefile
index 2c51e8c73bd..9099e50b19e 100644
--- a/sys/arch/socppc/Makefile
+++ b/sys/arch/socppc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.9 2016/05/31 18:37:04 tedu Exp $
+# $OpenBSD: Makefile,v 1.10 2016/10/14 18:42:59 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/socppc/compile/.cvsignore b/sys/arch/socppc/compile/.cvsignore
deleted file mode 100644
index b72af3039e6..00000000000
--- a/sys/arch/socppc/compile/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-GENERIC
-RAMDISK
diff --git a/sys/arch/socppc/compile/GENERIC/Makefile b/sys/arch/socppc/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/socppc/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/socppc/compile/Makefile b/sys/arch/socppc/compile/Makefile
new file mode 100644
index 00000000000..3b178449c83
--- /dev/null
+++ b/sys/arch/socppc/compile/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:43:01 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC RAMDISK
+.endif
+
+.include <bsd.subdir.mk>
diff --git a/sys/arch/socppc/compile/Makefile.inc b/sys/arch/socppc/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/socppc/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/socppc/compile/RAMDISK/Makefile b/sys/arch/socppc/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/socppc/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc
index da242edd028..8e6fca141fc 100644
--- a/sys/arch/socppc/conf/Makefile.socppc
+++ b/sys/arch/socppc/conf/Makefile.socppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.socppc,v 1.44 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.socppc,v 1.45 2016/10/14 18:43:02 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -125,6 +125,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@
diff --git a/sys/arch/sparc64/Makefile b/sys/arch/sparc64/Makefile
index b8568b0c490..534a6c7af13 100644
--- a/sys/arch/sparc64/Makefile
+++ b/sys/arch/sparc64/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.8 2013/12/08 14:46:39 espie Exp $
+# $OpenBSD: Makefile,v 1.9 2016/10/14 18:42:59 deraadt Exp $
S= ${.CURDIR}/../..
KFILE= GENERIC
@@ -11,7 +11,7 @@ TAGS= ${.CURDIR}/tags
NOPROG=
NOMAN=
NOOBJ=
-SUBDIR= stand
+SUBDIR= stand compile
# config the fattest kernel we can find into a temporary dir
# to create a Makefile. Then use make to pull some variables
diff --git a/sys/arch/sparc64/compile/.cvsignore b/sys/arch/sparc64/compile/.cvsignore
deleted file mode 100644
index fc8b48ec6d2..00000000000
--- a/sys/arch/sparc64/compile/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-GENERIC
-GENERIC.MP
-RAMDISK
-RAMDISKU1
-RAMDISKU5
diff --git a/sys/arch/sparc64/compile/GENERIC.MP/Makefile b/sys/arch/sparc64/compile/GENERIC.MP/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sparc64/compile/GENERIC.MP/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sparc64/compile/GENERIC/Makefile b/sys/arch/sparc64/compile/GENERIC/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sparc64/compile/GENERIC/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sparc64/compile/Makefile b/sys/arch/sparc64/compile/Makefile
new file mode 100644
index 00000000000..8a80b3aa5e3
--- /dev/null
+++ b/sys/arch/sparc64/compile/Makefile
@@ -0,0 +1,9 @@
+# $OpenBSD: Makefile,v 1.1 2016/10/14 18:43:01 deraadt Exp $
+
+.if make(obj) || make(clean)
+SUBDIR!=find . -type d -maxdepth 1 \! \( -name . -o -name CVS \)
+#SUBDIR=GENERIC GENERIC.MP RAMDISK RAMDISKU1 RAMDISKU5
+.endif
+
+.include <bsd.subdir.mk>
+
diff --git a/sys/arch/sparc64/compile/Makefile.inc b/sys/arch/sparc64/compile/Makefile.inc
new file mode 100644
index 00000000000..d79a8803ef2
--- /dev/null
+++ b/sys/arch/sparc64/compile/Makefile.inc
@@ -0,0 +1,19 @@
+SYSDIR != cd ${.CURDIR}/../../../..; pwd
+CONFDIR != cd ${.CURDIR}/../../conf; pwd
+
+.if ${.CURDIR} == ${.OBJDIR}
+.PHONY: config
+config:
+ @echo make obj required first >&2
+ @false
+.elif !exists(${OBJDIR}/Makefile)
+.PHONY: config clean
+config:
+ config -b ${.OBJDIR} -s ${SYSDIR} ${CONFDIR}/${.CURDIR:T}
+
+clean:
+
+.endif
+
+.include <bsd.obj.mk>
+
diff --git a/sys/arch/sparc64/compile/RAMDISK/Makefile b/sys/arch/sparc64/compile/RAMDISK/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sparc64/compile/RAMDISK/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sparc64/compile/RAMDISKU1/Makefile b/sys/arch/sparc64/compile/RAMDISKU1/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sparc64/compile/RAMDISKU1/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sparc64/compile/RAMDISKU5/Makefile b/sys/arch/sparc64/compile/RAMDISKU5/Makefile
new file mode 100644
index 00000000000..01b5f23410c
--- /dev/null
+++ b/sys/arch/sparc64/compile/RAMDISKU5/Makefile
@@ -0,0 +1 @@
+.include "../Makefile.inc"
diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64
index 220fb0d6079..48d801f52bd 100644
--- a/sys/arch/sparc64/conf/Makefile.sparc64
+++ b/sys/arch/sparc64/conf/Makefile.sparc64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sparc64,v 1.74 2016/09/24 19:13:03 kettenis Exp $
+# $OpenBSD: Makefile.sparc64,v 1.75 2016/10/14 18:43:02 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -21,7 +21,7 @@ S!= cd ../../../..; pwd
_machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
-INCLUDES= -nostdinc -I$S -I. -I$S/arch
+INCLUDES= -nostdinc -I$S -I${.OBJDIR} -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -MD -MP
CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \
-Wno-main -Wno-uninitialized -Wno-pointer-sign \
@@ -126,6 +126,8 @@ lint:
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
+obj:
+
depend:
@touch $@