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