2006-05-04 12:41:06 -07:00
|
|
|
# $OpenBSD: Makefile.cross,v 1.16 2006/05/04 19:41:06 miod Exp $
|
2005-01-09 12:36:20 -08:00
|
|
|
|
|
|
|
cross-tools: cross-includes cross-binutils cross-gcc cross-lib
|
|
|
|
cross-distrib: cross-tools cross-bin cross-etc-root-var
|
|
|
|
|
2005-09-11 16:10:07 -07:00
|
|
|
# Have to compute TARGET_ARCH directly in the Makefile, for .if tests involving
|
|
|
|
# this variable to work.
|
|
|
|
.if (${TARGET} == "cats" || ${TARGET} == "zaurus")
|
|
|
|
TARGET_ARCH= arm
|
|
|
|
.elif (${TARGET} == "hp300" || ${TARGET} == "mac68k" || \
|
|
|
|
${TARGET} == "mvme68k")
|
|
|
|
TARGET_ARCH= m68k
|
|
|
|
.elif (${TARGET} == "luna88k" || ${TARGET} == "mvme88k")
|
|
|
|
TARGET_ARCH= m88k
|
|
|
|
.elif (${TARGET} == "sgi")
|
|
|
|
TARGET_ARCH= mips64
|
|
|
|
.elif (${TARGET} == "macppc" || ${TARGET} == "mvmeppc")
|
|
|
|
TARGET_ARCH= powerpc
|
|
|
|
.else
|
|
|
|
TARGET_ARCH= ${TARGET}
|
|
|
|
.endif
|
|
|
|
|
2005-01-09 12:36:20 -08:00
|
|
|
CROSSCPPFLAGS?= -nostdinc -I${CROSSDIR}/usr/include
|
|
|
|
CROSSLDFLAGS?= -nostdlib -L${CROSSDIR}/usr/lib -static
|
|
|
|
CROSSCFLAGS?= ${CROSSCPPFLAGS}
|
|
|
|
CROSSCXXFLAGS?= ${CROSSCPPFLAGS}
|
|
|
|
LDSTATIC?= -static
|
|
|
|
|
|
|
|
CROSSDIR= ${DESTDIR}/usr/cross/${TARGET}
|
|
|
|
CROSSENV= AR=${CROSSDIR}/usr/bin/ar AS=${CROSSDIR}/usr/bin/as \
|
|
|
|
CC=${CROSSDIR}/usr/bin/cc CPP=${CROSSDIR}/usr/bin/cpp \
|
|
|
|
CXX=${CROSSDIR}/usr/bin/c++ \
|
2005-01-20 13:35:07 -08:00
|
|
|
LD=${CROSSDIR}/usr/bin/ld \
|
2005-01-09 12:36:20 -08:00
|
|
|
LORDER=/usr/bin/lorder RANLIB=${CROSSDIR}/usr/bin/ranlib \
|
2005-01-20 13:35:07 -08:00
|
|
|
STRIP=${CROSSDIR}/usr/bin/strip \
|
2005-01-09 12:36:20 -08:00
|
|
|
HOSTCC=\"${CC}\" HOSTCXX=\"${CXX}\" NOMAN= DESTDIR=${CROSSDIR} \
|
|
|
|
HOSTCFLAGS=\"${CFLAGS}\" HOSTCXXFLAGS=\"${CXXFLAGS}\" \
|
2005-09-11 16:10:07 -07:00
|
|
|
HOSTLDFLAGS=\"${LDFLAGS}\" \
|
2005-01-09 12:36:20 -08:00
|
|
|
CFLAGS=\"${CROSSCFLAGS}\" CPPFLAGS=\"${CROSSCPPFLAGS}\" \
|
|
|
|
CXXFLAGS=\"${CROSSCXXFLAGS}\" \
|
|
|
|
LDFLAGS=\"${CROSSLDFLAGS}\"
|
|
|
|
CROSSPATH= ${PATH}:${CROSSDIR}/usr/bin
|
|
|
|
CROSSLANGS?= c c++
|
|
|
|
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_CANON=`cat ${CROSSDIR}/TARGET_CANON`
|
|
|
|
|
2005-01-09 12:36:20 -08:00
|
|
|
CROSSDIRS= ${CROSSDIR}/.dirs_done
|
|
|
|
CROSSOBJ= ${CROSSDIR}/usr/obj/.obj_done
|
|
|
|
CROSSINCLUDES= ${CROSSDIR}/usr/include/.includes_done
|
|
|
|
CROSSBINUTILS= ${CROSSDIR}/usr/bin/.binutils_done
|
|
|
|
CROSSGCC= ${CROSSDIR}/usr/bin/.gcc_done
|
|
|
|
NO_CROSS= isakmpd tn3270 less sudo openssl libkeynote libssl \
|
2006-04-19 02:28:45 -07:00
|
|
|
keynote sectok ssh
|
2005-01-09 12:36:20 -08:00
|
|
|
|
2005-01-10 09:47:15 -08:00
|
|
|
# no libcrypto.... these won't build
|
2005-06-28 16:10:36 -07:00
|
|
|
NO_CROSS+= dc login_krb5 login_krb5-or-pwd passwd ppp tcpdump telnet
|
2005-01-10 09:47:15 -08:00
|
|
|
# need host setup for ydr
|
|
|
|
NO_CROSS+=afs
|
|
|
|
# explicit cross-compile
|
|
|
|
NO_CROSS+=bind
|
|
|
|
|
2005-01-09 12:36:20 -08:00
|
|
|
cross-dirs: ${CROSSDIRS}
|
|
|
|
cross-obj: ${CROSSOBJ}
|
|
|
|
cross-includes: ${CROSSINCLUDES}
|
|
|
|
cross-binutils: ${CROSSBINUTILS}
|
|
|
|
cross-gcc: ${CROSSGCC}
|
|
|
|
|
|
|
|
cross-env:
|
|
|
|
@echo ${CROSSENV} MACHINE=${TARGET} \
|
|
|
|
MACHINE_ARCH=`cat ${CROSSDIR}/TARGET_ARCH`
|
|
|
|
|
|
|
|
${CROSSDIRS}:
|
|
|
|
@-mkdir -p ${CROSSDIR}
|
2005-09-11 16:10:07 -07:00
|
|
|
@echo ${TARGET_ARCH} > ${CROSSDIR}/TARGET_ARCH
|
2005-01-09 12:36:20 -08:00
|
|
|
@echo TARGET_ARCH is `cat ${CROSSDIR}/TARGET_ARCH`
|
|
|
|
@eval `grep '^osr=' sys/conf/newvers.sh`; \
|
|
|
|
sed "s/\$$/-unknown-openbsd$$osr/" ${CROSSDIR}/TARGET_ARCH > \
|
|
|
|
${CROSSDIR}/TARGET_CANON
|
|
|
|
@-mkdir -p ${CROSSDIR}
|
2005-01-10 09:47:15 -08:00
|
|
|
@-mkdir -p ${CROSSDIR}/usr/${TARGET_CANON}
|
2005-01-09 12:36:20 -08:00
|
|
|
@ln -sf ${CROSSDIR}/usr/include \
|
2005-01-10 09:47:15 -08:00
|
|
|
${CROSSDIR}/usr/${TARGET_CANON}/include
|
2005-01-09 12:36:20 -08:00
|
|
|
@ln -sf ${CROSSDIR}/usr/lib \
|
2005-01-10 09:47:15 -08:00
|
|
|
${CROSSDIR}/usr/${TARGET_CANON}/lib
|
|
|
|
@-mkdir -p ${CROSSDIR}/usr/${TARGET_CANON}/bin
|
2005-01-09 12:36:20 -08:00
|
|
|
@(cd ${.CURDIR}/etc && DESTDIR=${CROSSDIR} ${MAKE} distrib-dirs)
|
|
|
|
@touch ${CROSSDIRS}
|
|
|
|
|
|
|
|
${CROSSOBJ}: ${CROSSDIRS}
|
|
|
|
@-mkdir -p ${CROSSDIR}/usr/obj
|
|
|
|
@(cd ${.CURDIR} && \
|
|
|
|
BSDOBJDIR=${CROSSDIR}/usr/obj \
|
|
|
|
MACHINE=${TARGET} \
|
2005-01-10 09:47:15 -08:00
|
|
|
MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
BSDSRCDIR=${.CURDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
${MAKE} obj)
|
|
|
|
@touch ${CROSSOBJ}
|
|
|
|
|
|
|
|
${CROSSINCLUDES}: ${CROSSOBJ}
|
|
|
|
@-mkdir -p ${CROSSDIR}/usr/include
|
|
|
|
@(cd ${.CURDIR}/include && \
|
2005-01-10 09:47:15 -08:00
|
|
|
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2005-01-19 10:31:34 -08:00
|
|
|
TARGET_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
${MAKE} prereq && \
|
2005-01-10 09:47:15 -08:00
|
|
|
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2005-01-19 10:31:34 -08:00
|
|
|
TARGET_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
${MAKE} DESTDIR=${CROSSDIR} includes)
|
|
|
|
@touch ${CROSSINCLUDES}
|
|
|
|
|
2005-09-11 16:10:07 -07:00
|
|
|
.if (${TARGET_ARCH} == "m68k" || ${TARGET_ARCH} == "m88k" || \
|
|
|
|
${TARGET_ARCH} == "vax")
|
2005-01-09 12:36:20 -08:00
|
|
|
BINUTILS= ar as ld nm ranlib objcopy objdump strings strip
|
|
|
|
NEW_BINUTILS?= No
|
|
|
|
.else
|
|
|
|
BINUTILS= ar as gasp ld nm objcopy objdump ranlib readelf size \
|
|
|
|
strings strip
|
|
|
|
NEW_BINUTILS?= Yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
${CROSSBINUTILS}: ${CROSSINCLUDES}
|
|
|
|
(cd ${.CURDIR}/gnu/usr.bin/binutils; \
|
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2006-05-04 12:41:06 -07:00
|
|
|
USING_NEW_BINUTILS=${NEW_BINUTILS} \
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
${MAKE} -f Makefile.bsd-wrapper depend && \
|
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2006-05-04 12:41:06 -07:00
|
|
|
USING_NEW_BINUTILS=${NEW_BINUTILS} \
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
${MAKE} -f Makefile.bsd-wrapper all && \
|
|
|
|
DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2006-05-04 12:41:06 -07:00
|
|
|
USING_NEW_BINUTILS=${NEW_BINUTILS} \
|
2005-01-09 12:36:20 -08:00
|
|
|
${MAKE} -f Makefile.bsd-wrapper install)
|
2006-05-04 12:41:06 -07:00
|
|
|
.if ${NEW_BINUTILS:L} != "yes"
|
2005-01-09 12:36:20 -08:00
|
|
|
(cd ${.CURDIR}/gnu/usr.bin/gas; \
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} ${MAKE} depend all; \
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
${MAKE} NOMAN= install)
|
|
|
|
ln -sf ${CROSSDIR}/usr/bin/as \
|
2005-09-11 16:08:30 -07:00
|
|
|
${CROSSDIR}/usr/${TARGET_CANON}/bin/as
|
2005-01-09 12:36:20 -08:00
|
|
|
(cd ${.CURDIR}/gnu/usr.bin/ld; \
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
${MAKE} NOPIC= NOMAN= depend all; \
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
${MAKE} NOPIC= NOMAN= install)
|
|
|
|
ln -sf ${CROSSDIR}/usr/bin/ld \
|
2005-01-10 09:47:15 -08:00
|
|
|
${CROSSDIR}/usr/${TARGET_CANON}/bin/ld
|
2005-01-09 12:36:20 -08:00
|
|
|
(cd ${.CURDIR}/usr.bin/ar; \
|
2006-04-19 11:32:39 -07:00
|
|
|
ELF_TOOLCHAIN=no \
|
2005-01-09 12:36:20 -08:00
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} ${MAKE} NOMAN= depend all; \
|
2006-04-19 11:32:39 -07:00
|
|
|
ELF_TOOLCHAIN=no \
|
2005-01-09 12:36:20 -08:00
|
|
|
DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
${MAKE} NOMAN= install)
|
|
|
|
ln -sf ${CROSSDIR}/usr/bin/ar \
|
2005-01-10 09:47:15 -08:00
|
|
|
${CROSSDIR}/usr/${TARGET_CANON}/bin/ar
|
2005-01-09 12:36:20 -08:00
|
|
|
(cd ${.CURDIR}/usr.bin/ranlib; \
|
2006-04-19 11:32:39 -07:00
|
|
|
ELF_TOOLCHAIN=no \
|
2005-01-09 12:36:20 -08:00
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} ${MAKE} NOMAN= depend all; \
|
2006-04-19 11:32:39 -07:00
|
|
|
ELF_TOOLCHAIN=no \
|
2005-01-09 12:36:20 -08:00
|
|
|
DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
${MAKE} NOMAN= install)
|
|
|
|
ln -sf ${CROSSDIR}/usr/bin/ranlib \
|
2005-01-10 09:47:15 -08:00
|
|
|
${CROSSDIR}/usr/${TARGET_CANON}/bin/ranlib
|
2005-01-09 12:36:20 -08:00
|
|
|
(cd ${.CURDIR}/usr.bin/strip; \
|
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2005-01-10 09:47:15 -08:00
|
|
|
${MAKE} TARGET_MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
NOMAN= depend all; \
|
|
|
|
DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2005-01-10 09:47:15 -08:00
|
|
|
${MAKE} TARGET_MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
NOMAN= install)
|
|
|
|
ln -sf ${CROSSDIR}/usr/bin/strip \
|
2005-01-10 09:47:15 -08:00
|
|
|
${CROSSDIR}/usr/${TARGET_CANON}/bin/strip
|
2005-01-09 12:36:20 -08:00
|
|
|
.endif
|
|
|
|
@for cmd in ${BINUTILS}; do \
|
|
|
|
if [ ! -e ${CROSSDIR}/usr/bin/$$cmd -a \
|
2005-01-10 09:47:15 -08:00
|
|
|
-e ${CROSSDIR}/usr/bin/${TARGET_CANON}-$$cmd ]; then \
|
|
|
|
ln -sf ${TARGET_CANON}-$$cmd ${CROSSDIR}/usr/bin/$$cmd ;\
|
2005-01-09 12:36:20 -08:00
|
|
|
elif [ -e ${CROSSDIR}/usr/bin/$$cmd -a \
|
2005-01-10 09:47:15 -08:00
|
|
|
! -e ${CROSSDIR}/usr/bin/${TARGET_CANON}-$$cmd ]; then \
|
|
|
|
ln -sf $$cmd ${CROSSDIR}/usr/bin/${TARGET_CANON}-$$cmd; \
|
2005-01-09 12:36:20 -08:00
|
|
|
fi ;\
|
|
|
|
if [ -e ${CROSSDIR}/usr/bin/$$cmd -a \
|
2005-01-10 09:47:15 -08:00
|
|
|
! -e ${CROSSDIR}/usr/${TARGET_CANON}/bin/$$cmd ]; then \
|
2005-01-09 12:36:20 -08:00
|
|
|
ln -sf ${CROSSDIR}/usr/bin/$$cmd \
|
2005-01-10 09:47:15 -08:00
|
|
|
${CROSSDIR}/usr/${TARGET_CANON}/bin/$$cmd; \
|
2005-01-09 12:36:20 -08:00
|
|
|
fi ;\
|
|
|
|
done
|
|
|
|
@touch ${CROSSBINUTILS}
|
|
|
|
|
|
|
|
# bsd.own.mk can't do it for us
|
2005-09-11 16:10:07 -07:00
|
|
|
.if ${TARGET_ARCH} == "alpha" || \
|
|
|
|
${TARGET_ARCH} == "m68k" || ${TARGET_ARCH} == "m88k" || \
|
|
|
|
${TARGET_ARCH} == "sparc" || ${TARGET_ARCH} == "vax"
|
2005-01-11 16:06:28 -08:00
|
|
|
TARGET_USE_GCC3=No
|
2005-01-28 11:51:47 -08:00
|
|
|
.else
|
|
|
|
TARGET_USE_GCC3=Yes
|
2005-01-09 12:36:20 -08:00
|
|
|
.endif
|
|
|
|
|
|
|
|
${CROSSGCC}: ${CROSSBINUTILS}
|
2005-01-11 16:06:28 -08:00
|
|
|
.if ${TARGET_USE_GCC3:L} == "yes"
|
2005-01-09 12:36:20 -08:00
|
|
|
(cd ${.CURDIR}/gnu/usr.bin/gcc; \
|
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_ARCH=${TARGET_ARCH} CROSSDIR=${CROSSDIR} \
|
2005-01-09 12:36:20 -08:00
|
|
|
${MAKE} -f Makefile.bsd-wrapper depend && \
|
|
|
|
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2005-01-10 09:47:15 -08:00
|
|
|
TARGET_ARCH=${TARGET_ARCH} CROSSDIR=${CROSSDIR} \
|
2005-01-09 12:36:20 -08:00
|
|
|
${MAKE} -f Makefile.bsd-wrapper all && \
|
|
|
|
DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
${MAKE} -f Makefile.bsd-wrapper install)
|
2005-01-10 09:47:15 -08:00
|
|
|
ln -sf ${TARGET_CANON}-g++ ${CROSSDIR}/usr/bin/c++
|
2005-01-09 12:36:20 -08:00
|
|
|
ln -sf ${CROSSDIR}/usr/libexec/cpp \
|
|
|
|
${CROSSDIR}/usr/bin/cpp
|
|
|
|
.else
|
|
|
|
(cd ${CROSSDIR}/usr/obj/gnu/egcs/gcc; \
|
|
|
|
/bin/sh ${.CURDIR}/gnu/egcs/gcc/configure \
|
|
|
|
--with-gnu-as --with-gnu-ld --prefix ${CROSSDIR}/usr \
|
2005-01-10 09:47:15 -08:00
|
|
|
--target ${TARGET_CANON} \
|
2005-01-09 12:36:20 -08:00
|
|
|
--enable-languages="c,c++" --enable-cpp --disable-nls \
|
|
|
|
--with-gxx-include-dir=${CROSSDIR}/usr/include/g++ && \
|
|
|
|
PATH=${CROSSPATH} ${MAKE} BISON=yacc LANGUAGES="${CROSSLANGS}" \
|
|
|
|
CFLAGS="${CFLAGS} -I${.CURDIR}/gnu/lib/libiberty/include" \
|
|
|
|
LIBIBERTY_INCLUDES=${.CURDIR}/gnu/lib/libiberty/include \
|
|
|
|
DEMANGLER_PROG= DEMANGLE_H= LDFLAGS="${LDSTATIC}" build_infodir=. \
|
|
|
|
GCC_FOR_TARGET="./xgcc -B./ -I${CROSSDIR}/usr/include" && \
|
|
|
|
${MAKE} BISON=yacc LANGUAGES="${CROSSLANGS}" LDFLAGS="${LDSTATIC}" \
|
|
|
|
GCC_FOR_TARGET="./xgcc -B./ -I${CROSSDIR}/usr/include" \
|
|
|
|
CFLAGS="${CFLAGS} -I${.CURDIR}/gnu/lib/libiberty/include" \
|
|
|
|
LIBIBERTY_INCLUDES=${.CURDIR}/gnu/lib/libiberty/include \
|
|
|
|
build_infodir=. INSTALL_MAN= INSTALL_HEADERS_DIR= install)
|
2005-01-10 09:47:15 -08:00
|
|
|
ln -sf ${TARGET_CANON}-gcc ${CROSSDIR}/usr/bin/cc
|
|
|
|
ln -sf ${TARGET_CANON}-g++ ${CROSSDIR}/usr/bin/c++
|
2005-01-09 12:36:20 -08:00
|
|
|
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
|
|
|
${CROSSDIR}/usr/obj/gnu/egcs/gcc/cpp \
|
|
|
|
${CROSSDIR}/usr/libexec/cpp
|
|
|
|
sed -e 's#/usr/libexec/cpp#${CROSSDIR}/usr/libexec/cpp#' \
|
|
|
|
-e 's#/usr/include#${CROSSDIR}/usr/include#' \
|
2005-09-11 16:07:21 -07:00
|
|
|
-e 's/@dollaropt@/-$$/' \
|
2005-01-09 12:36:20 -08:00
|
|
|
${.CURDIR}/usr.bin/cpp/cpp.sh > ${CROSSDIR}/usr/bin/cpp
|
|
|
|
chmod ${BINMODE} ${CROSSDIR}/usr/bin/cpp
|
|
|
|
chown ${BINOWN}:${BINGRP} ${CROSSDIR}/usr/bin/cpp
|
|
|
|
.endif
|
|
|
|
@touch ${CROSSGCC}
|
|
|
|
|
|
|
|
# XXX MAKEOBJDIR maybe should be obj.${TARGET} here, revisit later
|
|
|
|
cross-lib: ${CROSSGCC}
|
2005-01-10 09:47:15 -08:00
|
|
|
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}; \
|
2005-01-09 12:36:20 -08:00
|
|
|
export MACHINE MACHINE_ARCH; \
|
|
|
|
(cd ${.CURDIR}/lib; \
|
|
|
|
for lib in csu libc; do \
|
|
|
|
(cd $$lib; \
|
|
|
|
eval ${CROSSENV} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
2005-12-30 08:41:23 -08:00
|
|
|
${MAKE} WANTLINT=no depend all install); \
|
2005-01-09 12:36:20 -08:00
|
|
|
done; \
|
|
|
|
eval ${CROSSENV} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
SKIPDIR=\"${NO_CROSS} libocurses/PSD.doc\" \
|
2005-12-30 08:41:23 -08:00
|
|
|
${MAKE} WANTLINT=no depend all install)
|
2005-01-09 12:36:20 -08:00
|
|
|
|
|
|
|
cross-bin: ${CROSSOBJ}
|
2005-01-10 09:47:15 -08:00
|
|
|
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH}; \
|
2005-01-09 12:36:20 -08:00
|
|
|
export MACHINE MACHINE_ARCH; \
|
|
|
|
for i in libexec bin sbin usr.bin usr.sbin; do \
|
|
|
|
(cd ${.CURDIR}/$$i; \
|
|
|
|
eval ${CROSSENV} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
SKIPDIR=\"${BINUTILS} ${NO_CROSS}\" \
|
|
|
|
${MAKE} depend all install); \
|
|
|
|
done
|
|
|
|
|
|
|
|
cross-etc-root-var: ${CROSSOBJ}
|
|
|
|
(cd ${.CURDIR}/etc && \
|
2005-09-18 13:42:49 -07:00
|
|
|
MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \
|
2005-01-09 12:36:20 -08:00
|
|
|
DESTDIR=${CROSSDIR} ${MAKE} distribution-etc-root-var)
|
|
|
|
|
|
|
|
cross-depend:
|
|
|
|
@(cd ${.CURDIR} && \
|
|
|
|
BSDOBJDIR=${CROSSDIR}/usr/obj \
|
|
|
|
BSDSRCDIR=${.CURDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
SKIPDIR="${NO_CROSS}" \
|
|
|
|
${MAKE} depend)
|
|
|
|
|
|
|
|
cross-clean:
|
|
|
|
@(cd ${.CURDIR} && \
|
|
|
|
BSDOBJDIR=${CROSSDIR}/usr/obj \
|
|
|
|
BSDSRCDIR=${.CURDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
SKIPDIR="${NO_CROSS}" \
|
|
|
|
${MAKE} clean)
|
|
|
|
|
|
|
|
cross-cleandir:
|
|
|
|
@(cd ${.CURDIR} && \
|
|
|
|
BSDOBJDIR=${CROSSDIR}/usr/obj \
|
|
|
|
BSDSRCDIR=${.CURDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
|
|
|
|
SKIPDIR="${NO_CROSS}" \
|
|
|
|
${MAKE} cleandir)
|