1997-01-18 03:59:46 +03:00
|
|
|
# $NetBSD: Makefile,v 1.6 1997/01/18 00:59:47 cgd Exp $
|
1996-09-19 00:03:04 +04:00
|
|
|
|
1997-01-16 05:59:08 +03:00
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/.. ${.CURDIR}/../boot
|
1996-09-19 00:03:04 +04:00
|
|
|
|
|
|
|
BOOT_PROG = netboot
|
|
|
|
BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
|
|
|
|
|
1997-01-18 03:59:46 +03:00
|
|
|
BOOT_SRCS = start.S boot.c prom.c prom_disp.S OSFpal.c prom_swpal.S
|
1997-01-16 05:59:08 +03:00
|
|
|
BOOT_SRCS+= rpcc.S
|
1996-09-19 00:03:04 +04:00
|
|
|
|
|
|
|
BOOT_SRCS+= dev_net.c conf.c devopen.c
|
|
|
|
|
|
|
|
BOOT_SRCS+= if_prom.c loadfile.c getsecs.c
|
|
|
|
|
|
|
|
BOOT_OBJS = ${BOOT_SRCS:N*.h:R:S/$/.o/g}
|
|
|
|
|
|
|
|
HEADERSIZE_PROG = headersize
|
|
|
|
|
1997-01-16 05:59:08 +03:00
|
|
|
### find out what to use for libkern
|
|
|
|
KERN_AS= library
|
|
|
|
.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
|
|
|
|
SAREL=
|
1997-01-18 00:14:31 +03:00
|
|
|
#SA_USE_CREAD= yes
|
1997-01-16 05:59:08 +03:00
|
|
|
EXTRACFLAGS= -mno-fp-regs
|
|
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
|
|
LIBSA= ${SALIB}
|
|
|
|
|
1996-09-19 00:03:04 +04:00
|
|
|
AFLAGS += -DASSEMBLER
|
1997-01-16 05:59:08 +03:00
|
|
|
CPPFLAGS += -I${.CURDIR}/../.. -I${.CURDIR}/../../../.. \
|
|
|
|
-DALPHA_BOOT_ECOFF -DALPHA_BOOT_ELF \
|
|
|
|
-DPRIMARY_BOOTBLOCK
|
1996-09-19 00:03:04 +04:00
|
|
|
CFLAGS = -Werror -mno-fp-regs -g
|
|
|
|
|
1997-01-16 05:59:08 +03:00
|
|
|
CLEANFILES+= vers.c vers.o ${BOOT_PROG}.sym ${BOOT_PROG}.nosym \
|
|
|
|
${HEADERSIZE_PROG}
|
1996-09-19 00:03:04 +04:00
|
|
|
|
|
|
|
all: ${BOOT_PROG}
|
|
|
|
|
1997-01-18 00:14:31 +03:00
|
|
|
${BOOT_PROG}.sym: ${BOOT_OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
1996-09-19 00:03:04 +04:00
|
|
|
sh ${.CURDIR}/newvers.sh ${.CURDIR}/version
|
|
|
|
${COMPILE.c} vers.c
|
1997-01-16 05:59:08 +03:00
|
|
|
${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${BOOT_PROG}.sym \
|
1997-01-18 00:14:31 +03:00
|
|
|
${BOOT_OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
|
1997-01-16 05:59:08 +03:00
|
|
|
size ${BOOT_PROG}.sym
|
|
|
|
|
|
|
|
${BOOT_PROG}.nosym: ${BOOT_PROG}.sym
|
|
|
|
cp ${BOOT_PROG}.sym ${BOOT_PROG}.nosym
|
|
|
|
strip ${BOOT_PROG}.nosym
|
|
|
|
|
|
|
|
${BOOT_PROG}: ${BOOT_PROG}.nosym ${HEADERSIZE_PROG}
|
|
|
|
dd if=${BOOT_PROG}.nosym of=${BOOT_PROG} \
|
|
|
|
bs=`./${HEADERSIZE_PROG} ${BOOT_RELOC} ${BOOT_PROG}.nosym` skip=1
|
1996-09-19 00:03:04 +04:00
|
|
|
|
|
|
|
install:
|
1996-10-18 09:55:26 +04:00
|
|
|
${INSTALL} -c -o bin -g bin -m 444 ${BOOT_PROG} \
|
1996-09-19 00:03:04 +04:00
|
|
|
${DESTDIR}${BINDIR}/${BOOT_PROG}
|
|
|
|
|
1997-01-16 05:59:08 +03:00
|
|
|
clean::
|
1996-09-19 00:03:04 +04:00
|
|
|
rm -f a.out [Ee]rrs mklog core *.core \
|
1997-01-16 05:59:08 +03:00
|
|
|
${BOOT_PROG} ${BOOT_OBJS} ${CLEANFILES}
|
1996-09-19 00:03:04 +04:00
|
|
|
|
1997-01-16 05:59:08 +03:00
|
|
|
cleandir: clean
|
1996-09-19 00:03:04 +04:00
|
|
|
|
|
|
|
.include "${.CURDIR}/../Makefile.inc"
|
|
|
|
.include <bsd.obj.mk>
|
|
|
|
.include <bsd.dep.mk>
|