freebsd-skq/sys/i386/boot/netboot/Makefile
Jordan K. Hubbard 68cbb04819 Many fixes from Bill Paul:
Smack the netboot program around so that it will allow the user to
  specify mount options.  [So that you can boot from a privileged port]

  Change the default boot image name in netboot to /kernel, then strip
  the leading slash when actually going out to get the NFS file handle.

  Added support for 3Com 3c503 cards. Also added another command to
  the (trans) that allows you to switch the 3Com's on-board transceiver
  on and off. (ether.c, ether.h, bootmenu.c)

  Modified the Makefile to support new compile-time options for 3c503
  cards:

  -DINCLUDE_3COM                Include support for 3c503
  -D_3COM_BASE=0x300            Define 3c503 base i/o address (if not
                                specified, 0x300 is the default)
  -D_3COM_USE_AUI               Disable the 3c503's transceiver by
                                default (without this flag the transceiver
                                is on by default)
1994-11-17 12:16:07 +00:00

77 lines
2.2 KiB
Makefile

# $Id: Makefile,v 1.2 1994/10/28 22:13:22 phk Exp $
#
# Makefile for NETBOOT
#
# Options:
# -DASK_BOOT - Ask "Boot from Network (Y/N) ?" at startup
# -DSMALL_ROM - Compile for 8K ROMS
# -DROMSIZE - Size of EPROM - Must be set (even for .COM files)
# -DRELOC - Relocation address (usually 0x90000)
# -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
#
PROG= netboot.com
# Order is very important on the SRCS line for this prog
SRCS= start2.S main.c misc.c ether.c bootmenu.c rpc.c
BINDIR= /usr/mdec
BINMODE= 555
CFLAGS= -O2 -DNFS -DROMSIZE=${ROMSIZE} -DRELOC=${RELOCADDR}
#CFLAGS+= -DINCLUDE_WD -DWD_DEFAULT_MEM=0xD0000
#CFLAGS+= -DINCLUDE_NE -DNE_BASE=0x320
CFLAGS+= -DINCLUDE_3COM -D_3COM_BASE=0x300
CLEANFILES+= netboot.com.nohdr netboot.com.strip
CLEANFILES+= netboot.rom.nohdr netboot.rom.strip netboot.rom
CLEANFILES+= makerom start2.ro
LDFLAGS+= -N -T ${RELOCADDR} -e _start -nostdlib
NOSHARED= YES
NOMAN=
STRIP=
ROMSIZE=16384
RELOCADDR=0x90000
.SUFFIXES: .ro
.S.ro:
${CC} ${CFLAGS} -DBOOTROM -o ${.TARGET} -c ${.IMPSRC}
makerom: makerom.c
${CC} -o ${.TARGET} -DROMSIZE=${ROMSIZE} ${.CURDIR}/makerom.c
netboot.rom: makerom start2.ro ${OBJS}
${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS:S/start2.o/start2.ro/}
netboot.rom.strip: netboot.rom
cp -p netboot.rom ${.TARGET}
strip ${.TARGET}
size ${.TARGET}
netboot.rom.nohdr: netboot.rom.strip
dd ibs=32 skip=1 if=netboot.rom.strip of=${.TARGET}
${.OBJDIR}/makerom ${.TARGET}
netboot.com.strip: netboot.com
cp -p netboot.com ${.TARGET}
strip ${.TARGET}
size ${.TARGET}
netboot.com.nohdr: netboot.com.strip
dd ibs=32 skip=1 if=netboot.com.strip of=${.TARGET}
all: netboot.com.nohdr netboot.rom.nohdr
install:
install ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}\
netboot.com.nohdr ${DESTDIR}${BINDIR}/netboot.com
install ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}\
netboot.rom.nohdr ${DESTDIR}${BINDIR}/netboot.rom
.include <bsd.prog.mk>