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