1 # $NetBSD: Makefile.inc,v 1.29 2008/03/18 04:20:37 lukem Exp $
3 # etc.sparc64/Makefile.inc -- sparc64-specific etc Makefile targets
5 # Specify whether or not to build 32-bit libs.
8 # If you change the list of distributed kernels, don't forget
9 # to update the release documentation in distrib/notes/common/contents
11 KERNEL_SETS= GENERIC GENERIC.MP
13 BUILD_KERNELS+= INSTALL
15 MD_INSTALLATION_DIRS= installation/miniroot \
16 installation/netboot \
18 INSTALLATION_DIRS+= ${MD_INSTALLATION_DIRS}
20 # Used by 32 bit lib/csu, lib, gnu/lib & libexec/ld.elf_so
22 BINDIR=/usr/libexec/32
23 SPARC32_ENV=MACHINE=sparc MACHINE_ARCH=sparc
24 SPARC32=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
29 .if ${MACHINE_ARCH} == "sparc64" && ${MK32BITLIBS} != "no"
31 # build 32 bit programs
32 .for _s64dir in lib/csu lib gnu/lib libexec/ld_elf.so
33 .if ${MKOBJDIRS} != "no"
34 (cd ${NETBSDSRCDIR}/${_s64dir} && \
35 ${SPARC32_ENV} ${MAKE} ${SPARC32} ${_M} obj)
38 (cd ${NETBSDSRCDIR}/${_s64dir} && ${MAKE} cleandir
40 (cd ${NETBSDSRCDIR}/${_s64dir} && \
41 ${SPARC32_ENV} ${MAKE} ${SPARC32} ${_M} ${_J} MKSHARE=no dependall \
42 && ${SPARC32_ENV} ${MAKE} ${SPARC32} ${_M} MKSHARE=no install)
44 .endif # MACHINE_ARCH==sparc64 && MACHINE==sparc && MK32BITLIBS!=no
47 # Install miniroot images and auxiliary scripts to the release tree
50 .if exists($(XSRCDIR)/xc/Imakefile)
53 (cd $(XSRCDIR); $(MAKE) release)
57 # install boot image and installation scripts in netboot directory
58 .for file in ofwboot.net
59 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${DESTDIR}/usr/mdec/${file} \
60 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/netboot
62 .for file in ofwboot bootblk
63 ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${DESTDIR}/usr/mdec/${file} \
64 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc
66 .for file in installboot
67 ${HOST_INSTALL_FILE} -m ${BINMODE} ${DESTDIR}/usr/sbin/${file} \
68 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc
72 .for dir in ${MD_INSTALLATION_DIRS}
73 ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/${dir} '*'
76 ISOBOOTFILEDIR!=cd ${.CURDIR}/../distrib/${MACHINE}/bootfs && ${PRINTOBJDIR}
77 ISOBOOTFILE?= ${ISOBOOTFILEDIR}/boot.fs
80 SUNLABEL=${TOOL_SUNLABEL:Q} \
81 ${HOST_SH} ${NETBSDSRCDIR}/distrib/common/sunbootcd.sh \
82 ${CDROM.image} - - - - ${ISOBOOTFILE}