summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-04-11 13:43:50 +0000
committerru <ru@FreeBSD.org>2002-04-11 13:43:50 +0000
commitd2541f338708e5848c60f6c312b92eba89ae2735 (patch)
treee28440ca609448f1f0298020081c8a23c2b89280 /Makefile.inc1
parent9d36b38cd7226c981d20079e716e5dd065a5def3 (diff)
downloadFreeBSD-src-d2541f338708e5848c60f6c312b92eba89ae2735.zip
FreeBSD-src-d2541f338708e5848c60f6c312b92eba89ae2735.tar.gz
Don't special case i386/pc98, replace it with the smarter logic
of setting ${TARGET} -- make it default to ${MACHINE} if we are not cross-building, and ${TARGET_ARCH} otherwise. Set MAKEOBJDIREPREFIX based on ${TARGET}, not on ${TARGET_ARCH}. This is useful if you want to cross-build pc98 worlds on i386.
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc115
1 files changed, 6 insertions, 9 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index f6329c8..0ee0922 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -123,17 +123,21 @@ SUPFLAGS+= -h ${SUPHOST}
MAKEOBJDIRPREFIX?= /usr/obj
TARGET_ARCH?= ${MACHINE_ARCH}
+.if ${TARGET_ARCH} == ${MACHINE_ARCH}
TARGET?= ${MACHINE}
+.else
+TARGET?= ${TARGET_ARCH}
+.endif
.if make(buildworld)
BUILD_ARCH!= sysctl -n hw.machine_arch
.if ${MACHINE_ARCH} != ${BUILD_ARCH}
.error To cross-build, set TARGET_ARCH.
.endif
.endif
-.if ${MACHINE_ARCH} == ${TARGET_ARCH}
+.if ${MACHINE} == ${TARGET}
OBJTREE= ${MAKEOBJDIRPREFIX}
.else
-OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET_ARCH}
+OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}
.endif
WORLDTMP= ${OBJTREE}${.CURDIR}/${MACHINE_ARCH}
# /usr/games added for fortune which depend on strfile
@@ -375,13 +379,6 @@ KERNCONF?= GENERIC
.endif
INSTKERNNAME?= kernel
-# The only exotic TARGET_ARCH/TARGET combination valid at this
-# time is i386/pc98. In all other cases set TARGET equal to
-# TARGET_ARCH.
-.if ${TARGET_ARCH} != "i386" || ${TARGET} != "pc98"
-TARGET= ${TARGET_ARCH}
-.endif
-
KRNLSRCDIR= ${.CURDIR}/sys
KRNLCONFDIR= ${KRNLSRCDIR}/${TARGET}/conf
KRNLOBJDIR= ${OBJTREE}${KRNLSRCDIR}
OpenPOWER on IntegriCloud