2eb5a59f71
little hacking by me. This isn't strictly identical to his 920312 release -- I've hacked it a bit -- but since we are taking over change control it doesn't matter much.
69 lines
2.1 KiB
Makefile
69 lines
2.1 KiB
Makefile
# $NetBSD: Makefile.booters,v 1.1.1.1 1997/03/14 02:40:29 perry Exp $
|
|
|
|
BINDIR= /usr/mdec
|
|
STRIP=
|
|
BINMODE=444
|
|
|
|
.PATH: ${.CURDIR}/../lib/crt/bootsect ${.CURDIR}/../lib
|
|
BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.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
|
|
|
|
CPPFLAGS += -I$S -I${.CURDIR}/../lib -I$S/lib/libsa
|
|
|
|
.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
|
|
I386DIR= ${.CURDIR}/../lib # XXX
|
|
.include "${I386DIR}/Makefile.inc"
|
|
LIBI386= ${I386LIB}
|
|
|
|
${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \
|
|
${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
|
|
|
|
${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \
|
|
${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}
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \
|
|
${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
|
|
|