1997-08-20 20:53:30 +04:00
|
|
|
# $NetBSD: Makefile.booters,v 1.8 1997/08/20 16:53:31 drochner Exp $
|
1997-03-14 05:40:29 +03:00
|
|
|
|
|
|
|
BINDIR= /usr/mdec
|
1997-04-17 11:27:46 +04:00
|
|
|
STRIPFLAG=
|
1997-03-14 05:40:29 +03:00
|
|
|
BINMODE=444
|
|
|
|
|
1997-08-20 20:53:30 +04:00
|
|
|
I386_STAND_DIR?= $S/arch/i386/stand
|
|
|
|
|
|
|
|
.PATH: ${I386_STAND_DIR}/lib/crt/bootsect ${I386_STAND_DIR}/lib
|
1997-06-13 17:12:29 +04:00
|
|
|
BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o
|
1997-08-20 20:53:30 +04:00
|
|
|
.PATH: ${I386_STAND_DIR}/lib/crt/rom
|
1997-03-14 05:40:29 +03:00
|
|
|
ROMSTART= start_rom.o
|
1997-08-20 20:53:30 +04:00
|
|
|
GENPROMDIR= ${I386_STAND_DIR}/genprom
|
|
|
|
.PATH: ${I386_STAND_DIR}/lib/crt/dos
|
1997-06-13 21:49:22 +04:00
|
|
|
DOSSTART= start_dos.o doscommain.o exec_fromdos.o
|
1997-03-14 05:40:29 +03:00
|
|
|
|
1997-08-20 20:53:30 +04:00
|
|
|
CPPFLAGS += -I${.OBJDIR} -I$S -I${I386_STAND_DIR}/lib -I$S/lib/libsa
|
1997-06-26 23:03:32 +04:00
|
|
|
CPPFLAGS+= -D_STANDALONE
|
1997-03-14 05:40:29 +03:00
|
|
|
|
1997-07-26 05:50:36 +04:00
|
|
|
CLEANFILES+= vers.c vers.o
|
|
|
|
|
1997-07-15 17:02:04 +04:00
|
|
|
.BEGIN: ${.OBJDIR}/machine
|
|
|
|
depend all: ${.OBJDIR}/machine
|
|
|
|
CLEANFILES+= ${.OBJDIR}/machine
|
|
|
|
|
|
|
|
${.OBJDIR}/machine::
|
|
|
|
-rm $@
|
|
|
|
ln -s $S/arch/i386/include $@
|
|
|
|
|
1997-03-14 05:40:29 +03:00
|
|
|
.include <bsd.prog.mk>
|
|
|
|
|
|
|
|
### 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
|
1997-08-20 20:53:30 +04:00
|
|
|
I386DIR= ${I386_STAND_DIR}/lib
|
1997-03-14 05:40:29 +03:00
|
|
|
.include "${I386DIR}/Makefile.inc"
|
|
|
|
LIBI386= ${I386LIB}
|
|
|
|
|
1997-07-26 05:50:36 +04:00
|
|
|
vers.o:
|
1997-08-20 20:53:30 +04:00
|
|
|
sh ${I386_STAND_DIR}/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
1997-07-26 05:50:36 +04:00
|
|
|
${COMPILE.c} vers.c
|
|
|
|
|
|
|
|
${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o
|
1997-03-14 05:40:29 +03:00
|
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \
|
1997-07-26 05:50:36 +04:00
|
|
|
vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
|
1997-03-14 05:40:29 +03:00
|
|
|
|
1997-07-26 05:50:36 +04:00
|
|
|
${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o
|
1997-03-14 05:40:29 +03:00
|
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \
|
1997-07-26 05:50:36 +04:00
|
|
|
vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
|
1997-03-14 05:40:29 +03:00
|
|
|
cp ${PROG}.sym ${PROG}.bin
|
|
|
|
strip ${PROG}.bin
|
1997-08-20 20:53:30 +04:00
|
|
|
(cd ${GENPROMDIR}; ${MAKE} rom BINFILE=${.OBJDIR:Q}/${PROG:Q}.bin \
|
|
|
|
ROMFILE=${.OBJDIR:Q}/${PROG:Q}.rom ROM_SIZE=${ROM_SIZE:Q})
|
1997-03-14 05:40:29 +03:00
|
|
|
rm -f ${PROG}.bin
|
|
|
|
|
1997-07-26 05:50:36 +04:00
|
|
|
${PROG}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386} vers.o
|
1997-03-14 05:40:29 +03:00
|
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \
|
1997-07-26 05:50:36 +04:00
|
|
|
vers.o ${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
|
1997-03-14 05:40:29 +03:00
|
|
|
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
|