Makefile.inc revision 1.28
1#	$NetBSD: Makefile.inc,v 1.28 2008/03/14 16:43:16 nakayama Exp $
2#
3#	etc.sparc64/Makefile.inc -- sparc64-specific etc Makefile targets
4#
5# Specify whether or not to build 32-bit libs.
6MK32BITLIBS?=no
7
8# If you change the list of distributed kernels, don't forget
9# to update the release documentation in distrib/notes/common/contents
10
11KERNEL_SETS=		GENERIC GENERIC.MP
12
13BUILD_KERNELS+=		INSTALL
14
15MD_INSTALLATION_DIRS=	installation/miniroot	\
16			installation/netboot	\
17			installation/misc
18INSTALLATION_DIRS+=	${MD_INSTALLATION_DIRS}
19
20# Used by 32 bit lib/csu, lib, gnu/lib & libexec/ld.elf_so
21LIBDIR=/usr/lib/32
22BINDIR=/usr/libexec/32
23SPARC32_ENV=MACHINE=sparc MACHINE_ARCH=sparc
24SPARC32=COPTS=-m32 LD="ld -m elf32_sparc" AS="as -32" \
25	LIBDIR=${LIBDIR} BINDIR=${BINDIR} \
26	SHLIB_LDSTARTFILE=${DESTDIR}${LIBDIR}/crtbeginS.o \
27	SHLIB_LDENDFILE=${DESTDIR}${LIBDIR}/crtendS.o
28
29.if ${MACHINE_ARCH} == "sparc64" && ${MACHINE} == "sparc64" && \
30	${MK32BITLIBS} != "no"
31
32	# build 32 bit programs
33.for _s64dir in lib/csu lib gnu/lib libexec/ld_elf.so
34.if ${MKOBJDIRS} != "no"
35	(cd ${NETBSDSRCDIR}/${_s64dir} && \
36	    ${SPARC32_ENV} ${MAKE} ${SPARC32} ${_M} obj)
37.endif
38.ifndef UPDATE
39	(cd ${NETBSDSRCDIR}/${_s64dir} && ${MAKE} cleandir
40.endif
41	(cd ${NETBSDSRCDIR}/${_s64dir} && \
42	    ${SPARC32_ENV} ${MAKE} ${SPARC32} ${_M} ${_J} MKSHARE=no dependall \
43	    && ${SPARC32_ENV} ${MAKE} ${SPARC32} ${_M} MKSHARE=no install)
44.endfor
45.endif	# MACHINE_ARCH==sparc64 && MACHINE==sparc && MK32BITLIBS!=no
46
47#
48# Install miniroot images and auxiliary scripts to the release tree
49#
50snap_md_post:
51.if exists($(XSRCDIR)/xc/Imakefile)
52	# build X11
53.ifndef XSRC_DONE
54	(cd $(XSRCDIR); $(MAKE) release)
55.endif
56.endif
57
58	# install boot image and installation scripts in netboot directory
59.for file in ofwboot.net
60	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${DESTDIR}/usr/mdec/${file} \
61	    ${RELEASEDIR}/${MACHINE}/installation/netboot
62.endfor
63.for file in ofwboot bootblk
64	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${DESTDIR}/usr/mdec/${file} \
65	    ${RELEASEDIR}/${MACHINE}/installation/misc
66.endfor
67.for file in installboot
68	${HOST_INSTALL_FILE} -m ${BINMODE} ${DESTDIR}/usr/sbin/${file} \
69	    ${RELEASEDIR}/${MACHINE}/installation/misc
70.endfor
71
72	# compute checksums
73.for dir in ${MD_INSTALLATION_DIRS}
74	${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/${dir} '*'
75.endfor
76
77ISOBOOTFILEDIR!=cd ${.CURDIR}/../distrib/${MACHINE}/bootfs && ${PRINTOBJDIR}
78ISOBOOTFILE?=	${ISOBOOTFILEDIR}/boot.fs
79
80iso-image-md-post:
81	SUNLABEL=${TOOL_SUNLABEL:Q} \
82	    ${HOST_SH} ${NETBSDSRCDIR}/distrib/common/sunbootcd.sh \
83	    ${CDROM.image} - - - - ${ISOBOOTFILE}
84