diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-05-17 10:22:47 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-05-17 10:22:47 +0000 |
commit | 1ea026fde43f68470d3fe6f689b4adaf64415849 (patch) | |
tree | 8f98a8c06141275758d98a0c05381981343dacbd /sys/arch | |
parent | 0af9377b7c6f00b1cd78f9790ff53cd26a941f2b (diff) |
Automatically detect cross-compilation case. If you have an i386
(well that is the only tested host environment for the time being)
and would like to test the support, do this:
cd /usr/src
make TARGET=vax
cd sys/arch/vax/conf
config MYKERNEL
cd ../compile/MYKERNEL
make
and you should get a nicely compiled vax kernel. This is WIP, so do not
expect robustness quite yet.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/vax/conf/Makefile.vax | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax index 16bba7212fa..5a9ef8a4778 100644 --- a/sys/arch/vax/conf/Makefile.vax +++ b/sys/arch/vax/conf/Makefile.vax @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.vax,v 1.10 1998/05/11 16:35:07 niklas Exp $ +# $OpenBSD: Makefile.vax,v 1.11 1998/05/17 10:22:46 niklas Exp $ # $NetBSD: Makefile.vax,v 1.32 1997/03/14 23:27:35 mycroft Exp $ # Makefile for OpenBSD @@ -22,7 +22,18 @@ # DEBUG is set to -g if debugging. # PROF is set to -pg if profiling. +.if ${MACHINE} != "vax" +CROSSDIR?= /usr/cross/vax + +all: + CBIN=${CROSSDIR}/usr/bin; export CBIN; \ + MACHINE=vax MACHINE_ARCH=vax AR=$$CBIN/ar AS=$$CBIN/as \ + CC=$$CBIN/cc HOSTCC=cc LD=$$CBIN/ld NM=$$CBIN/nm \ + RANLIB=$$CBIN/ranlib STRIP=$$CBIN/strip SIZE=$$CBIN/size ${MAKE} +.else + CC?= cc +HOSTCC?=${CC} LD?= ld MKDEP?= mkdep STRIP?= strip @@ -44,7 +55,7 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE LINKFLAGS= -Z -Ttext 80000000 -e _start STRIPFLAGS= -d -HOSTED_CC= ${CC} +HOSTED_CC= ${HOSTCC} HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//} HOSTED_CFLAGS= ${CFLAGS} @@ -164,3 +175,5 @@ subr.o: ${VAX}/vax/subr.s ${NORMAL_S} %RULES + +.endif |