1 # $NetBSD: bsd.klinks.mk,v 1.6 2009/11/27 13:50:29 pooka Exp $
8 .if defined
(NETBSDSRCDIR
)
10 .elif defined
(BSDSRCDIR
)
17 CLEANFILES
+= machine
${MACHINE_CPU}
18 .if
${MACHINE} == "sun2" ||
${MACHINE} == "sun3"
20 .elif
${MACHINE} == "sparc64"
22 .elif
${MACHINE} == "i386"
24 .elif
${MACHINE} == "amd64"
28 .if defined
(XEN_BUILD
) ||
${MACHINE} == "xen"
29 CLEANFILES
+= xen xen-ma
/machine
# xen-ma
30 CPPFLAGS
+= -I
${.OBJDIR
}/xen-ma
31 .if
${MACHINE_CPU} == "i386"
36 # XXX. This should be done a better way. It's @'d to reduce visual spew.
37 # XXX .BEGIN is used to make sure the links are done before anything else.
38 .if
!make
(obj
) && !make
(clean) && !make
(cleandir
)
41 ln
-s
$S/arch
/${MACHINE}/include machine
42 @
rm -f
${MACHINE_CPU} && \
43 ln
-s
$S/arch
/${MACHINE_CPU}/include ${MACHINE_CPU}
44 # XXX. it gets worse..
45 .if
${MACHINE} == "sun2" ||
${MACHINE} == "sun3"
47 ln
-s
$S/arch
/sun68k
/include sun68k
49 .if
${MACHINE} == "sparc64"
51 ln
-s
$S/arch
/sparc
/include sparc
53 .if
${MACHINE} == "amd64"
55 ln
-s
$S/arch
/x86
/include x86
57 ln
-s
$S/arch
/i386
/include i386
59 .if
${MACHINE_CPU} == "i386"
61 ln
-s
$S/arch
/x86
/include x86
63 .if defined
(XEN_BUILD
) ||
${MACHINE} == "xen"
65 ln
-s
$S/arch
/xen
/include xen
66 @
rm -rf xen-ma
&& mkdir xen-ma
&& \
67 ln
-s ..
/${XEN_BUILD
:U
${MACHINE_ARCH}} xen-ma
/machine