# $NetBSD: Makefile.booters,v 1.7 1997/07/26 01:50:36 thorpej Exp $ BINDIR= /usr/mdec STRIPFLAG= BINMODE=444 .PATH: ${.CURDIR}/../lib/crt/bootsect ${.CURDIR}/../lib BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o .PATH: ${.CURDIR}/../lib/crt/rom ROMSTART= start_rom.o .if exists(${.CURDIR}/../genprom/obj) GENPROM= ${.CURDIR}/../genprom/obj/genprom .else GENPROM= ${.CURDIR}/../genprom/genprom .endif .PATH: ${.CURDIR}/../lib/crt/dos DOSSTART= start_dos.o doscommain.o exec_fromdos.o CPPFLAGS += -I${.OBJDIR} -I$S -I${.CURDIR}/../lib -I$S/lib/libsa CPPFLAGS+= -D_STANDALONE CLEANFILES+= vers.c vers.o .BEGIN: ${.OBJDIR}/machine depend all: ${.OBJDIR}/machine CLEANFILES+= ${.OBJDIR}/machine ${.OBJDIR}/machine:: -rm $@ ln -s $S/arch/i386/include $@ .include ### find out what to use for libkern KERN_AS= library # XXX only bzero is missing in libkern, but we have to list all we need KERNMISCMAKEFLAGS= "SRCS=bzero.S bcmp.S strchr.c strncpy.c strcmp.S __main.c" .include "${S}/lib/libkern/Makefile.inc" LIBKERN= ${KERNLIB} ### find out what to use for libz Z_AS= library .include "${S}/lib/libz/Makefile.inc" LIBZ= ${ZLIB} ### find out what to use for libsa SA_AS= library .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} ### find out what to use for libi386 I386DIR= ${.CURDIR}/../lib # XXX .include "${I386DIR}/Makefile.inc" LIBI386= ${I386LIB} vers.o: sh ${.CURDIR}/../newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} ${COMPILE.c} vers.c ${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o ${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \ vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list ${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o ${LD} -o ${PROG}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \ vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list cp ${PROG}.sym ${PROG}.bin strip ${PROG}.bin dd if=${PROG}.bin ibs=32 skip=1 | ${GENPROM} $(ROM_SIZE) > ${PROG}.rom || (rm ${PROG}.rom; false) rm -f ${PROG}.bin ${PROG}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o ${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \ vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list cp ${PROG}.sym ${PROG}.bin strip ${PROG}.bin dd if=${PROG}.bin of=${PROG}.com ibs=32 skip=1 obs=1024b rm -f ${PROG}.bin ${GENPROM}: @echo "genprom" missing @false