summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-04-26 20:50:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-04-26 20:50:18 +0000
commit7d8335af25d63232cdab8f6874bc2b72488d3ca8 (patch)
treee3849c30a7aed831288698c9a98e45d4f9a8ddc8 /sys/arch
parent708629cd0c05ab438fc3b9af3268459de7d4a8e6 (diff)
next unification step: move all MD naming _mach, _machdir, _arch, and _archdir
ok miod drahn
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/conf/Makefile.alpha26
-rw-r--r--sys/arch/amd64/conf/Makefile.amd6426
-rw-r--r--sys/arch/armish/conf/Makefile.armish31
-rw-r--r--sys/arch/aviion/conf/Makefile.aviion17
-rw-r--r--sys/arch/beagle/conf/Makefile.beagle35
-rw-r--r--sys/arch/gumstix/conf/Makefile.gumstix30
-rw-r--r--sys/arch/hp300/conf/Makefile.hp30023
-rw-r--r--sys/arch/hppa/conf/Makefile.hppa25
-rw-r--r--sys/arch/hppa64/conf/Makefile.hppa6422
-rw-r--r--sys/arch/i386/conf/Makefile.i38622
-rw-r--r--sys/arch/landisk/conf/Makefile.landisk21
-rw-r--r--sys/arch/loongson/conf/Makefile.loongson31
-rw-r--r--sys/arch/luna88k/conf/Makefile.luna88k17
-rw-r--r--sys/arch/mac68k/conf/Makefile.mac68k23
-rw-r--r--sys/arch/macppc/conf/Makefile.macppc20
-rw-r--r--sys/arch/moko/conf/Makefile.moko33
-rw-r--r--sys/arch/mvme68k/conf/Makefile.mvme68k25
-rw-r--r--sys/arch/mvme88k/conf/Makefile.mvme88k17
-rw-r--r--sys/arch/mvmeppc/conf/Makefile.mvmeppc20
-rw-r--r--sys/arch/palm/conf/Makefile.palm31
-rw-r--r--sys/arch/sgi/conf/Makefile.sgi31
-rw-r--r--sys/arch/socppc/conf/Makefile.socppc21
-rw-r--r--sys/arch/solbourne/conf/Makefile.solbourne22
-rw-r--r--sys/arch/sparc/conf/Makefile.sparc20
-rw-r--r--sys/arch/sparc64/conf/Makefile.sparc6420
-rw-r--r--sys/arch/vax/conf/Makefile.vax24
-rw-r--r--sys/arch/zaurus/conf/Makefile.zaurus31
27 files changed, 380 insertions, 284 deletions
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha
index 6bd42a9d758..5a1020c2584 100644
--- a/sys/arch/alpha/conf/Makefile.alpha
+++ b/sys/arch/alpha/conf/Makefile.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.alpha,v 1.48 2010/04/26 18:58:29 deraadt Exp $
+# $OpenBSD: Makefile.alpha,v 1.49 2010/04/26 20:50:15 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,7 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-ALPHA= $S/arch/alpha
+
+_mach?= alpha
+_machdir?= $S/arch/alpha
+_arch?= alpha
+_archdir?= $S/arch/alpha
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Dalpha
@@ -46,7 +50,7 @@ CMACHFLAGS+= -fno-stack-protector
COPTS?= -O2
CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -traditional -D_LOCORE
-LINKFLAGS= -T ${ALPHA}/conf/ld.script -X -N -G 4
+LINKFLAGS= -T ${_machdir}/conf/ld.script -X -N -G 4
STRIPFLAGS= -g -x
.if ${IDENT:M-DDDB_STRUCT}
@@ -99,9 +103,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${ALPHA}/alpha/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/alpha/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${ALPHA}/alpha/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_machdir}/alpha/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -142,15 +146,15 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${ALPHA}/alpha/locore.s param.c ioconf.c ${CFILES} ${SFILES}
+SRCS= ${_machdir}/alpha/locore.s param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${ALPHA}/alpha/cpuconf.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/locore.s
- ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/cpuconf.c \
+.depend: ${SRCS} assym.h param.c ${_machdir}/alpha/cpuconf.c ${DB_STRUCTINFO}
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/alpha/locore.s
+ ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} ${_machdir}/alpha/cpuconf.c \
param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${ALPHA}/alpha/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/alpha/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -174,7 +178,7 @@ machdep.o: Makefile
clock.o machdep.o apecs.o cia.o lca.o ioasic.o scc.o icasic.o: Makefile
-locore.o: ${ALPHA}/alpha/locore.s assym.h
+locore.o: ${_machdir}/alpha/locore.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64
index 0c60f1722cc..830323f5cb9 100644
--- a/sys/arch/amd64/conf/Makefile.amd64
+++ b/sys/arch/amd64/conf/Makefile.amd64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.amd64,v 1.22 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.amd64,v 1.23 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,7 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-AMD64= $S/arch/amd64
+
+_mach?= amd64
+_machdir?= $S/arch/amd64
+_arch?= amd64
+_archdir?= $S/arch/amd46
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Damd64 -Dx86_64
@@ -108,9 +112,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${AMD64}/amd64/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/amd64/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${AMD64}/amd64/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_machdir}/amd64/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -151,8 +155,8 @@ links:
sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink makelinks
-AFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S ${AMD64}/amd64/copy.S \
- ${AMD64}/amd64/spl.S
+AFILES= ${_machdir}/amd64/locore.S ${_machdir}/amd64/vector.S ${_machdir}/amd64/copy.S \
+ ${_machdir}/amd64/spl.S
SRCS= param.c ioconf.c ${AFILES} ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
@@ -160,7 +164,7 @@ depend:: .depend
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} ${PARAM} < ${AMD64}/amd64/genassym.cf
+ ${CPPFLAGS} ${PARAM} < ${_machdir}/amd64/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -188,16 +192,16 @@ machdep.o: Makefile
locore.o machdep.o: Makefile
-locore.o: ${AMD64}/amd64/locore.S assym.h
+locore.o: ${_machdir}/amd64/locore.S assym.h
${NORMAL_S}
-vector.o: ${AMD64}/amd64/vector.S assym.h
+vector.o: ${_machdir}/amd64/vector.S assym.h
${NORMAL_S}
-copy.o: ${AMD64}/amd64/copy.S assym.h
+copy.o: ${_machdir}/amd64/copy.S assym.h
${NORMAL_S}
-spl.o: ${AMD64}/amd64/spl.S assym.h
+spl.o: ${_machdir}/amd64/spl.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/armish/conf/Makefile.armish b/sys/arch/armish/conf/Makefile.armish
index 13aa9bbd183..5c3b398ef45 100644
--- a/sys/arch/armish/conf/Makefile.armish
+++ b/sys/arch/armish/conf/Makefile.armish
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.armish,v 1.13 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.armish,v 1.14 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,11 +29,14 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-THISARM= $S/arch/armish
-ARM= $S/arch/arm
+
+_mach?= armish
+_machdir?= $S/arch/armish
+_arch?= arm
+_archdir?= $S/arch/arm
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__armish__
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wno-uninitialized -Wno-format -Wno-main \
-Wstack-larger-than-2047 -Wvariable-decl
@@ -49,7 +52,7 @@ COPTS?= -O2
CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
#LINKFLAGS= -Ttext 0xF0000020 -e start --warn-common
-#LINKFLAGS= -T ${THISARM}/conf/kern.ldscript
+#LINKFLAGS= -T ${_machdir}/conf/kern.ldscript
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -92,11 +95,11 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS}
+SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= rm -f $@
SYSTEM_LD_HEAD+=; \
- cat ${ARM}/conf/ldscript.head ${ARM}/conf/ldscript.tail | \
+ cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
-e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
> ldscript
@@ -120,8 +123,8 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${ARM}/arm/genassym.cf Makefile
- cat ${ARM}/arm/genassym.cf | \
+assym.h: $S/kern/genassym.sh ${_archdir}/arm/genassym.cf Makefile
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} \
${CPPFLAGS} ${PARAM} > assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -164,16 +167,16 @@ links:
sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink makelinks
-SRCS= ${ARM}/arm/locore.S \
+SRCS= ${_archdir}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_archdir}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
- cat ${ARM}/arm/genassym.cf | \
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
${CPPFLAGS}
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
@@ -202,10 +205,10 @@ machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-${BOARDTYPE}_start.o: ${THISARM}/armish/${BOARDTYPE}_start.S assym.h
+${_mach}_start.o: ${_machdir}/${_mach}/${_mach}_start.S assym.h
${NORMAL_S}
-locore.o: ${ARM}/arm/locore.S assym.h
+locore.o: ${_archdir}/arm/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/aviion/conf/Makefile.aviion b/sys/arch/aviion/conf/Makefile.aviion
index c3750fe2fa0..f27b4a05b1f 100644
--- a/sys/arch/aviion/conf/Makefile.aviion
+++ b/sys/arch/aviion/conf/Makefile.aviion
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.aviion,v 1.11 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.aviion,v 1.12 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,8 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-AVIION= $S/arch/aviion
-M88K= $S/arch/m88k
+
+_mach?= aviion
+_machdir?= $S/arch/aviion
+_arch?= m88k
+_archdir?= $S/arch/m88k
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Daviion -Dm88k
@@ -108,9 +111,9 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${M88K}/m88k/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_archdir}/m88k/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${M88K}/m88k/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_archdir}/m88k/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -160,7 +163,7 @@ depend:: .depend
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${M88K}/m88k/genassym.cf
+ ${CPPFLAGS} < ${_archdir}/m88k/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -184,7 +187,7 @@ assym.h machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-locore.o: ${AVIION}/aviion/locore.S assym.h
+locore.o: ${_machdir}/aviion/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/beagle/conf/Makefile.beagle b/sys/arch/beagle/conf/Makefile.beagle
index ee8cb4ca6b5..48c3f0edc5e 100644
--- a/sys/arch/beagle/conf/Makefile.beagle
+++ b/sys/arch/beagle/conf/Makefile.beagle
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.beagle,v 1.7 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.beagle,v 1.8 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,11 +29,14 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-THISARM= $S/arch/${BOARDTYPE}
-ARM= $S/arch/arm
+
+_mach?= beagle
+_machdir?= $S/arch/beagle
+_arch?= arm
+_archdir?= $S/arch/arm
INCLUDES= -nostdinc -I. -I$S/arch -I$S
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${BOARDTYPE}__
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wno-uninitialized -Wno-format -Wno-main
@@ -48,7 +51,7 @@ COPTS?= -O2
CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
#LINKFLAGS= -Ttext 0xF0000020 -e start --warn-common
-#LINKFLAGS= -T ${THISARM}/conf/kern.ldscript
+#LINKFLAGS= -T ${_machdir}/conf/kern.ldscript
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -91,12 +94,12 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS}
+SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= rm -f $@
SYSTEM_LD_HEAD+=; \
- ( cat ${ARM}/conf/ldscript.head ;\
- cat ${ARM}/conf/ldscript.tail ) | \
+ ( cat ${_archdir}/conf/ldscript.head ;\
+ cat ${_archdir}/conf/ldscript.tail ) | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
-e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
> ldscript
@@ -117,8 +120,8 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${ARM}/arm/genassym.cf Makefile
- cat ${ARM}/arm/genassym.cf | \
+assym.h: $S/kern/genassym.sh ${_archdir}/arm/genassym.cf Makefile
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} \
${CPPFLAGS} ${PARAM} > assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -161,16 +164,16 @@ links:
sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink makelinks
-SRCS= ${ARM}/arm/locore.S \
+SRCS= ${_archdir}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_archdir}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
- cat ${ARM}/arm/genassym.cf | \
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
${CPPFLAGS}
@sed -e 's/.*\.o:.* /assym.h: /' < assym.dep >> .depend
@@ -187,7 +190,7 @@ autoconf.o conf.o: Makefile
bsd.rd: bsd
cp bsd bsd.rd
- $S/../distrib/${BOARDTYPE}/ramdisk/rdsetroot < $S/../distrib/${BOARDTYPE}/ramdisk/mr.fs bsd.rd
+ $S/../distrib/${_mach}/ramdisk/rdsetroot < $S/../distrib/${_mach}/ramdisk/mr.fs bsd.rd
bsd.img: bsd.rd
${OBJCOPY} -O binary bsd.rd bsd.img
@@ -208,10 +211,10 @@ machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-${BOARDTYPE}_start.o: ${THISARM}/${BOARDTYPE}/${BOARDTYPE}_start.S assym.h
+${_mach}_start.o: ${_machdir}/${_mach}/${_mach}_start.S assym.h
${NORMAL_S}
-locore.o: ${ARM}/arm/locore.S assym.h
+locore.o: ${_archdir}/arm/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/gumstix/conf/Makefile.gumstix b/sys/arch/gumstix/conf/Makefile.gumstix
index d8611f2e17d..4f003b413c3 100644
--- a/sys/arch/gumstix/conf/Makefile.gumstix
+++ b/sys/arch/gumstix/conf/Makefile.gumstix
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.gumstix,v 1.5 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.gumstix,v 1.6 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,7 +29,13 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-THISARM= $S/arch/gumstix
+
+_mach?= gumstix
+_machdir?= $S/arch/gumstix
+_arch?= arm
+_archdir?= $S/arch/arm
+
+_machdir= $S/arch/gumstix
ARM= $S/arch/arm
INCLUDES= -nostdinc -I. -I$S -I$S/arch
@@ -49,7 +55,7 @@ COPTS?= -O2
CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
#LINKFLAGS= -Ttext 0xF0000020 -e start --warn-common
-#LINKFLAGS= -T ${THISARM}/conf/kern.ldscript
+#LINKFLAGS= -T ${_machdir}/conf/kern.ldscript
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -92,11 +98,11 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS}
+SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= rm -f $@
SYSTEM_LD_HEAD+=; \
- cat ${ARM}/conf/ldscript.head ${ARM}/conf/ldscript.tail | \
+ cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
-e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
> ldscript
@@ -118,8 +124,8 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${ARM}/arm/genassym.cf Makefile
- cat ${ARM}/arm/genassym.cf | \
+assym.h: $S/kern/genassym.sh ${_archdir}/arm/genassym.cf Makefile
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} \
${CPPFLAGS} ${PARAM} > assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -162,16 +168,16 @@ links:
sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink makelinks
-SRCS= ${ARM}/arm/locore.S \
+SRCS= ${_archdir}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_archdir}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
- cat ${ARM}/arm/genassym.cf | \
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
${CPPFLAGS}
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
@@ -200,10 +206,10 @@ machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-${BOARDTYPE}_start.o: ${THISARM}/gumstix/${BOARDTYPE}_start.S assym.h
+${_mach}_start.o: ${_machdir}/gumstix/${_mach}_start.S assym.h
${NORMAL_S}
-locore.o: ${ARM}/arm/locore.S assym.h
+locore.o: ${_archdir}/arm/locore.S assym.h
${NORMAL_S}
diff --git a/sys/arch/hp300/conf/Makefile.hp300 b/sys/arch/hp300/conf/Makefile.hp300
index 153399238f3..c6c462ed755 100644
--- a/sys/arch/hp300/conf/Makefile.hp300
+++ b/sys/arch/hp300/conf/Makefile.hp300
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hp300,v 1.48 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.hp300,v 1.49 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,8 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-HP300= $S/arch/hp300
-M68K= $S/arch/m68k
+
+_mach?= hp300
+_machdir?= $S/arch/hp300
+_arch?= m68k
+_archdir?= $S/arch/m68k
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
@@ -96,7 +99,7 @@ CPPFLAGS+= -DM68K_MMU_MOTOROLA
.endif
### for the Motorola 68040 Floating Point Software Product
-.include "${M68K}/fpsp/Makefile.inc"
+.include "${_archdir}/fpsp/Makefile.inc"
# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
@@ -138,8 +141,8 @@ LINKFLAGS+= -S
%LOAD
assym.h: $S/kern/genassym.sh \
- ${M68K}/m68k/genassym.cf ${HP300}/hp300/genassym.cf Makefile
- cat ${M68K}/m68k/genassym.cf ${HP300}/hp300/genassym.cf | \
+ ${_archdir}/m68k/genassym.cf ${_machdir}/hp300/genassym.cf Makefile
+ cat ${_archdir}/m68k/genassym.cf ${_machdir}/hp300/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
> assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -182,17 +185,17 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${HP300}/hp300/locore.s \
+SRCS= ${_machdir}/hp300/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${HP300}/hp300/locore.s
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/hp300/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
-if test -n "${SFILES}"; then \
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}; \
fi
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${HP300}/hp300/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/hp300/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -215,7 +218,7 @@ assym.h machdep.o: Makefile
dma.o hpux_machdep.o locore.o machdep.o pmap.o pmap_boostrap.o sys_machdep.o trap.o: Makefile
-locore.o: ${HP300}/hp300/locore.s assym.h
+locore.o: ${_machdir}/hp300/locore.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa
index 27215452406..5f82414087d 100644
--- a/sys/arch/hppa/conf/Makefile.hppa
+++ b/sys/arch/hppa/conf/Makefile.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa,v 1.38 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.hppa,v 1.39 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,7 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-HPPA= $S/arch/hppa
+
+_mach?= hppa
+_machdir= $S/arch/hppa
+_arch?= hppa
+_archdir?= $S/arch/hppa
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
@@ -42,7 +46,7 @@ CMACHFLAGS= -mfast-indirect-calls -mportable-runtime -mno-space-regs \
COPTS?= -Os
CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
-LINKFLAGS= -X -T ${HPPA}/conf/ld.script -Ttext 80000 --warn-common
+LINKFLAGS= -X -T ${_machdir}/conf/ld.script -Ttext 80000 --warn-common
STRIPFLAGS= -g -x
.if ${IDENT:M-DDDB} != ""
@@ -59,7 +63,8 @@ CFLAGS+= -mpa-risc-1-1
.if ${IDENT:M-DFPEMUL} != ""
CFLAGS+= -msoft-float -mdisable-fpregs
-.include "${HPPA}/spmath/Makefile.inc"
+HPPA= ${_machdir}
+.include "${_machdir}/spmath/Makefile.inc"
.ifndef PROF
LIBSPMATH= ${SPMATH}
.else
@@ -119,9 +124,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${HPPA}/hppa/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/hppa/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
- < ${HPPA}/hppa/genassym.cf > assym.h.tmp && \
+ < ${_machdir}/hppa/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -162,16 +167,16 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${HPPA}/hppa/locore.S \
+SRCS= ${_machdir}/hppa/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${HPPA}/hppa/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/hppa/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
-if test -n "${SFILES}"; then \
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}; \
fi
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${HPPA}/hppa/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/hppa/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -193,7 +198,7 @@ assym.h machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o trap.o: Makefile
-locore.o: ${HPPA}/hppa/locore.S assym.h
+locore.o: ${_machdir}/hppa/locore.S assym.h
${NORMAL_S}
fpemu.o: assym.h
diff --git a/sys/arch/hppa64/conf/Makefile.hppa64 b/sys/arch/hppa64/conf/Makefile.hppa64
index 41930a7acfe..cc1e8935692 100644
--- a/sys/arch/hppa64/conf/Makefile.hppa64
+++ b/sys/arch/hppa64/conf/Makefile.hppa64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa64,v 1.12 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.hppa64,v 1.13 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,7 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-HPPA= $S/arch/hppa64
+
+_mach?= hppa64
+_machdir?= $S/arch/hppa64
+_arch?= hppa64
+_archdir?= $S/arch/hppa64
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
@@ -42,7 +46,7 @@ CMACHFLAGS= -fno-stack-protector -fno-builtin-log -fno-builtin-printf \
COPTS?= -Os -mpa-risc-2-0 -mno-space-regs -mdisable-fpregs
CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
-LINKFLAGS= -X -T ${HPPA}/conf/ld.script -Ttext 80000 --warn-common
+LINKFLAGS= -X -T ${_machdir}/conf/ld.script -Ttext 80000 --warn-common
STRIPFLAGS= -g -x
.if ${IDENT:M-DDDB} != ""
@@ -100,9 +104,9 @@ LINKFLAGS+= -S
%LOAD
-assym.h: $S/kern/genassym.sh ${HPPA}/hppa64/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/hppa64/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
- < ${HPPA}/hppa64/genassym.cf > assym.h.tmp && \
+ < ${_machdir}/hppa64/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -143,16 +147,16 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${HPPA}/hppa64/locore.S \
+SRCS= ${_machdir}/hppa64/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${HPPA}/hppa64/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/hppa64/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
-if test -n "${SFILES}"; then \
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}; \
fi
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${HPPA}/hppa64/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/hppa64/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -174,7 +178,7 @@ assym.h machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o trap.o: Makefile
-locore.o: ${HPPA}/hppa64/locore.S assym.h
+locore.o: ${_machdir}/hppa64/locore.S assym.h
${NORMAL_S}
fpemu.o: assym.h
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386
index 57d15b77790..83cacdc8924 100644
--- a/sys/arch/i386/conf/Makefile.i386
+++ b/sys/arch/i386/conf/Makefile.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.i386,v 1.55 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.i386,v 1.56 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,10 +29,14 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-I386= $S/arch/i386
+
+_mach?= i386
+_machdir?= $S/arch/i386
+_arch?= i386
+_archdir?= $S/arch/i386
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Di386
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D${_mach}
CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wno-uninitialized -Wno-format -Wno-main \
-Wstack-larger-than-2047
@@ -112,9 +116,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${I386}/i386/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/i386/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${I386}/i386/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_machdir}/i386/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -155,15 +159,15 @@ links:
sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink makelinks
-SRCS= ${I386}/i386/locore.s \
+SRCS= ${_machdir}/i386/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${I386}/i386/locore.s
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/i386/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${I386}/i386/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/i386/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -191,7 +195,7 @@ machdep.o: Makefile
locore.o machdep.o: Makefile
-locore.o: ${I386}/i386/locore.s assym.h
+locore.o: ${_machdir}/i386/locore.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk
index c7979f54d41..fcc8947083a 100644
--- a/sys/arch/landisk/conf/Makefile.landisk
+++ b/sys/arch/landisk/conf/Makefile.landisk
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.landisk,v 1.13 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.landisk,v 1.14 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -31,8 +31,11 @@ SIZE?= size
.ifndef S
S!= cd ../../../..; pwd
.endif
-LANDISK= $S/arch/landisk
-SH= $S/arch/sh
+
+_mach?= landisk
+_machdir?= $S/arch/landisk
+_arch?= sh
+_archdir?= $S/arch/sh
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dlandisk
@@ -108,8 +111,8 @@ LINKFLAGS+= -S -x
%LOAD
assym.h: $S/kern/genassym.sh \
- ${SH}/sh/genassym.cf Makefile
- cat ${SH}/sh/genassym.cf | \
+ ${_archdir}/sh/genassym.cf Makefile
+ cat ${_archdir}/sh/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
> assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -151,16 +154,16 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${LANDISK}/landisk/locore.S \
+SRCS= ${_machdir}/landisk/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${LANDISK}/landisk/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/landisk/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
- cat ${SH}/sh/genassym.cf | \
+ cat ${_archdir}/sh/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} ${CPPFLAGS}
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@@ -183,7 +186,7 @@ assym.h machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-locore.o: ${LANDISK}/landisk/locore.S assym.h
+locore.o: ${_machdir}/landisk/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson
index 4a320dd8ba9..7c44fa3c5a2 100644
--- a/sys/arch/loongson/conf/Makefile.loongson
+++ b/sys/arch/loongson/conf/Makefile.loongson
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.loongson,v 1.4 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.loongson,v 1.5 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config ``machineid''
@@ -39,11 +39,14 @@ LD+=${ENDIAN}
.ifndef S
S!= cd ../../../..; pwd
.endif
-LOONGSON=$S/arch/loongson
-MIPS64= $S/arch/mips64
+
+_mach?= loongson
+_machdir?= $S/arch/loongson
+_arch?= mips64
+_archdir?= $S/arch/mips64
INCLUDES= -I. -I$S -I$S/arch -nostdinc
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__loongson__
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
CDIAGFLAGS= -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
-Wno-uninitialized -Wno-format -Wno-main \
-Wstack-larger-than-2047 -Wvariable-decl
@@ -82,9 +85,9 @@ SYSTEM_LD= @if [ X${DEBUG} = X-g ]; \
then strip=-X; \
else strip=-x; \
fi; \
- echo ${LD} $$strip -o $@ -e start -T ${LOONGSON}/conf/ld.script \
+ echo ${LD} $$strip -o $@ -e start -T ${_machdir}/conf/ld.script \
-Ttext=${LINK_ADDRESS} '$${SYSTEM_OBJ}' vers.o; \
- ${LD} $$strip -o $@ -e start -T ${LOONGSON}/conf/ld.script \
+ ${LD} $$strip -o $@ -e start -T ${_machdir}/conf/ld.script \
-Ttext=${LINK_ADDRESS} ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= chmod 755 $@; \
${SIZE} $@
@@ -107,11 +110,11 @@ lint: /tmp param.c
@lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
${CFILES} ioconf.c param.c
-symbols.sort: ${LOONGSON}/loongson/symbols.raw
- grep -v '^#' ${LOONGSON}/loongson/symbols.raw \
+symbols.sort: ${_machdir}/loongson/symbols.raw
+ grep -v '^#' ${_machdir}/loongson/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
-locore.o: ${LOONGSON}/loongson/locore.S assym.h
+locore.o: ${_machdir}/loongson/locore.S assym.h
${NORMAL_S}
# the following are necessary because the files depend on the types of
@@ -126,8 +129,8 @@ ip_input.o ip_output.o in_pcb.o in_proto.o: Makefile
tcp_subr.o tcp_timer.o tcp_output.o: Makefile
assym.h: $S/kern/genassym.sh \
- ${MIPS64}/mips64/genassym.cf ${LOONGSON}/loongson/genassym.cf Makefile
- cat ${MIPS64}/mips64/genassym.cf ${LOONGSON}/loongson/genassym.cf | \
+ ${_archdir}/mips64/genassym.cf ${_machdir}/loongson/genassym.cf Makefile
+ cat ${_archdir}/mips64/genassym.cf ${_machdir}/loongson/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PARAM} \
> assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -160,14 +163,14 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
sh $S/conf/newvers.sh
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
-SRCS= ${LOONGSON}/loongson/locore.S \
+SRCS= ${_machdir}/loongson/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${LOONGSON}/loongson/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/loongson/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
- cat ${MIPS64}/mips64/genassym.cf ${LOONGSON}/loongson/genassym.cf | \
+ cat ${_archdir}/mips64/genassym.cf ${_machdir}/loongson/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} ${CPPFLAGS}
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k
index 71247caa976..bb797daf7f0 100644
--- a/sys/arch/luna88k/conf/Makefile.luna88k
+++ b/sys/arch/luna88k/conf/Makefile.luna88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.luna88k,v 1.17 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.luna88k,v 1.18 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,8 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-LUNA88K= $S/arch/luna88k
-M88K= $S/arch/m88k
+
+_mach?= luna88k
+_machdir?= $S/arch/luna88k
+_arch?= m88k
+_archdir?= $S/arch/m88k
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Dluna88k -Dm88k
@@ -104,9 +107,9 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${M88K}/m88k/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_archdir}/m88k/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${M88K}/m88k/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_archdir}/m88k/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -156,7 +159,7 @@ depend:: .depend
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${M88K}/m88k/genassym.cf
+ ${CPPFLAGS} < ${_archdir}/m88k/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -180,7 +183,7 @@ assym.h machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-locore.o: ${LUNA88K}/luna88k/locore.S assym.h
+locore.o: ${_machdir}/luna88k/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/mac68k/conf/Makefile.mac68k b/sys/arch/mac68k/conf/Makefile.mac68k
index 4ace0375f0c..b1cd392edc0 100644
--- a/sys/arch/mac68k/conf/Makefile.mac68k
+++ b/sys/arch/mac68k/conf/Makefile.mac68k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mac68k,v 1.45 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.mac68k,v 1.46 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,8 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-MAC68K= $S/arch/mac68k
-M68K= $S/arch/m68k
+
+_mach?= mac68k
+_machdir?= $S/arch/mac68k
+_arch?= m68k
+_archdir?= $S/arch/m68k
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
@@ -59,7 +62,7 @@ HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
### for the Motorola 68040 Floating Point Software Product
-.include "${M68K}/fpsp/Makefile.inc"
+.include "${_archdir}/fpsp/Makefile.inc"
# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
# where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix,
@@ -109,8 +112,8 @@ LINKFLAGS+= -S
%LOAD
assym.h: $S/kern/genassym.sh \
- ${M68K}/m68k/genassym.cf ${MAC68K}/mac68k/genassym.cf Makefile
- cat ${M68K}/m68k/genassym.cf ${MAC68K}/mac68k/genassym.cf | \
+ ${_archdir}/m68k/genassym.cf ${_machdir}/mac68k/genassym.cf Makefile
+ cat ${_archdir}/m68k/genassym.cf ${_machdir}/mac68k/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
> assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -153,18 +156,18 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${MAC68K}/mac68k/locore.s \
+SRCS= ${_machdir}/mac68k/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${MAC68K}/mac68k/locore.s
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/mac68k/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
-if test -n "${SFILES}"; then \
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}; \
fi
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${MAC68K}/mac68k/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/mac68k/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -188,7 +191,7 @@ assym.h machdep.o: Makefile
locore.o pmap.o trap.o: Makefile
-locore.o: ${MAC68K}/mac68k/locore.s assym.h
+locore.o: ${_machdir}/mac68k/locore.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc
index def562f4c75..bf0530dc187 100644
--- a/sys/arch/macppc/conf/Makefile.macppc
+++ b/sys/arch/macppc/conf/Makefile.macppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.macppc,v 1.34 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.macppc,v 1.35 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -31,7 +31,11 @@ SIZE?= size
.ifndef S
S!= cd ../../../..; pwd
.endif
-MACPPC= $S/arch/macppc
+
+_mach?= macppc
+_machdir?= $S/arch/macppc
+_arch?= powerpc
+_archdir?= $S/arch/powerpc
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL \
@@ -106,9 +110,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${MACPPC}/macppc/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/macppc/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- < ${MACPPC}/macppc/genassym.cf > assym.h.tmp && \
+ < ${_machdir}/macppc/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -148,17 +152,17 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${MACPPC}/macppc/locore.S \
+SRCS= ${_machdir}/macppc/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${MACPPC}/macppc/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/macppc/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${MACPPC}/macppc/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/macppc/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -181,7 +185,7 @@ genassym.o machdep.o: Makefile
locore.o machdep.o: Makefile
-locore.o: ${MACPPC}/macppc/locore.S assym.h
+locore.o: ${_machdir}/macppc/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/moko/conf/Makefile.moko b/sys/arch/moko/conf/Makefile.moko
index 37f6956e2a1..e1d06016f47 100644
--- a/sys/arch/moko/conf/Makefile.moko
+++ b/sys/arch/moko/conf/Makefile.moko
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.moko,v 1.5 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.moko,v 1.6 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,11 +29,14 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-THISARM= $S/arch/moko
-ARM= $S/arch/arm
+
+_mach?= moko
+_machdir?= $S/arch/moko
+_arch?= arm
+_archdir?= $S/arch/arm
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__moko__
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wno-uninitialized -Wno-format -Wno-main \
-Wstack-larger-than-2047 -Wvariable-decl
@@ -49,7 +52,7 @@ COPTS?= -O2
CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
#LINKFLAGS= -Ttext 0xF0000020 -e start --warn-common
-#LINKFLAGS= -T ${THISARM}/conf/kern.ldscript
+#LINKFLAGS= -T ${_machdir}/conf/kern.ldscript
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -92,11 +95,11 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS}
+SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= rm -f $@
SYSTEM_LD_HEAD+=; \
- cat ${ARM}/conf/ldscript.head ${ARM}/conf/ldscript.tail | \
+ cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
-e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
> ldscript
@@ -118,8 +121,8 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${ARM}/arm/genassym.cf Makefile
- cat ${ARM}/arm/genassym.cf | \
+assym.h: $S/kern/genassym.sh ${_archdir}/arm/genassym.cf Makefile
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} \
${CPPFLAGS} ${PARAM} > assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -162,16 +165,16 @@ links:
sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink makelinks
-SRCS= ${ARM}/arm/locore.S \
+SRCS= ${_archdir}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_archdir}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
- cat ${ARM}/arm/genassym.cf | \
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
${CPPFLAGS}
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
@@ -200,15 +203,15 @@ machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-${BOARDTYPE}_start.o: ${THISARM}/moko/${BOARDTYPE}_start.S assym.h
+${_mach}_start.o: ${_machdir}/${_mach}/${_mach}_start.S assym.h
${NORMAL_S}
-locore.o: ${ARM}/arm/locore.S assym.h
+locore.o: ${_archdir}/arm/locore.S assym.h
${NORMAL_S}
bsd.rd: bsd
cp bsd bsd.rd
- $S/../distrib/${BOARDTYPE}/ramdisk/rdsetroot < $S/../distrib/${BOARDTYPE}/ramdisk/mr.fs bsd.rd
+ $S/../distrib/${_mach}/ramdisk/rdsetroot < $S/../distrib/${_mach}/ramdisk/mr.fs bsd.rd
bsd.img: bsd.rd
${OBJCOPY} -O binary bsd.rd bsd.i
diff --git a/sys/arch/mvme68k/conf/Makefile.mvme68k b/sys/arch/mvme68k/conf/Makefile.mvme68k
index b169ae63aa8..88ea2103c3b 100644
--- a/sys/arch/mvme68k/conf/Makefile.mvme68k
+++ b/sys/arch/mvme68k/conf/Makefile.mvme68k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvme68k,v 1.37 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.mvme68k,v 1.38 2010/04/26 20:50:16 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,8 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-MVME68K=$S/arch/mvme68k
-M68K= $S/arch/m68k
+
+_mach?= mvme68k
+_machdir?= $S/arch/mvme68k
+_arch?= m68k
+_archdir?= $S/arch/m68k
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
@@ -61,10 +64,10 @@ HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
### for the Motorola 68040 Floating Point Software Product
-.include "${M68K}/fpsp/Makefile.inc"
+.include "${_archdir}/fpsp/Makefile.inc"
### for the Motorola 68060 Support Package
-.include "${M68K}/060sp/Makefile.inc"
+.include "${_archdir}/060sp/Makefile.inc"
# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
@@ -106,8 +109,8 @@ LINKFLAGS+= -S
%LOAD
assym.h: $S/kern/genassym.sh \
- ${M68K}/m68k/genassym.cf ${MVME68K}/mvme68k/genassym.cf Makefile
- cat ${M68K}/m68k/genassym.cf ${MVME68K}/mvme68k/genassym.cf | \
+ ${_archdir}/m68k/genassym.cf ${_machdir}/mvme68k/genassym.cf Makefile
+ cat ${_archdir}/m68k/genassym.cf ${_machdir}/mvme68k/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
> assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -151,15 +154,15 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${MVME68K}/mvme68k/locore.s \
+SRCS= ${_machdir}/mvme68k/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${MVME68K}/mvme68k/locore.s
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/mvme68k/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${MVME68K}/mvme68k/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/mvme68k/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -184,7 +187,7 @@ assym.h machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-locore.o: ${MVME68K}/mvme68k/locore.s assym.h
+locore.o: ${_machdir}/mvme68k/locore.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/mvme88k/conf/Makefile.mvme88k b/sys/arch/mvme88k/conf/Makefile.mvme88k
index d267efd271e..e401ad6880f 100644
--- a/sys/arch/mvme88k/conf/Makefile.mvme88k
+++ b/sys/arch/mvme88k/conf/Makefile.mvme88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvme88k,v 1.48 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.mvme88k,v 1.49 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,8 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-MVME88K= $S/arch/mvme88k
-M88K= $S/arch/m88k
+
+_mach?= mvme88k
+_machdir?= $S/arch/mvme88k
+_arch?= m88k
+_archdir?= $S/arch/m88k
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Dmvme88k -Dm88k
@@ -107,9 +110,9 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${M88K}/m88k/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_archdir}/m88k/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${M88K}/m88k/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_archdir}/m88k/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -159,7 +162,7 @@ depend:: .depend
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${M88K}/m88k/genassym.cf
+ ${CPPFLAGS} < ${_archdir}/m88k/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -183,7 +186,7 @@ assym.h machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-locore.o: ${MVME88K}/mvme88k/locore.S assym.h
+locore.o: ${_machdir}/mvme88k/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/mvmeppc/conf/Makefile.mvmeppc b/sys/arch/mvmeppc/conf/Makefile.mvmeppc
index 139ddb5e5c8..5235b8c9623 100644
--- a/sys/arch/mvmeppc/conf/Makefile.mvmeppc
+++ b/sys/arch/mvmeppc/conf/Makefile.mvmeppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvmeppc,v 1.32 2010/04/26 18:58:30 deraadt Exp $
+# $OpenBSD: Makefile.mvmeppc,v 1.33 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -32,7 +32,11 @@ SIZE?= size
.ifndef S
S!= cd ../../../..; pwd
.endif
-MVMEPPC= $S/arch/mvmeppc
+
+_mach?= mvmeppc
+_machdir?= $S/arch/mvmeppc
+_arch?= powerpc
+_archdir?= $S/arch/powerpc
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL \
@@ -107,9 +111,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${MVMEPPC}/mvmeppc/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/mvmeppc/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- < ${MVMEPPC}/mvmeppc/genassym.cf > assym.h.tmp && \
+ < ${_machdir}/mvmeppc/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -149,17 +153,17 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${MVMEPPC}/mvmeppc/locore.S \
+SRCS= ${_machdir}/mvmeppc/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${MVMEPPC}/mvmeppc/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/mvmeppc/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${MVMEPPC}/mvmeppc/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/mvmeppc/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -182,7 +186,7 @@ genassym.o machdep.o: Makefile
locore.o machdep.o: Makefile
-locore.o: ${MVMEPPC}/mvmeppc/locore.S assym.h
+locore.o: ${_machdir}/mvmeppc/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/palm/conf/Makefile.palm b/sys/arch/palm/conf/Makefile.palm
index 01785f17fe9..901b2452dac 100644
--- a/sys/arch/palm/conf/Makefile.palm
+++ b/sys/arch/palm/conf/Makefile.palm
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.palm,v 1.3 2010/04/26 18:58:31 deraadt Exp $
+# $OpenBSD: Makefile.palm,v 1.4 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,11 +29,14 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-THISARM= $S/arch/palm
-ARM= $S/arch/arm
+
+_mach?= palm
+_machdir?= $S/arch/palm
+_arch?= arm
+_archdir?= $S/arch/arm
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__palm__
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wno-uninitialized -Wno-format -Wno-main \
-Wstack-larger-than-2047 -Wvariable-decl
@@ -49,7 +52,7 @@ COPTS?= -O2
CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
#LINKFLAGS= -Ttext 0xF0000020 -e start --warn-common
-#LINKFLAGS= -T ${THISARM}/conf/kern.ldscript
+#LINKFLAGS= -T ${_machdir}/conf/kern.ldscript
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -86,11 +89,11 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS}
+SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= rm -f $@
SYSTEM_LD_HEAD+=; \
- cat ${ARM}/conf/ldscript.head ${ARM}/conf/ldscript.tail | \
+ cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
-e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
> ldscript
@@ -112,8 +115,8 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${ARM}/arm/genassym.cf Makefile
- cat ${ARM}/arm/genassym.cf | \
+assym.h: $S/kern/genassym.sh ${_archdir}/arm/genassym.cf Makefile
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} \
${CPPFLAGS} ${PARAM} > assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -156,16 +159,16 @@ links:
sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink makelinks
-SRCS= ${ARM}/arm/locore.S \
+SRCS= ${_archdir}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${APMINC}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_archdir}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
- cat ${ARM}/arm/genassym.cf | \
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
${CPPFLAGS}
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
@@ -189,10 +192,10 @@ machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-${BOARDTYPE}_start.o: ${THISARM}/palm/${BOARDTYPE}_start.S assym.h
+${_mach}_start.o: ${_machdir}/${_mach}/${_mach}_start.S assym.h
${NORMAL_S}
-locore.o: ${ARM}/arm/locore.S assym.h
+locore.o: ${_archdir}/arm/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi
index 70d5d13407f..639c288379d 100644
--- a/sys/arch/sgi/conf/Makefile.sgi
+++ b/sys/arch/sgi/conf/Makefile.sgi
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sgi,v 1.27 2010/04/26 18:58:31 deraadt Exp $
+# $OpenBSD: Makefile.sgi,v 1.28 2010/04/26 20:50:17 deraadt Exp $
# Makefile for OpenBSD
#
@@ -41,11 +41,14 @@ LD+=${ENDIAN}
.ifndef S
S!= cd ../../../..; pwd
.endif
-SGI=$S/arch/sgi
-MIPS64= $S/arch/mips64
+
+_mach?= sgi
+_machdir?= $S/arch/sgi
+_arch?= mips64
+_archdir?= $S/arch/mips64
INCLUDES= -I. -I$S -I$S/arch -nostdinc
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__sgi__
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
CDIAGFLAGS= -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
-Wno-uninitialized -Wno-format -Wno-main \
-Wstack-larger-than-2047 -Wvariable-decl
@@ -89,9 +92,9 @@ SYSTEM_LD= @if [ X${DEBUG} = X-g ]; \
then strip=-X; \
else strip=-x; \
fi; \
- echo ${LD} $$strip -o $@ -e start -T ${SGI}/conf/ld.script \
+ echo ${LD} $$strip -o $@ -e start -T ${_machdir}/conf/ld.script \
-Ttext=${LINK_ADDRESS} '$${SYSTEM_OBJ}' vers.o; \
- ${LD} $$strip -o $@ -e start -T ${SGI}/conf/ld.script \
+ ${LD} $$strip -o $@ -e start -T ${_machdir}/conf/ld.script \
-Ttext=${LINK_ADDRESS} ${SYSTEM_OBJ} vers.o
#
SYSTEM_LD_TAIL= chmod 755 $@; \
@@ -115,11 +118,11 @@ lint: /tmp param.c
@lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
${CFILES} ioconf.c param.c
-symbols.sort: ${SGI}/sgi/symbols.raw
- grep -v '^#' ${SGI}/sgi/symbols.raw \
+symbols.sort: ${_machdir}/sgi/symbols.raw
+ grep -v '^#' ${_machdir}/sgi/symbols.raw \
| sed 's/^ //' | sort -u > symbols.sort
-locore.o: ${SGI}/sgi/locore.S assym.h
+locore.o: ${_machdir}/sgi/locore.S assym.h
${NORMAL_S}
# the following are necessary because the files depend on the types of
@@ -134,8 +137,8 @@ ip_input.o ip_output.o in_pcb.o in_proto.o: Makefile
tcp_subr.o tcp_timer.o tcp_output.o: Makefile
assym.h: $S/kern/genassym.sh \
- ${MIPS64}/mips64/genassym.cf ${SGI}/sgi/genassym.cf Makefile
- cat ${MIPS64}/mips64/genassym.cf ${SGI}/sgi/genassym.cf | \
+ ${_archdir}/mips64/genassym.cf ${_machdir}/sgi/genassym.cf Makefile
+ cat ${_archdir}/mips64/genassym.cf ${_machdir}/sgi/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PARAM} \
> assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -168,14 +171,14 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
sh $S/conf/newvers.sh
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
-SRCS= ${SGI}/sgi/locore.S \
+SRCS= ${_machdir}/sgi/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SGI}/sgi/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/sgi/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
- cat ${MIPS64}/mips64/genassym.cf ${SGI}/sgi/genassym.cf | \
+ cat ${_archdir}/mips64/genassym.cf ${_machdir}/sgi/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} ${CPPFLAGS}
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc
index 30eea025361..d342bb138e3 100644
--- a/sys/arch/socppc/conf/Makefile.socppc
+++ b/sys/arch/socppc/conf/Makefile.socppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.socppc,v 1.6 2010/04/26 18:58:31 deraadt Exp $
+# $OpenBSD: Makefile.socppc,v 1.7 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -32,7 +32,11 @@ SIZE?= size
.ifndef S
S!= cd ../../../..; pwd
.endif
-SOCPPC= $S/arch/socppc
+
+_mach?= socppc
+_machdir?= $S/arch/socppc
+_arch?= powerpc
+_archdir?= $S/arch/powerpc
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL \
@@ -107,9 +111,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${SOCPPC}/socppc/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/socppc/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- < ${SOCPPC}/socppc/genassym.cf > assym.h.tmp && \
+ < ${_machdir}/socppc/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -149,17 +153,17 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${SOCPPC}/socppc/locore.S \
+SRCS= ${_machdir}/socppc/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SOCPPC}/socppc/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/socppc/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${SOCPPC}/socppc/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/socppc/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -181,8 +185,7 @@ genassym.o machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-
-locore.o: ${SOCPPC}/socppc/locore.S assym.h
+locore.o: ${_machdir}/socppc/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/solbourne/conf/Makefile.solbourne b/sys/arch/solbourne/conf/Makefile.solbourne
index 70145bba2a2..67510d783f7 100644
--- a/sys/arch/solbourne/conf/Makefile.solbourne
+++ b/sys/arch/solbourne/conf/Makefile.solbourne
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.solbourne,v 1.13 2010/04/26 18:58:31 deraadt Exp $
+# $OpenBSD: Makefile.solbourne,v 1.14 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,7 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-SOLBOURNE= $S/arch/solbourne
+
+_mach?= solbourne
+_machdir?= $S/arch/solbourne
+_arch?= solbourne
+_archdir?= $S/arch/solbourne
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dsparc -Dsolbourne
@@ -47,7 +51,7 @@ CFLAGS= ${DEBUG} -O2 ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
# add `-mno-fpu' to work around gcc (last noticed in v2.7.2) bug
CFLAGS+= -mno-fpu
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
-LINKFLAGS= -N -e start -T ${SOLBOURNE}/conf/ld.script -Ttext FD084000
+LINKFLAGS= -N -e start -T ${_machdir}/conf/ld.script -Ttext FD084000
STRIPFLAGS= -g -X -x
.if ${IDENT:M-DDDB_STRUCT}
@@ -108,9 +112,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${SOLBOURNE}/solbourne/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/solbourne/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${SOLBOURNE}/solbourne/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_machdir}/solbourne/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -151,17 +155,17 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${SOLBOURNE}/solbourne/locore.s \
+SRCS= ${_machdir}/solbourne/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SOLBOURNE}/solbourne/locore.s
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/solbourne/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${SOLBOURNE}/solbourne/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/solbourne/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -172,7 +176,7 @@ db_structinfo.h: $S/ddb/db_structinfo.c $S/ddb/parse_structinfo.awk
rm -f db_structinfo.o
-locore.o: ${SOLBOURNE}/solbourne/locore.s assym.h
+locore.o: ${_machdir}/solbourne/locore.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/sparc/conf/Makefile.sparc b/sys/arch/sparc/conf/Makefile.sparc
index d9f3df546ac..8239fcaa0cf 100644
--- a/sys/arch/sparc/conf/Makefile.sparc
+++ b/sys/arch/sparc/conf/Makefile.sparc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sparc,v 1.49 2010/04/26 18:58:31 deraadt Exp $
+# $OpenBSD: Makefile.sparc,v 1.50 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,7 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-SPARC= $S/arch/sparc
+
+_mach?= sparc
+_machdir?= $S/arch/sparc
+_arch?= sparc
+_archdir?= $S/arch/sparc
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dsparc
@@ -113,9 +117,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${SPARC}/sparc/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/sparc/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${SPARC}/sparc/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_machdir}/sparc/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -156,17 +160,17 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${SPARC}/sparc/locore.s \
+SRCS= ${_machdir}/sparc/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SPARC}/sparc/locore.s
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/sparc/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${SPARC}/sparc/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/sparc/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -191,7 +195,7 @@ bwtwo.o cgsix.o cgthree.o cgtwo.o cons.o dma.o esp.o fb.o if_ie.o: Makefile
ms.c obio.o zs.c autoconf.o clock.o cpu.o disksubr.o locore.o: Makefile
machdep.o mem.o openprom.o pmap.o vm_machdep.o: Makefile
-locore.o: ${SPARC}/sparc/locore.s assym.h
+locore.o: ${_machdir}/sparc/locore.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64
index 0335924bc0f..b4d7b7371cf 100644
--- a/sys/arch/sparc64/conf/Makefile.sparc64
+++ b/sys/arch/sparc64/conf/Makefile.sparc64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sparc64,v 1.35 2010/04/26 18:58:31 deraadt Exp $
+# $OpenBSD: Makefile.sparc64,v 1.36 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,7 +29,11 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-SPARC64= $S/arch/sparc64
+
+_mach?= sparc64
+_machdir?= $S/arch/sparc64
+_arch?= sparc64
+_archdir?= $S/arch/sparc64
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL
@@ -106,9 +110,9 @@ LINKFLAGS+= -S -x
%LOAD
-assym.h: $S/kern/genassym.sh ${SPARC64}/sparc64/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/sparc64/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
- ${PARAM} < ${SPARC64}/sparc64/genassym.cf > assym.h.tmp && \
+ ${PARAM} < ${_machdir}/sparc64/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -149,17 +153,17 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${SPARC64}/sparc64/locore.s \
+SRCS= ${_machdir}/sparc64/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SPARC64}/sparc64/locore.s
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/sparc64/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${SPARC64}/sparc64/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/sparc64/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -169,7 +173,7 @@ db_structinfo.h: $S/ddb/db_structinfo.c $S/ddb/parse_structinfo.awk
objdump -g db_structinfo.o | awk -f $S/ddb/parse_structinfo.awk > $@
rm -f db_structinfo.o
-locore.o: ${SPARC64}/sparc64/locore.s assym.h
+locore.o: ${_machdir}/sparc64/locore.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax
index ca905a4d063..7a5a4402a5a 100644
--- a/sys/arch/vax/conf/Makefile.vax
+++ b/sys/arch/vax/conf/Makefile.vax
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.vax,v 1.36 2010/04/26 18:58:31 deraadt Exp $
+# $OpenBSD: Makefile.vax,v 1.37 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -57,7 +57,11 @@ COPTS?= -O2
.ifndef S
S!= cd ../../../..; pwd
.endif
-VAX= $S/arch/vax
+
+_mach?= vax
+_machdir?= $S/arch/vax
+_arch?= vax
+_archdir?= $S/arch/vax
INCLUDES= -I. -I$S -I$S/arch -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
@@ -119,9 +123,9 @@ LINKFLAGS+= -S
%LOAD
-assym.h: $S/kern/genassym.sh ${VAX}/vax/genassym.cf Makefile
+assym.h: $S/kern/genassym.sh ${_machdir}/vax/genassym.cf Makefile
sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
- < ${VAX}/vax/genassym.cf > assym.h.tmp && \
+ < ${_machdir}/vax/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
@@ -148,7 +152,7 @@ cleankernel:
lint:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
- ${VAX}/vax/Locore.c ${CFILES} \
+ ${_machdir}/vax/Locore.c ${CFILES} \
ioconf.c param.c | \
grep -v 'static function .* unused'
@@ -163,16 +167,16 @@ links:
sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-SRCS= ${VAX}/vax/intvec.s ${VAX}/vax/subr.s \
+SRCS= ${_machdir}/vax/intvec.s ${_machdir}/vax/subr.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${VAX}/vax/intvec.s ${VAX}/vax/subr.s
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_machdir}/vax/intvec.s ${_machdir}/vax/subr.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
- ${CPPFLAGS} < ${VAX}/vax/genassym.cf
+ ${CPPFLAGS} < ${_machdir}/vax/genassym.cf
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
< assym.dep >> .depend
@rm -f assym.dep
@@ -197,10 +201,10 @@ tmscp.o ts.o uba.o uda.o autoconf.o clock.o conf.o emulate.o intvec.o: Makefile
machdep.o sbi.o subr.o: Makefile
-intvec.o: ${VAX}/vax/intvec.s assym.h
+intvec.o: ${_machdir}/vax/intvec.s assym.h
${NORMAL_S}
-subr.o: ${VAX}/vax/subr.s assym.h
+subr.o: ${_machdir}/vax/subr.s assym.h
${NORMAL_S}
# The install target can be redefined by putting a
diff --git a/sys/arch/zaurus/conf/Makefile.zaurus b/sys/arch/zaurus/conf/Makefile.zaurus
index 44df1aa2c8c..a529ba6914a 100644
--- a/sys/arch/zaurus/conf/Makefile.zaurus
+++ b/sys/arch/zaurus/conf/Makefile.zaurus
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.zaurus,v 1.16 2010/04/26 18:58:31 deraadt Exp $
+# $OpenBSD: Makefile.zaurus,v 1.17 2010/04/26 20:50:17 deraadt Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -29,11 +29,14 @@ STRIP?= strip
.ifndef S
S!= cd ../../../..; pwd
.endif
-THISARM= $S/arch/zaurus
-ARM= $S/arch/arm
+
+_mach?= zaurus
+_machdir?= $S/arch/zaurus
+_arch?= arm
+_archdir?= $S/arch/arm
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__zaurus__
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wno-uninitialized -Wno-format -Wno-main \
-Wstack-larger-than-2047 -Wvariable-decl
@@ -49,7 +52,7 @@ COPTS?= -O2
CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
#LINKFLAGS= -Ttext 0xF0000020 -e start --warn-common
-#LINKFLAGS= -T ${THISARM}/conf/kern.ldscript
+#LINKFLAGS= -T ${_machdir}/conf/kern.ldscript
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -92,11 +95,11 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS}
+SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= rm -f $@
SYSTEM_LD_HEAD+=; \
- cat ${ARM}/conf/ldscript.head ${ARM}/conf/ldscript.tail | \
+ cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
-e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \
> ldscript
@@ -118,8 +121,8 @@ LINKFLAGS+= -x
%LOAD
-assym.h: $S/kern/genassym.sh ${ARM}/arm/genassym.cf Makefile
- cat ${ARM}/arm/genassym.cf | \
+assym.h: $S/kern/genassym.sh ${_archdir}/arm/genassym.cf Makefile
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${CC} ${CFLAGS} \
${CPPFLAGS} ${PARAM} > assym.h.tmp && \
mv -f assym.h.tmp assym.h
@@ -162,16 +165,16 @@ links:
sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink makelinks
-SRCS= ${ARM}/arm/locore.S \
+SRCS= ${_archdir}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
- ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_archdir}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
.endif
- cat ${ARM}/arm/genassym.cf | \
+ cat ${_archdir}/arm/genassym.cf | \
sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
${CPPFLAGS}
@sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \
@@ -200,10 +203,10 @@ machdep.o: Makefile
# depend on CPU configuration
locore.o machdep.o: Makefile
-${BOARDTYPE}_start.o: ${THISARM}/zaurus/${BOARDTYPE}_start.S assym.h
+${_mach}_start.o: ${_machdir}/${_mach}/${_mach}_start.S assym.h
${NORMAL_S}
-locore.o: ${ARM}/arm/locore.S assym.h
+locore.o: ${_archdir}/arm/locore.S assym.h
${NORMAL_S}
# The install target can be redefined by putting a