Makefile.booters revision 1.6
1# $NetBSD: Makefile.booters,v 1.6 1997/07/15 13:02:04 drochner Exp $ 2 3BINDIR= /usr/mdec 4STRIPFLAG= 5BINMODE=444 6 7.PATH: ${.CURDIR}/../lib/crt/bootsect ${.CURDIR}/../lib 8BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o 9.PATH: ${.CURDIR}/../lib/crt/rom 10ROMSTART= start_rom.o 11.if exists(${.CURDIR}/../genprom/obj) 12GENPROM= ${.CURDIR}/../genprom/obj/genprom 13.else 14GENPROM= ${.CURDIR}/../genprom/genprom 15.endif 16.PATH: ${.CURDIR}/../lib/crt/dos 17DOSSTART= start_dos.o doscommain.o exec_fromdos.o 18 19CPPFLAGS += -I${.OBJDIR} -I$S -I${.CURDIR}/../lib -I$S/lib/libsa 20CPPFLAGS+= -D_STANDALONE 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= ${.CURDIR}/../lib # XXX 51.include "${I386DIR}/Makefile.inc" 52LIBI386= ${I386LIB} 53 54${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} 55 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \ 56 ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 57 58${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} 59 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \ 60 ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 61 cp ${PROG}.sym ${PROG}.bin 62 strip ${PROG}.bin 63 dd if=${PROG}.bin ibs=32 skip=1 | ${GENPROM} $(ROM_SIZE) > ${PROG}.rom || (rm ${PROG}.rom; false) 64 rm -f ${PROG}.bin 65 66${PROG}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} 67 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \ 68 ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 69 cp ${PROG}.sym ${PROG}.bin 70 strip ${PROG}.bin 71 dd if=${PROG}.bin of=${PROG}.com ibs=32 skip=1 obs=1024b 72 rm -f ${PROG}.bin 73 74${GENPROM}: 75 @echo "genprom" missing 76 @false 77