Makefile.booters revision 1.8
1# $NetBSD: Makefile.booters,v 1.8 1997/08/20 16:53:31 drochner Exp $ 2 3BINDIR= /usr/mdec 4STRIPFLAG= 5BINMODE=444 6 7I386_STAND_DIR?= $S/arch/i386/stand 8 9.PATH: ${I386_STAND_DIR}/lib/crt/bootsect ${I386_STAND_DIR}/lib 10BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o 11.PATH: ${I386_STAND_DIR}/lib/crt/rom 12ROMSTART= start_rom.o 13GENPROMDIR= ${I386_STAND_DIR}/genprom 14.PATH: ${I386_STAND_DIR}/lib/crt/dos 15DOSSTART= start_dos.o doscommain.o exec_fromdos.o 16 17CPPFLAGS += -I${.OBJDIR} -I$S -I${I386_STAND_DIR}/lib -I$S/lib/libsa 18CPPFLAGS+= -D_STANDALONE 19 20CLEANFILES+= vers.c vers.o 21 22.BEGIN: ${.OBJDIR}/machine 23depend all: ${.OBJDIR}/machine 24CLEANFILES+= ${.OBJDIR}/machine 25 26${.OBJDIR}/machine:: 27 -rm $@ 28 ln -s $S/arch/i386/include $@ 29 30.include <bsd.prog.mk> 31 32### find out what to use for libkern 33KERN_AS= library 34# XXX only bzero is missing in libkern, but we have to list all we need 35KERNMISCMAKEFLAGS= "SRCS=bzero.S bcmp.S strchr.c strncpy.c strcmp.S __main.c" 36.include "${S}/lib/libkern/Makefile.inc" 37LIBKERN= ${KERNLIB} 38 39### find out what to use for libz 40Z_AS= library 41.include "${S}/lib/libz/Makefile.inc" 42LIBZ= ${ZLIB} 43 44### find out what to use for libsa 45SA_AS= library 46.include "${S}/lib/libsa/Makefile.inc" 47LIBSA= ${SALIB} 48 49### find out what to use for libi386 50I386DIR= ${I386_STAND_DIR}/lib 51.include "${I386DIR}/Makefile.inc" 52LIBI386= ${I386LIB} 53 54vers.o: 55 sh ${I386_STAND_DIR}/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 56 ${COMPILE.c} vers.c 57 58${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o 59 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \ 60 vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 61 62${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o 63 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \ 64 vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 65 cp ${PROG}.sym ${PROG}.bin 66 strip ${PROG}.bin 67 (cd ${GENPROMDIR}; ${MAKE} rom BINFILE=${.OBJDIR:Q}/${PROG:Q}.bin \ 68 ROMFILE=${.OBJDIR:Q}/${PROG:Q}.rom ROM_SIZE=${ROM_SIZE:Q}) 69 rm -f ${PROG}.bin 70 71${PROG}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o 72 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \ 73 vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 74 cp ${PROG}.sym ${PROG}.bin 75 strip ${PROG}.bin 76 dd if=${PROG}.bin of=${PROG}.com ibs=32 skip=1 obs=1024b 77 rm -f ${PROG}.bin 78