summaryrefslogtreecommitdiff
path: root/sys/arch/beagle
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/beagle
parent708629cd0c05ab438fc3b9af3268459de7d4a8e6 (diff)
next unification step: move all MD naming _mach, _machdir, _arch, and _archdir
ok miod drahn
Diffstat (limited to 'sys/arch/beagle')
-rw-r--r--sys/arch/beagle/conf/Makefile.beagle35
1 files changed, 19 insertions, 16 deletions
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