1 1.11.2.2 he # $NetBSD: Makefile,v 1.11.2.2 2000/02/28 19:01:15 he Exp $ 2 1.1 pk 3 1.5 mrg PROG= boot 4 1.11.2.1 he PROGSOURCE= boot.c net.c netif_sun.c conf.c openfirm.c vers.c 5 1.5 mrg NEWVERSWHAT= "Secondary Boot" 6 1.11.2.1 he FILES= ${RELOCS:S/^/boot./g} 7 1.11.2.1 he CLEANFILES:= vers.c ${FILES} 8 1.11.2.1 he LINKS= ${BINDIR}/boot.${RELOC_DEFAULT} ${BINDIR}/boot 9 1.1 pk 10 1.5 mrg INCLUDE_LIBZ= yes 11 1.5 mrg SAMISCMAKEFLAGS= SA_USE_CREAD=yes 12 1.5 mrg 13 1.5 mrg .include "../Makefile.buildboot" 14 1.11.2.1 he .if exists(${.CURDIR}/../Makefile.inc) 15 1.11.2.1 he .include "${.CURDIR}/../Makefile.inc" 16 1.11.2.1 he .endif 17 1.11.2.1 he .include <bsd.own.mk> 18 1.11.2.2 he .include <bsd.obj.mk> 19 1.7 pk 20 1.11.2.1 he OBJS=${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g} 21 1.5 mrg 22 1.11.2.1 he LINKFLAGS= -N -e start 23 1.11.2.1 he 24 1.11.2.1 he all: ${FILES} 25 1.11.2.1 he 26 1.11.2.1 he vers.c: 27 1.5 mrg sh ${.CURDIR}/../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 28 1.11.2.1 he 29 1.11.2.1 he .for RELOC in ${RELOCS} 30 1.11.2.1 he boot.${RELOC}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 31 1.11.2.1 he ${LD} -o ${.TARGET} ${LINKFLAGS} -Ttext ${RELOC} ${OBJS} \ 32 1.11.2.1 he ${LIBSA} ${LIBZ} ${LIBKERN} 33 1.1 pk @size ${.TARGET} 34 1.11.2.1 he .endfor 35 1.6 pk 36 1.6 pk afterinstall: 37 1.6 pk # conjure up a magic header that is accepted by all Sun PROMS; 38 1.6 pk # see installboot.c for details. 39 1.8 pk printf '\01\03\01\07\060\200\0\07' | \ 40 1.8 pk dd of=${DESTDIR}/${BINDIR}/boot.net bs=32 conv=sync 41 1.6 pk dd if=${DESTDIR}/${BINDIR}/boot of=${DESTDIR}/${BINDIR}/boot.net \ 42 1.6 pk bs=32 skip=1 seek=1 43 1.6 pk chmod ${BINMODE} ${DESTDIR}/${BINDIR}/boot.net 44 1.6 pk chown ${BINOWN}.${BINGRP} ${DESTDIR}/${BINDIR}/boot.net 45 1.1 pk 46 1.11.2.1 he clean cleandir: cleanprog 47 1.11.2.1 he 48 1.11.2.1 he cleanprog: 49 1.11.2.1 he rm -f ${OBJS} ${CLEANFILES} 50 1.11.2.1 he 51 1.11.2.1 he .include <bsd.files.mk> 52 1.11.2.1 he .include <bsd.links.mk> 53