1 # $NetBSD: bsd.klinks.mk,v 1.9 2011/07/10 23:50:24 matt Exp $
8 .if defined
(NETBSDSRCDIR
)
10 .elif defined
(BSDSRCDIR
)
17 CLEANFILES
+= machine
${MACHINE_CPU} ${MACHINE}
18 .if
${MACHINE} == "sun2" ||
${MACHINE} == "sun3"
20 .elif
${MACHINE} == "sparc64"
22 .elif
${MACHINE} == "i386"
24 .elif
${MACHINE} == "amd64"
26 .elif
${MACHINE} == "evbmips"
27 CLEANFILES
+= algor sbmips
30 .if defined
(XEN_BUILD
) ||
${MACHINE} == "xen"
31 CLEANFILES
+= xen xen-ma
/machine
# xen-ma
32 CPPFLAGS
+= -I
${.OBJDIR
}/xen-ma
33 .if
${MACHINE_CPU} == "i386"
38 # XXX. This should be done a better way. It's @'d to reduce visual spew.
39 # XXX .BEGIN is used to make sure the links are done before anything else.
40 .if
!make
(obj
) && !make
(clean) && !make
(cleandir
)
43 ln
-s
$S/arch
/${MACHINE}/include machine
44 @
rm -f
${MACHINE} && \
45 ln
-s
$S/arch
/${MACHINE}/include ${MACHINE}
46 @if
[ -d
$S/arch
/${MACHINE_CPU} ]; then \
47 rm -f
${MACHINE_CPU} && \
48 ln
-s
$S/arch
/${MACHINE_CPU}/include ${MACHINE_CPU}; \
50 # XXX. it gets worse..
51 .if
${MACHINE} == "sun2" ||
${MACHINE} == "sun3"
53 ln
-s
$S/arch
/sun68k
/include sun68k
55 .if
${MACHINE} == "sparc64"
57 ln
-s
$S/arch
/sparc
/include sparc
59 .if
${MACHINE} == "amd64"
61 ln
-s
$S/arch
/x86
/include x86
63 ln
-s
$S/arch
/i386
/include i386
65 .if
${MACHINE_CPU} == "i386"
67 ln
-s
$S/arch
/x86
/include x86
69 .if defined
(XEN_BUILD
) ||
${MACHINE} == "xen"
71 ln
-s
$S/arch
/xen
/include xen
72 @
rm -rf xen-ma
&& mkdir xen-ma
&& \
73 ln
-s ..
/${XEN_BUILD
:U
${MACHINE_ARCH}} xen-ma
/machine
75 .if
${MACHINE} == "evbmips"
77 ln
-s
$S/arch
/algor
/include algor
79 ln
-s
$S/arch
/sbmips
/include sbmips