1# $NetBSD: Makefile.inc,v 1.15 2002/05/09 17:06:01 mason 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/sparcv7 22BINDIR=/usr/libexec/sparcv7 23SPARC32=COPTS=-m32 LD="ld -m elf32_sparc" AS="as -32" \ 24 MACHINE=sparc MACHINE_ARCH=sparc LIBDIR=${LIBDIR} BINDIR=${BINDIR} \ 25 SHLIB_LDSTARTFILE=${DESTDIR}${LIBDIR}/crtbeginS.o \ 26 SHLIB_LDENDFILE=${DESTDIR}${LIBDIR}/crtendS.o 27 28snap_md_pre: 29.ifndef UPDATE 30 # clean up the distrib area 31 cd $(TOP)/distrib && ${MAKE} clean 32.endif 33 34.if ${MACHINE_ARCH} == "sparc64" && ${MACHINE} == "sparc64" && \ 35 ${MK32BITLIBS} == "yes" 36 37 # build 32 bit csu 38.if ${MKOBJDIRS} != "no" 39 (cd ${.CURDIR}/../lib/csu && \ 40 ${MAKE} ${SPARC32} ${_M} obj) 41.endif 42 (cd ${.CURDIR}/../lib/csu && \ 43 ${MAKE} ${SPARC32} ${_M} ${_J} MKSHARE=no dependall && \ 44 ${MAKE} ${SPARC32} ${_M} MKSHARE=no install) 45 # build 32 bit libraries 46.if ${MKOBJDIRS} != "no" 47 (cd ${.CURDIR}/../lib && \ 48 ${MAKE} ${SPARC32} ${_M} obj) 49.endif 50 (cd ${.CURDIR}/../lib && \ 51 ${MAKE} ${SPARC32} ${_M} ${_J} MKSHARE=no dependall && \ 52 ${MAKE} ${SPARC32} ${_M} MKSHARE=no install) 53 # build 32 bit gnu libraries 54.if ${MKOBJDIRS} != "no" 55 (cd ${.CURDIR}/../gnu/lib && \ 56 ${MAKE} ${SPARC32} ${_M} obj) 57.endif 58 (cd ${.CURDIR}/../gnu/lib && \ 59 ${MAKE} ${SPARC32} ${_M} ${_J} MKSHARE=no dependall && \ 60 ${MAKE} ${SPARC32} ${_M} MKSHARE=no install) 61 # build 32 bit ld.elf_so 62.if ${MKOBJDIRS} != "no" 63 (cd ${.CURDIR}/../libexec/ld.elf_so && \ 64 ${MAKE} ${SPARC32} ${_M} obj) 65.endif 66 (cd ${.CURDIR}/../libexec/ld.elf_so && \ 67 ${MAKE} ${SPARC32} ${_M} ${_J} MKSHARE=no dependall && \ 68 ${MAKE} ${SPARC32} ${_M} MKSHARE=no install) 69.endif 70 71# 72# Install miniroot images and auxiliary scripts to the release tree 73# 74snap_md_post: 75.if exists($(XSRCDIR)/xc/Imakefile) 76 # build X11 77.ifndef XSRC_DONE 78 (cd $(XSRCDIR); $(MAKE) release) 79.endif 80.endif 81 82 # make boot/miniroot images 83 (cd $(TOP)/distrib; ${MAKE}) 84 85 # transfer images to release hierarchy 86.for dir in notes sparc64/xminiroot sparc64/instfs 87 (cd $(TOP)/distrib/$(dir); ${MAKE} release) 88.endfor 89 90 # install boot image and installation scripts in netboot directory 91.for f in ofwboot.net 92 cp -p $(DESTDIR)/usr/mdec/$f $(RELEASEDIR)/installation/netboot 93.endfor 94.for f in ofwboot bootblk 95 cp -p $(DESTDIR)/usr/mdec/$f $(RELEASEDIR)/installation/misc 96.endfor 97.for f in installboot 98 cp -p $(DESTDIR)/usr/sbin/$f $(RELEASEDIR)/installation/misc 99.endfor 100 101 # compute checksums 102.for dir in ${MD_INSTALLATION_DIRS} 103 ${MAKESUMS} -t ${RELEASEDIR}/${dir} '*' 104.endfor 105