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