[BACK]Return to bsd.klinks.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

File: [cvs.NetBSD.org] / src / share / mk / bsd.klinks.mk (download)

Revision 1.13, Sun Aug 10 05:57:31 2014 UTC (4 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: tls-maxphys-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.12: +7 -1 lines

Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.

#	$NetBSD: bsd.klinks.mk,v 1.13 2014/08/10 05:57:31 matt Exp $
#

.include <bsd.own.mk>

KLINK_MACHINE?=	${MACHINE}

##### Default values
.if !defined(S)
.if defined(NETBSDSRCDIR)
S=	${NETBSDSRCDIR}/sys
.elif defined(BSDSRCDIR)
S=	${BSDSRCDIR}/sys
.else
S=	/sys
.endif
.endif

CLEANFILES+=	machine ${MACHINE_CPU} ${KLINK_MACHINE}
.if ${KLINK_MACHINE} == "sun2" || ${KLINK_MACHINE} == "sun3"
CLEANFILES+=	sun68k
.elif ${KLINK_MACHINE} == "sparc64"
CLEANFILES+=	sparc
.elif ${KLINK_MACHINE} == "i386"
CLEANFILES+=	x86
.elif ${KLINK_MACHINE} == "amd64"
CLEANFILES+=	x86 i386
.elif ${KLINK_MACHINE} == "evbmips"
CLEANFILES+=	algor sbmips
.elif ${MACHINE_CPU} == "aarch64"
CLEANFILES+=	arm
.endif

.if defined(XEN_BUILD) || ${KLINK_MACHINE} == "xen"
CLEANFILES+=	xen xen-ma/machine # xen-ma
CPPFLAGS+=	-I${.OBJDIR}/xen-ma
.if ${MACHINE_CPU} == "i386"
CLEANFILES+=	x86
.endif
.endif

# XXX.  This should be done a better way.  It's @'d to reduce visual spew.
# XXX   .BEGIN is used to make sure the links are done before anything else.
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
	-@rm -f machine && \
	    ln -s $S/arch/${KLINK_MACHINE}/include machine
	-@rm -f ${KLINK_MACHINE} && \
	    ln -s $S/arch/${KLINK_MACHINE}/include ${KLINK_MACHINE}
	-@if [ -d $S/arch/${MACHINE_CPU} ]; then \
	    rm -f ${MACHINE_CPU} && \
	    ln -s $S/arch/${MACHINE_CPU}/include ${MACHINE_CPU}; \
	 fi
# XXX. it gets worse..
.if ${KLINK_MACHINE} == "sun2" || ${KLINK_MACHINE} == "sun3"
	-@rm -f sun68k && \
	    ln -s $S/arch/sun68k/include sun68k
.endif
.if ${KLINK_MACHINE} == "sparc64"
	-@rm -f sparc && \
	    ln -s $S/arch/sparc/include sparc
.endif
.if ${KLINK_MACHINE} == "amd64"
	-@rm -f i386 && \
	    ln -s $S/arch/i386/include i386
.endif
.if ${MACHINE_CPU} == "i386" || ${MACHINE_CPU} == "x86_64"
	-@rm -f x86 && \
	    ln -s $S/arch/x86/include x86
.endif
.if ${MACHINE_CPU} == "aarch64"
	-@rm -f arm && \
	    ln -s $S/arch/arm/include arm
.endif
.if defined(XEN_BUILD) || ${KLINK_MACHINE} == "xen"
	-@rm -f xen && \
	    ln -s $S/arch/xen/include xen
	-@rm -rf xen-ma && mkdir xen-ma && \
	    ln -s ../${XEN_BUILD:U${MACHINE_ARCH}} xen-ma/machine
.endif
.if ${KLINK_MACHINE} == "evbmips"
	-@rm -f algor && \
	    ln -s $S/arch/algor/include algor
	-@rm -f sbmips && \
	    ln -s $S/arch/sbmips/include sbmips
.endif
.endif