diff --git a/sys/arch/sparc/stand/Makefile b/sys/arch/sparc/stand/Makefile index 00631d000274..88b18770a6d1 100644 --- a/sys/arch/sparc/stand/Makefile +++ b/sys/arch/sparc/stand/Makefile @@ -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 diff --git a/sys/arch/sparc/stand/Makefile.inc b/sys/arch/sparc/stand/Makefile.inc index a6aaefbd44ba..1fd89770126a 100644 --- a/sys/arch/sparc/stand/Makefile.inc +++ b/sys/arch/sparc/stand/Makefile.inc @@ -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 diff --git a/sys/arch/sparc/stand/boot/Makefile b/sys/arch/sparc/stand/boot/Makefile index 31a3246351b1..f135f55abc54 100644 --- a/sys/arch/sparc/stand/boot/Makefile +++ b/sys/arch/sparc/stand/boot/Makefile @@ -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 diff --git a/sys/arch/sparc/stand/bootxx/Makefile b/sys/arch/sparc/stand/bootxx/Makefile index 22975b77b3d3..4a9cfbac0e5d 100644 --- a/sys/arch/sparc/stand/bootxx/Makefile +++ b/sys/arch/sparc/stand/bootxx/Makefile @@ -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 diff --git a/sys/arch/sparc/stand/installboot/Makefile b/sys/arch/sparc/stand/installboot/Makefile index 68388d56023d..0662608f1dcb 100644 --- a/sys/arch/sparc/stand/installboot/Makefile +++ b/sys/arch/sparc/stand/installboot/Makefile @@ -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