freebsd-dev/sys/boot/alpha/netboot/Makefile
Mike Smith c2f9d95de5 This is the new unified bootstrap, sometimes known previously as the
'three-stage' bootstrap.
There are a number of caveats with the code in its current state:
 - The i386 bootstrap only supports booting from a floppy.
 - The kernel and kld do not yet know how to deal with the extended
   information and module summary passed in.
 - PnP-based autodetection and demand loading of modules is not implemented.
 - i386 ELF kernel loading is not ready yet.
 - The i386 bootstrap is loaded via an ugly blockmap.

On the alpha, both net- and disk-booting (SRM console machines only) is
supported.  No blockmaps are used by this code.

Obtained from:	Parts from the NetBSD/i386 standalone bootstrap.
1998-08-21 03:17:42 +00:00

73 lines
1.7 KiB
Makefile

# $NetBSD: Makefile,v 1.12 1998/02/19 14:18:36 drochner Exp $
BASE= netboot
PROG= ${BASE}
NOMAN=
NEWVERSWHAT= "SRM net boot"
.PATH: ${.CURDIR}/../common
# i386-specific bootstrap sources
SRCS+= main.c conf.c dev_net.c
# Always add MI sources
.PATH: ${.CURDIR}/../../common
.include <${.CURDIR}/../../common/Makefile.inc>
CFLAGS+= -mno-fp-regs
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
# Verbose ls causes extra heap usage
CFLAGS+= -DVERBOSE_LS
CLEANFILES+= vers.c vers.o gensetdefs.o gensetdefs setdef0.o setdef1.o \
setdefs.h start.o
CLEANFILES+= ${BASE} ${BASE}.sym ${BASE}.list
CFLAGS+= -Wall
# XXX fix to use "standard" versions
LIBSTANDDIR= /home/dfr/FreeBSD/alpha/src/lib/libstand
LIBSTAND= ${LIBSTANDDIR}/obj/libstand.a
CFLAGS+= -I${LIBSTANDDIR}
LIBALPHA= ${.CURDIR}/../libalpha/obj/libalpha.a
CFLAGS+= -I${.CURDIR}/..
CRT= start.o
STRIP=
all: ${BASE}
vers.o: ${.CURDIR}/newvers.sh ${.CURDIR}/Makefile
sh ${.CURDIR}/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
${CC} -c vers.c
${BASE}: ${BASE}.sym
objcopy -O binary ${BASE}.sym ${BASE}
${BASE}.nosym: ${BASE}.sym
cp ${BASE}.sym ${BASE}.nosym
strip ${BASE}.nosym
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBALPHA} ${CRT} vers.o setdef0.o setdef1.o
${LD} -o ${BASE}.sym -M -e start -N -Ttext ${PRIMARY_LOAD_ADDRESS} \
${CRT} setdef0.o ${OBJS} setdef1.o \
vers.o ${LIBSTAND} ${LIBALPHA} ${LIBSTAND} >${.OBJDIR}/${BASE}.list
start.o: ${.CURDIR}/../libalpha/start.S
${CC} -c -DPRIMARY_BOOTBLOCK $<
setdef0.o: setdefs.h
setdef1.o: setdefs.h
.include <bsd.prog.mk>
setdefs.h: gensetdefs ${OBJS}
@echo Generating linker sets
@./gensetdefs ${OBJS} >setdefs.h
gensetdefs: gensetdefs.o
${CC} -static gensetdefs.o -o $@
gensetdefs.o: gensetdefs.c
${CC} -c $<