1 # $NetBSD: Makefile,v 1.27.18.1 2013/03/28 05:31:22 agc Exp $ 2 3 .include <bsd.own.mk> 4 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" 5 6 WARNS= 1 7 # XXX 8 .if ${MACHINE_ARCH} != "m68000" 9 DBG= -Os 10 .endif 11 12 CRUNCHGEN_FLAGS=-d "${DBG}" 13 14 RESCUEDIR= /rescue 15 CRUNCHBIN= rescue 16 CRUNCHENV= RESCUEDIR=${RESCUEDIR} 17 SMALLPROG= 0 18 LISTS= ${.CURDIR}/list 19 TARGETDIR= ${DESTDIR}/rescue 20 PARSELISTENV+= TARGETDIR=${TARGETDIR:Q} 21 22 .for f in ldconfig 23 PROG_${f}!= cd ${NETBSDSRCDIR}/sbin/${f} && ${MAKE} -V PROG 24 .if (${PROG_${f}} != "") 25 LISTS+= ${.CURDIR}/list.${f} 26 .endif 27 .endfor 28 29 .for f in pdisk 30 PROG_${f}!= cd ${NETBSDSRCDIR}/external/bsd/${f}/bin && ${MAKE} -V PROG 31 .if (${PROG_${f}} != "") 32 LISTS+= ${.CURDIR}/list.${f} 33 .endif 34 .endfor 35 36 .if ${USE_INET6} != "no" 37 LISTS+= ${.CURDIR}/list.inet6 38 .endif 39 40 .if ${MKCRYPTO} != "no" 41 LISTS+= ${.CURDIR}/list.crypto 42 CRUNCHENV+= MKKERBEROS=no # for ssh 43 .endif 44 45 LISTS+= ${.CURDIR}/list.ldd 46 LDD_ELF32DIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/elf32 && ${PRINTOBJDIR} 47 LDD_ELF64DIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/elf64 && ${PRINTOBJDIR} 48 PARSELISTENV+= LDD_ELF32DIR=${LDD_ELF32DIR} LDD_ELF64DIR=${LDD_ELF64DIR} 49 50 # Specially built objects to override the behaviour of 51 # various library functions 52 # 53 54 OVERRIDEOBJS= rcmd.o 55 .PATH: ${NETBSDSRCDIR}/lib/libc/net 56 CPPFLAGS.rcmd.c+=-I${NETBSDSRCDIR}/lib/libc/include -DRESCUEDIR=\"${RESCUEDIR}\" 57 58 LIBOVERRIDE= liboverride.o 59 ${LIBOVERRIDE}: ${OVERRIDEOBJS} 60 ${_MKTARGET_LINK} 61 ${LD} -r -o $@ ${OVERRIDEOBJS} 62 63 CLEANFILES+= ${OVERRIDEOBJS} ${LIBOVERRIDE} 64 65 ${CRUNCHBIN}: ${LIBOVERRIDE} 66 67 68 # The primary target ... 69 # 70 71 CLEANFILES+= rescue.unstripped 72 73 .include "${DISTRIBDIR}/common/Makefile.crunch" 74 75 realall: ${CRUNCHBIN} 76 77 install: ${CRUNCHBIN} 78 # XXX this MKMSG doesn't line up 79 ${_MKMSG} "populate ${TARGETDIR}" 80 ${PARSELIST} -v mode=install ${LISTS} | ${MAKE} -f - install 81 82 .include <bsd.prog.mk> 83