1996-06-14 10:04:54 +00:00
|
|
|
# Makefile,v 1.4 1994/12/31 17:16:49 jkh Exp
|
|
|
|
#
|
|
|
|
# Makefile for NETBOOT
|
|
|
|
#
|
|
|
|
# Basic Options:
|
1998-07-02 12:37:36 +00:00
|
|
|
# -DSECURE_BOOT - Disable 'boot>' prompt completely
|
1996-06-14 10:04:54 +00:00
|
|
|
# -DASK_BOOT - Ask "Boot from Network (Y/N) ?" at startup
|
|
|
|
# -DROMSIZE - Size of EPROM - Must be set (even for .COM files)
|
|
|
|
# -DRELOC - Relocation address (usually 0x90000)
|
|
|
|
#
|
|
|
|
# NS8390 Options:
|
|
|
|
# -DINCLUDE_WD - Include Western Digital/SMC support
|
|
|
|
# -DINCLUDE_NE - Include NE1000/NE2000 support
|
|
|
|
# -DINCLUDE_3COM - Include 3c503 support
|
|
|
|
# -D_3COM_USE_AUI - Disable transceiver on 3c503 by default
|
|
|
|
# -DNE_BASE - Base I/O address for NE1000/NE2000
|
|
|
|
# -D_3COM_BASE - Base I/O address for 3c503
|
|
|
|
# -DWD_DEFAULT_MEM- Default memory location for WD/SMC cards
|
|
|
|
# -DINCLUDE_EGY - Include MELCO EGY support
|
|
|
|
# -DINCLUDE_LGY - Include MELCO LGY support
|
|
|
|
# -DINCLUDE_ICM - Include IF-2766 support
|
|
|
|
# -DINCLUDE_SIC - Include SIC supoort
|
|
|
|
# -DED_BASE - Base I/O address for NE1000/NE2000
|
|
|
|
# -DSIC_DEFAULT_MEM- Default memory location for WD/SMC cards
|
|
|
|
# XXX nothing depends on this Makefile so you must run `make clean' after
|
|
|
|
# changing an option.
|
|
|
|
#
|
|
|
|
|
|
|
|
### options for PCI cards
|
|
|
|
###
|
|
|
|
#PCI_VENDOR=0x10ec
|
|
|
|
#PCI_DEVICE=0x8029
|
|
|
|
#PCI_CLASS=0x02,0x00,0x00
|
|
|
|
|
|
|
|
PROG= nb8390.com nb8390.rom
|
|
|
|
# Order is very important on the SRCS line for this prog
|
|
|
|
SRCS= start2.S main.c misc.c bootmenu.c rpc.c
|
|
|
|
|
|
|
|
BINDIR= /usr/mdec
|
|
|
|
BINMODE= 555
|
1997-08-17 05:13:27 +00:00
|
|
|
CFLAGS= -O2 -DNFS -DROMSIZE=${ROMSIZE} -DRELOC=${RELOCADDR} -DASK_BOOT
|
1996-06-14 10:04:54 +00:00
|
|
|
CFLAGS+= -DPC98
|
|
|
|
#CFLAGS += -DPCI -DPCI_VENDOR=${PCI_VENDOR} -DPCI_DEVICE=${PCI_DEVICE}
|
|
|
|
#CFLAGS += -DPCI_CLASS=${PCI_CLASS} -DASK_BOOT
|
|
|
|
#NS8390= -DINCLUDE_WD -DWD_DEFAULT_MEM=0xD0000
|
|
|
|
#NS8390= -DINCLUDE_NE
|
|
|
|
#NS8390+= -DINCLUDE_3COM -D_3COM_BASE=0x300
|
1997-08-17 05:13:27 +00:00
|
|
|
NS8390= -DINCLUDE_EGY -DNE_BASE=0xd0
|
1998-03-07 15:48:29 +00:00
|
|
|
CLEANFILES+= netboot.com
|
1996-06-14 10:04:54 +00:00
|
|
|
CLEANFILES+= makerom start2.ro 3c509.o ns8390.o
|
1998-07-08 08:53:43 +00:00
|
|
|
ROMLDFLAGS= ${LDFLAGS} -N -T ${RELOCADDR} -e _start -nostdlib
|
1996-06-14 10:04:54 +00:00
|
|
|
NOSHARED= YES
|
|
|
|
NOMAN=
|
|
|
|
STRIP=
|
|
|
|
|
|
|
|
ROMSIZE=16384
|
|
|
|
RELOCADDR=0x90000
|
|
|
|
|
|
|
|
.SUFFIXES: .ro
|
|
|
|
|
|
|
|
.S.ro:
|
|
|
|
${CC} ${CFLAGS} -DBOOTROM -o ${.TARGET} -c ${.IMPSRC}
|
|
|
|
|
1998-07-08 08:53:43 +00:00
|
|
|
build-tools: makerom
|
|
|
|
|
1996-06-14 10:04:54 +00:00
|
|
|
ns8390.o: ns8390.c
|
1997-08-17 05:13:27 +00:00
|
|
|
${CC} ${CFLAGS} $(NS8390) -o ${.TARGET} -c $<
|
1996-06-14 10:04:54 +00:00
|
|
|
|
|
|
|
makerom: makerom.c
|
1998-07-08 08:53:43 +00:00
|
|
|
${CC} ${CFLAGS} -DROMSIZE=${ROMSIZE} ${LDFLAGS} -o ${.TARGET} \
|
|
|
|
${.CURDIR}/makerom.c
|
1996-06-14 10:04:54 +00:00
|
|
|
|
|
|
|
nb8390.rom: makerom start2.ro ${SRCS:N*.h:R:S/$/.o/g} ns8390.o
|
1998-07-08 08:53:43 +00:00
|
|
|
${LD} ${ROMLDFLAGS} -o ${.TARGET} ${OBJS:S/start2.o/start2.ro/} ns8390.o
|
1996-06-14 10:04:54 +00:00
|
|
|
strip ${.TARGET}
|
|
|
|
size ${.TARGET}
|
|
|
|
${.OBJDIR}/makerom ${.TARGET}
|
|
|
|
|
|
|
|
nb3c509.rom: makerom start2.ro ${SRCS:N*.h:R:S/$/.o/g} 3c509.o
|
1998-07-08 08:53:43 +00:00
|
|
|
${LD} ${ROMLDFLAGS} -o ${.TARGET} ${OBJS:S/start2.o/start2.ro/} 3c509.o
|
1996-06-14 10:04:54 +00:00
|
|
|
strip ${.TARGET}
|
|
|
|
size ${.TARGET}
|
|
|
|
${.OBJDIR}/makerom ${.TARGET}
|
|
|
|
|
|
|
|
nb8390.com: makerom start2.ro ${SRCS:N*.h:R:S/$/.o/g} ns8390.o
|
1998-07-08 08:53:43 +00:00
|
|
|
${LD} ${ROMLDFLAGS} -o ${.TARGET}.tmp ${OBJS} ns8390.o
|
1997-10-12 11:56:06 +00:00
|
|
|
strip ${.TARGET}.tmp
|
|
|
|
size ${.TARGET}.tmp
|
|
|
|
dd ibs=32 skip=1 if=${.TARGET}.tmp of=${.TARGET}
|
|
|
|
rm -f ${.TARGET}.tmp
|
1996-06-14 10:04:54 +00:00
|
|
|
|
|
|
|
nb3c509.com: start2.o ${SRCS:N*.h:R:S/$/.o/g} 3c509.o
|
1998-07-08 08:53:43 +00:00
|
|
|
${LD} ${ROMLDFLAGS} -o ${.TARGET}.tmp ${OBJS} 3c509.o
|
1997-10-12 11:56:06 +00:00
|
|
|
strip ${.TARGET}.tmp
|
|
|
|
size ${.TARGET}.tmp
|
|
|
|
dd ibs=32 skip=1 if=${.TARGET}.tmp of=${.TARGET}
|
|
|
|
rm -f ${.TARGET}.tmp
|
1996-06-14 10:04:54 +00:00
|
|
|
|
1998-03-07 15:48:29 +00:00
|
|
|
# This force the creation of the "machine" symlink. These objects are
|
|
|
|
# specially handled in this file, and thus can't be taken care of in
|
|
|
|
# ../Makefile.inc
|
1998-07-02 12:37:36 +00:00
|
|
|
3c509.o makerom ns8390.o start2.ro: machine
|
1996-06-14 10:04:54 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|