Makefile.inc revision 1.18
1#	$NetBSD: Makefile.inc,v 1.18 2002/12/02 13:18:13 lukem Exp $
2#
3#	etc.sparc64/Makefile.inc -- sparc64-specific etc Makefile targets
4#
5
6TOP= $(.CURDIR)/..
7
8# Specify whether or not to build 32-bit libs.
9MK32BITLIBS?=no
10
11KERNEL_SETS=		GENERIC
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} == "yes"
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
46#
47# Install miniroot images and auxiliary scripts to the release tree
48#
49snap_md_post:
50.if exists($(XSRCDIR)/xc/Imakefile)
51	# build X11
52.ifndef XSRC_DONE
53	(cd $(XSRCDIR); $(MAKE) release)
54.endif
55.endif
56
57	# install boot image and installation scripts in netboot directory
58.for f in ofwboot.net
59	cp -p $(DESTDIR)/usr/mdec/$f $(RELEASEDIR)/installation/netboot
60.endfor
61.for f in ofwboot bootblk
62	cp -p $(DESTDIR)/usr/mdec/$f $(RELEASEDIR)/installation/misc
63.endfor
64.for f in installboot
65	cp -p $(DESTDIR)/usr/sbin/$f $(RELEASEDIR)/installation/misc
66.endfor
67
68	# compute checksums
69.for dir in ${MD_INSTALLATION_DIRS}
70	${MAKESUMS} -t ${RELEASEDIR}/${dir} '*'
71.endfor
72