Make this work with OBJ dirs.

This commit is contained in:
pk 1995-09-30 21:43:35 +00:00
parent c1138ce68a
commit 13dcbfbb29
5 changed files with 32 additions and 23 deletions

View File

@ -1,11 +1,10 @@
# $NetBSD: Makefile,v 1.7 1995/09/16 23:20:22 pk Exp $
# $NetBSD: Makefile,v 1.8 1995/09/30 21:43:35 pk Exp $
SUBDIR= boot bootxx installboot
.BEGIN:
@([ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine)
### find out what to use for libkern and libsa
SAREL=
KERNREL=
.include "Makefile.inc"
.include "$S/lib/libsa/Makefile.inc"
.include "$S/lib/libkern/Makefile.inc"
@ -13,11 +12,10 @@ SUBDIR= boot bootxx installboot
all: ${SALIB} ${KERNLIB} _SUBDIRUSE
libdep:
@echo ${SALIB} ${KERNLIB}
@echo ${.OBJDIR}/${SALIB} ${.OBJDIR}/${KERNLIB}
clean:: _SUBDIRUSE
cleandir: _SUBDIRUSE
rm -rf lib machine
.include <bsd.subdir.mk>

View File

@ -1,9 +1,14 @@
# $NetBSD: Makefile.inc,v 1.2 1995/09/18 19:52:15 chuck Exp $
# $NetBSD: Makefile.inc,v 1.3 1995/09/30 21:43:36 pk Exp $
.if !defined(__stand_makefile_inc)
__stand_makefile_inc=1
S= ../../../${R}
S= ${.CURDIR}/../../../${R}
.if !make(libdep)
.BEGIN:
@([ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine)
.endif
RELOC_SUN4= 0x240000
RELOC_SUN4C= 0x340000
@ -12,11 +17,14 @@ RELOC_SUN4M= 0x440000
# Note: a `RELOC' value of 0x340000 seems to work on most machines
RELOC?= ${RELOC_SUN4C}
INCLUDES+= -I.. -I${S}/arch -I${S} -I${S}/lib/libsa
INCLUDES+= -I. -I${.CURDIR}/.. -I${S}/arch -I${S} -I${S}/lib/libsa
DEFS+= -DSTANDALONE -DRELOC=${RELOC} -DSUN4 -DSUN4C -DSUN_BOOTPARAMS
CFLAGS+= -O2 ${INCLUDES} ${DEFS}
srt0.o: srt0.S
${CC} ${CFLAGS} -DLOCORE -c ${.IMPSRC}
cleandir:
rm -rf lib machine
.endif

View File

@ -1,15 +1,15 @@
# $NetBSD: Makefile,v 1.1 1995/09/16 23:21:56 pk Exp $
# $NetBSD: Makefile,v 1.2 1995/09/30 21:43:38 pk Exp $
R= ..
.PATH: ${R}
.PATH: ${.CURDIR}/${R}
PROG= boot
SRCS= srt0.S boot.c promdev.c dvma.c net.c netif_sun.c conf.c version.c
NOMAN= 1
BINDIR= /usr/mdec
LIBS!= cd ./${R}; ${MAKE} libdep
LIBS!= cd ${.CURDIR}/${R}; ${MAKE} libdep
${PROG}:${OBJS} ${LIBS:S,^,../,g}
${LD} -N -T ${RELOC} -e start ${OBJS} ${LIBS:S,^,../,g}
${PROG}:${OBJS} ${LIBS}
${LD} -N -T ${RELOC} -e start ${OBJS} ${LIBS}
# convert to Sun magic
(echo -n 01 | tr 01 '\01\03'; tail +3c a.out) > ${.TARGET}
@rm a.out

View File

@ -1,18 +1,18 @@
# $NetBSD: Makefile,v 1.2 1995/09/18 23:32:41 pk Exp $
# $NetBSD: Makefile,v 1.3 1995/09/30 21:43:40 pk Exp $
R= ..
.PATH: ${R}
.PATH: ${.CURDIR}/${R}
PROG= bootxx
SRCS= srt0.S bootxx.c promdev.c dvma.c
NOMAN= 1
STRIP=
BINDIR= /usr/mdec
LIBS!= cd ./${R}; ${MAKE} libdep
LIBS!= cd ${.CURDIR}/${R}; ${MAKE} libdep
CFLAGS= -DBOOTXX
bootxx: ${OBJS} ${LIBS:S,^,../,g}
${LD} -N -T ${RELOC} -e start ${OBJS} ${LIBS:S,^,../,g}
${PROG}:${OBJS} ${LIBS}
${LD} -N -T ${RELOC} -e start ${OBJS} ${LIBS}
# convert to Sun magic
(echo -n 01 | tr 01 '\01\03'; tail +3c a.out) > ${.TARGET}
@rm a.out

View File

@ -1,8 +1,11 @@
# $NetBSD: Makefile,v 1.2 1995/09/18 23:33:42 pk Exp $
# $NetBSD: Makefile,v 1.3 1995/09/30 21:43:41 pk Exp $
.PATH: ..
.PATH: ${.CURDIR}/..
PROG= installboot
NOMAN=1
BINDIR=/usr/mdec
MAN= installboot.8
BINDIR=/usr/sbin
# XXX - prevent sa clutter
__stand_makefile_inc=1
.include <bsd.prog.mk>