Makefile.booters revision 1.5
1# $NetBSD: Makefile.booters,v 1.5 1997/06/26 19:03:32 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$S -I${.CURDIR}/../lib -I$S/lib/libsa 20CPPFLAGS+= -D_STANDALONE 21 22.include <bsd.prog.mk> 23 24### find out what to use for libkern 25KERN_AS= library 26# XXX only bzero is missing in libkern, but we have to list all we need 27KERNMISCMAKEFLAGS= "SRCS=bzero.S bcmp.S strchr.c strncpy.c strcmp.S __main.c" 28.include "${S}/lib/libkern/Makefile.inc" 29LIBKERN= ${KERNLIB} 30 31### find out what to use for libz 32Z_AS= library 33.include "${S}/lib/libz/Makefile.inc" 34LIBZ= ${ZLIB} 35 36### find out what to use for libsa 37SA_AS= library 38.include "${S}/lib/libsa/Makefile.inc" 39LIBSA= ${SALIB} 40 41### find out what to use for libi386 42I386DIR= ${.CURDIR}/../lib # XXX 43.include "${I386DIR}/Makefile.inc" 44LIBI386= ${I386LIB} 45 46${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} 47 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \ 48 ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 49 50${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} 51 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \ 52 ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 53 cp ${PROG}.sym ${PROG}.bin 54 strip ${PROG}.bin 55 dd if=${PROG}.bin ibs=32 skip=1 | ${GENPROM} $(ROM_SIZE) > ${PROG}.rom || (rm ${PROG}.rom; false) 56 rm -f ${PROG}.bin 57 58${PROG}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} 59 ${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \ 60 ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list 61 cp ${PROG}.sym ${PROG}.bin 62 strip ${PROG}.bin 63 dd if=${PROG}.bin of=${PROG}.com ibs=32 skip=1 obs=1024b 64 rm -f ${PROG}.bin 65 66${GENPROM}: 67 @echo "genprom" missing 68 @false 69 70