Makefile.booters revision 1.10
1# $NetBSD: Makefile.booters,v 1.10 1997/10/18 21:46:27 hubertf Exp $ 2 3BINDIR= /usr/mdec 4STRIPFLAG= 5BINMODE=444 6 7I386_STAND_DIR?= $S/arch/i386/stand 8 9.PATH: ${I386_STAND_DIR}/lib/crt/bootsect ${I386_STAND_DIR}/lib 10BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o 11.PATH: ${I386_STAND_DIR}/lib/crt/rom 12ROMSTART= start_rom.o 13GENPROMDIR= ${I386_STAND_DIR}/genprom 14.PATH: ${I386_STAND_DIR}/lib/crt/dos 15DOSSTART= start_dos.o doscommain.o exec_fromdos.o 16 17CPPFLAGS += -I${.OBJDIR} -I$S -I${I386_STAND_DIR}/lib -I$S/lib/libsa 18CPPFLAGS+= -D_STANDALONE 19 20CLEANFILES+= vers.c vers.o ${BASE}.list 21 22.BEGIN: ${.OBJDIR}/machine 23depend all: ${.OBJDIR}/machine 24CLEANFILES+= ${.OBJDIR}/machine 25 26${.OBJDIR}/machine:: 27 -rm -f $@ 28 ln -s $S/arch/i386/include $@ 29 30### find out what to use for libkern 31KERN_AS= library 32# XXX only bzero is missing in libkern, but we have to list all we need 33KERNMISCMAKEFLAGS= "SRCS=bzero.S bcmp.S strchr.c strncpy.c strcmp.S __main.c" 34.include "${S}/lib/libkern/Makefile.inc" 35LIBKERN= ${KERNLIB} 36 37### find out what to use for libz 38Z_AS= library 39.include "${S}/lib/libz/Makefile.inc" 40LIBZ= ${ZLIB} 41 42### find out what to use for libsa 43SA_AS= library 44.include "${S}/lib/libsa/Makefile.inc" 45LIBSA= ${SALIB} 46 47### find out what to use for libi386 48I386DIR= ${I386_STAND_DIR}/lib 49.include "${I386DIR}/Makefile.inc" 50LIBI386= ${I386LIB} 51 52vers.o: 53 sh ${I386_STAND_DIR}/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} 54 ${COMPILE.c} vers.c 55 56${BASE}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o 57 ${LD} -o ${BASE}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \ 58 vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${BASE}.list 59 60${BASE}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o 61 ${LD} -o ${BASE}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \ 62 vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${BASE}.list 63 cp ${BASE}.sym ${BASE}.bin 64 strip ${BASE}.bin 65 (cd ${GENPROMDIR}; ${MAKE} rom BINFILE=${.OBJDIR:Q}/${BASE:Q}.bin \ 66 ROMFILE=${.OBJDIR:Q}/${BASE:Q}.rom ROM_SIZE=${ROM_SIZE:Q}) 67 rm -f ${BASE}.bin 68 69${BASE}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o 70 ${LD} -o ${BASE}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \ 71 vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${BASE}.list 72 cp ${BASE}.sym ${BASE}.bin 73 strip ${BASE}.bin 74 dd if=${BASE}.bin of=${BASE}.com ibs=32 skip=1 obs=1024b 75 rm -f ${BASE}.bin 76 77.include <bsd.prog.mk> 78