Clean up the build process to ensure libsa/libbug are built

before linking the bootloaders.
This commit is contained in:
scw 2000-12-04 21:25:57 +00:00
parent 349445391c
commit bfcd71c79c
6 changed files with 41 additions and 26 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.booters,v 1.4 2000/11/30 22:26:26 scw Exp $
# $NetBSD: Makefile.booters,v 1.5 2000/12/04 21:25:57 scw Exp $
S?= ${.CURDIR}/../../../..
MDEC_DIR?= /usr/mdec
@ -46,8 +46,11 @@ beforedepend: machine m68k
.else
${PROG}: machine m68k ${OBJS} ${LIBS} ${BUGCRT} ${SRTOBJ}
${LD} -N -Ttext ${RELOC} -o $@ ${SRTOBJ} ${BUGCRT} ${OBJS} ${LIBS}
PROGDEPENDS?= ${SRTOBJ} ${BUGCRT} ${OBJS} ${LIBS}
PROGLINKOBJS?= ${PROGDEPENDS}
${PROG}: machine m68k ${PROGDEPENDS}
${LD} -N -Ttext ${RELOC} -o $@ ${PROGLINKOBJS}
LIB_SA_DIR= ${.CURDIR}/../libsa
LIBSA_DIR!=cd ${LIB_SA_DIR}; \

View File

@ -1,9 +1,10 @@
# from: @(#)Makefile 8.1 (Berkeley) 6/10/93
# $NetBSD: Makefile,v 1.5 2000/07/24 18:39:10 jdolecek Exp $
# $NetBSD: Makefile,v 1.6 2000/12/04 21:25:58 scw Exp $
SRCS= boot.c conf.c
PROG= bootsd
LIBS= ${LIBSA} ${LIBBUG}
DPADD= ${LIBS}
.include "../Makefile.booters"

View File

@ -1,5 +1,5 @@
# from: @(#)Makefile 8.1 (Berkeley) 6/10/93
# $NetBSD: Makefile,v 1.11 2000/11/30 22:26:27 scw Exp $
# $NetBSD: Makefile,v 1.12 2000/12/04 21:25:58 scw Exp $
CLEANFILES+=stboot bootst bootst.bug
@ -7,7 +7,7 @@ PROG=bootst.bug
SRCS= boot.c conf.c dev_tape.c rawfs.c
LIBS= ${LIBSA} ${LIBBUG}
SRTOBJ=
DPADD= ${WRTVID}
DPADD= ${LIBS} ${WRTVID}
bootst stboot: ${PROG} ${WRTVID}
@${SIZE} bootst.bug

View File

@ -1,10 +1,13 @@
# from: @(#)Makefile 8.1 (Berkeley) 6/10/93
# $NetBSD: Makefile,v 1.6 2000/12/04 18:44:51 scw Exp $
# $NetBSD: Makefile,v 1.7 2000/12/04 21:25:58 scw Exp $
COMPILE.S= $(CC) -x assembler-with-cpp -traditional-cpp \
$(ASFLAGS) $(CPPFLAGS) $(INCPATH) -c -o $*.o
SRCS= bootxx.c conf.c block_x.S
PROG= bootxx
LIBS= ${LIBSA} ${LIBBUG}
SRTOBJ=
DPADD= ${LIBS}
.include "../Makefile.booters"

View File

@ -1,11 +1,12 @@
# $NetBSD: Makefile,v 1.11 2000/11/30 22:26:27 scw Exp $
# $NetBSD: Makefile,v 1.12 2000/12/04 21:25:58 scw Exp $
DEFS= -DSUN_BOOTPARAMS
SRCS= boot.c conf.c devopen.c dev_net.c
SRCS+= if_ie.c if_le.c
PROG= netboot.tmp
LIBS= ${LIBSA} ${LIBBUG}
PROG= netboot.tmp
LIBS= ${LIBSA} ${LIBBUG}
DPADD= ${LIBS}
CLEANFILES+= netboot.bin

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.9 2000/11/30 22:26:27 scw Exp $
# $NetBSD: Makefile,v 1.10 2000/12/04 21:25:58 scw Exp $
#
# sboot would like a newer GNU ld because it can generate S-Records.
@ -6,28 +6,35 @@
#
COMPILE.s= $(CC) -x assembler-with-cpp -traditional-cpp \
$(ASFLAGS) $(CPPFLAGS) -c -o $*.o
LDFLAGS=-x -N -Ttext 0x4000 -e start
$(ASFLAGS) $(CPPFLAGS) $(INCPATH) -c -o $*.o
RELOC= 0x4000
SRCS= start.s clock.c console.c etherfun.c le_poll.c oc_cksum.s sboot.c
CLEANFILES+= srec sboot
# OPTS= -Os
SRTOBJ=
PROG= sboot
PROGNAME= sboot.srec
LIBS= ${LIBSA}
DPADD= ${LIBS}
CLEANFILES+= srec sboot.srec
PROG= sboot.srec
PROGNAME= sboot
DPADD= srec sboot
PROGDEPENDS= ${OBJS} ${LIBS}
PROGLINKOBJS= ${OBJS} ${LIBS}
${PROG}:
${.OBJDIR}/srec 4 0x4000 ${.OBJDIR}/sboot > ${.TARGET} < ${.OBJDIR}/sboot
sboot: ${OBJS}
${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LIBSA}
sboot.srec: ${PROG} srec
${OBJCOPY} -O binary ${.OBJDIR}/sboot
${.OBJDIR}/srec 4 0x4000 ${.OBJDIR}/sboot \
> ${.TARGET} < ${.OBJDIR}/sboot
srec: srec.c
${HOST_CC} ${COPTS} ${.IMPSRC} -o ${.TARGET}
all: ${OBJS} ${PROG}
.include "../Makefile.booters"
all realall: sboot.srec
install: sboot.srec
${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${STRIPFLAG} ${INSTPRIV} \
-o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ${.OBJDIR}/sboot.srec \
${DESTDIR}${MDECDIR}/sboot
.include <bsd.prog.mk>