Make stand/Makefile.inc work with obj directories. (Fixes PR 4014)
This commit is contained in:
parent
2f657a6266
commit
c04589c8a8
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.inc,v 1.10 1997/04/01 23:11:28 gwr Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.11 1997/09/05 04:31:50 gwr Exp $
|
||||
|
||||
.if defined(SA_PROG)
|
||||
|
||||
@ -6,21 +6,23 @@
|
||||
# But note: this is w.r.t. a subdirectory
|
||||
S= ${.CURDIR}/../../../..
|
||||
|
||||
RELOC?= 240000
|
||||
DEFS?= -Dsun3 -DSTANDALONE
|
||||
INCL?= -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
|
||||
COPTS?= -msoft-float ${DEFS} ${INCL} ${DBG}
|
||||
|
||||
LIBSA?= ../libsa
|
||||
SRTOBJ?= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
|
||||
SRTLIB?= ${LIBSA}/libsa.a
|
||||
|
||||
LIBSA!=cd ${.CURDIR}/../libsa; $(MAKE) echo_objdir
|
||||
MDEC_DIR?=/usr/mdec
|
||||
|
||||
SRCS?= ${SA_PROG}.c
|
||||
OBJS?= ${SRCS:S/.c/.o/g}
|
||||
OBJS?= ${SRCS:.c=.o}
|
||||
|
||||
CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
|
||||
RELOC?= 240000
|
||||
DEFS?= -Dsun3 -D_STANDALONE
|
||||
INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
|
||||
|
||||
CFLAGS= -O2 -msoft-float -fno-defer-pop
|
||||
CPPFLAGS= ${DEFS} ${DBG} ${INCL}
|
||||
|
||||
SRTOBJ= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
|
||||
SRTLIB= ${LIBSA}/libsa.a
|
||||
|
||||
CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin machine m68k
|
||||
|
||||
# Make a copy of the executable with its exec header removed,
|
||||
# and with its length padded to a multiple of 1k bytes.
|
||||
@ -30,21 +32,31 @@ ${SA_PROG}.bin : ${SA_PROG}
|
||||
dd if=a.out ibs=32 skip=1 of=$@ obs=1k conv=osync
|
||||
-rm -f a.out
|
||||
|
||||
${SA_PROG} : ${OBJS} ${DPADD}
|
||||
${SA_PROG} : ${OBJS} ${DPADD} ${SRTLIB}
|
||||
${LD} -N -Ttext ${RELOC} -e start -o $@ \
|
||||
${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
|
||||
@size $@
|
||||
|
||||
.if !target(clean)
|
||||
clean:
|
||||
${OBJS} : machine m68k
|
||||
|
||||
machine :
|
||||
-rm -f $@
|
||||
ln -s ${S}/arch/sun3/include $@
|
||||
|
||||
m68k :
|
||||
-rm -f $@
|
||||
ln -s ${S}/arch/m68k/include $@
|
||||
|
||||
.if !target(cleanprog)
|
||||
cleanprog:
|
||||
-rm -f a.out [Ee]rrs mklog core *.core
|
||||
-rm -f ${CLEANFILES} *.o
|
||||
.endif
|
||||
|
||||
.if !target(install)
|
||||
install: ${SA_PROG}.bin
|
||||
.if !target(proginstall)
|
||||
proginstall: ${SA_PROG}.bin
|
||||
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG}
|
||||
.endif
|
||||
|
||||
.endif
|
||||
.endif # defined(SA_PROG)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.4 1996/10/18 06:09:43 thorpej Exp $
|
||||
# $NetBSD: Makefile,v 1.5 1997/09/05 04:31:52 gwr Exp $
|
||||
|
||||
SA_PROG= bootxx
|
||||
SRCS= bootxx.c conf.c
|
||||
@ -6,7 +6,7 @@ SRCS= bootxx.c conf.c
|
||||
all: ${SA_PROG}
|
||||
|
||||
# Do not strip or remove a.out header for this one.
|
||||
install: ${SA_PROG}
|
||||
proginstall: ${SA_PROG}
|
||||
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${SA_PROG} ${DESTDIR}${MDEC_DIR}/${SA_PROG}
|
||||
|
||||
|
@ -1,42 +1,39 @@
|
||||
# $NetBSD: Makefile,v 1.14 1997/05/31 21:22:07 cjs Exp $
|
||||
# $NetBSD: Makefile,v 1.15 1997/09/05 04:31:53 gwr Exp $
|
||||
|
||||
LIB=sa
|
||||
|
||||
NOPIC=nopic
|
||||
NOPROFILE=noprofile
|
||||
NOLINT=
|
||||
NOPIC=
|
||||
NOPROFILE=
|
||||
|
||||
# Logically src/sys
|
||||
S=${.CURDIR}/../../../..
|
||||
DIR_SA=$S/lib/libsa
|
||||
DIR_KERN=$S/lib/libkern
|
||||
|
||||
SRC_net= nfs.c rpc.c net.c ether.c arp.c in_cksum.c \
|
||||
bootparam.c rarp.c
|
||||
.PATH: ${DIR_SA} ${DIR_KERN}
|
||||
|
||||
# DBG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
|
||||
# -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG -DDEBUG_PROM
|
||||
DEFS= -Dsun3 -D_STANDALONE
|
||||
INCL= -I. -I${.CURDIR} -I${S}/lib/libsa -I${S}
|
||||
CFLAGS= -O2 -msoft-float -fno-defer-pop
|
||||
CPPFLAGS= ${DEFS} ${DBG} ${INCL}
|
||||
CLEANFILES= SRT0.o SRT1.o machine m68k
|
||||
|
||||
SRC_net= net.c ether.c arp.c in_cksum.c rarp.c
|
||||
|
||||
SRC_sa = alloc.c bcopy.c close.c getfile.c memcpy.c open.c \
|
||||
printf.c read.c strerror.c ufs.c
|
||||
printf.c read.c strerror.c
|
||||
|
||||
SRC_kern= ashrdi3.c bcmp.c bzero.c strcmp.c strlen.c
|
||||
|
||||
SRC_sun3= control.c ctrlsp.S
|
||||
|
||||
SRC_here= clock.c dev_disk.c devopen.c dvma.c \
|
||||
exec_sun.c gets.c netif_sun.c panic.c \
|
||||
promboot.c promcons.c promdev.c
|
||||
|
||||
SRCS= ${SRC_net} ${SRC_sa} ${SRC_kern} ${SRC_sun3} ${SRC_here}
|
||||
|
||||
CLEANFILES+= SRT0.o SRT1.o
|
||||
|
||||
# DBG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
|
||||
# -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG
|
||||
|
||||
DEFS= -Dsun3 -DSTANDALONE -DCOMPAT_UFS
|
||||
INCL= -I${.CURDIR} -I${S}/lib/libsa -I${S}
|
||||
COPTS= -msoft-float
|
||||
CFLAGS= -O ${COPTS} ${DEFS} ${DBG} ${INCL}
|
||||
|
||||
.PATH: ${DIR_SA} ${DIR_KERN} ${.CURDIR}/../../sun3
|
||||
SRCS= ${SRC_net} ${SRC_sa} ${SRC_kern} ${SRC_here}
|
||||
OBJS= control.o ctrlsp.o
|
||||
|
||||
all: libsa.a SRT0.o SRT1.o
|
||||
|
||||
@ -44,3 +41,31 @@ all: libsa.a SRT0.o SRT1.o
|
||||
libinstall::
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
# Nuke these...
|
||||
LOBJS=
|
||||
POBJS=
|
||||
SOBJS=
|
||||
|
||||
# Customized rules...
|
||||
|
||||
${OBJS} SRT0.o SRT1.o : machine m68k
|
||||
|
||||
machine :
|
||||
-rm -f $@
|
||||
ln -s ${S}/arch/sun3/include $@
|
||||
|
||||
m68k :
|
||||
-rm -f $@
|
||||
ln -s ${S}/arch/m68k/include $@
|
||||
|
||||
control.o : ${S}/arch/sun3/sun3/control.c
|
||||
${COMPILE.c} ${.IMPSRC}
|
||||
|
||||
ctrlsp.o : ${S}/arch/sun3/sun3/ctrlsp.S
|
||||
${COMPILE.S} ${.IMPSRC}
|
||||
|
||||
# This is for programs using ../Makefile.inc
|
||||
echo_objdir:
|
||||
@echo ${.OBJDIR}
|
||||
|
||||
|
@ -1,19 +1,24 @@
|
||||
# $NetBSD: Makefile,v 1.7 1997/03/14 21:28:38 gwr Exp $
|
||||
# $NetBSD: Makefile,v 1.8 1997/09/05 04:31:54 gwr Exp $
|
||||
|
||||
SA_PROG= netboot
|
||||
SRCS= boot.c conf.c version.c
|
||||
OBJS= ${SRCS:S/.c/.o/g}
|
||||
SRC1= boot.c conf.c version.c
|
||||
OBJS+= ${SRC1:.c=.o}
|
||||
|
||||
# Using local rules for these
|
||||
OBJS+= dev_net.o globals.o
|
||||
# Using local rule for this
|
||||
OBJS+= dev_net.o
|
||||
|
||||
# Build these locally too
|
||||
SRC2= bootparam.c globals.c nfs.c rpc.c
|
||||
OBJS+= ${SRC2:.c=.o}
|
||||
|
||||
SRCS= ${SRC1} ${SRC2}
|
||||
|
||||
all: ${SA_PROG}.bin
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.PATH: ${S}/lib/libsa
|
||||
|
||||
# How about -DSUPPORT_BOOTP instead?
|
||||
dev_net.o : ${S}/lib/libsa/dev_net.c
|
||||
${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC}
|
||||
|
||||
globals.o : ${S}/lib/libsa/globals.c
|
||||
${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC}
|
||||
${COMPILE.c} -DSUN_BOOTPARAMS ${.IMPSRC}
|
||||
|
||||
|
@ -1,9 +1,16 @@
|
||||
# $NetBSD: Makefile,v 1.3 1995/11/17 23:23:58 gwr Exp $
|
||||
# $NetBSD: Makefile,v 1.4 1997/09/05 04:31:55 gwr Exp $
|
||||
|
||||
SA_PROG= ufsboot
|
||||
SRCS= boot.c conf.c version.c
|
||||
SRCS= boot.c conf.c version.c
|
||||
OBJS= ${SRCS:.c=.o}
|
||||
|
||||
# Using local rule for this
|
||||
OBJS+= ufs.o
|
||||
|
||||
all: ${SA_PROG}.bin
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
ufs.o : ${S}/lib/libsa/ufs.c
|
||||
${COMPILE.c} -DCOMPAT_UFS ${.IMPSRC}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.inc,v 1.4 1997/04/01 23:11:30 gwr Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.5 1997/09/05 04:31:56 gwr Exp $
|
||||
|
||||
.if defined(SA_PROG)
|
||||
|
||||
@ -6,21 +6,23 @@
|
||||
# But note: this is w.r.t. a subdirectory
|
||||
S= ${.CURDIR}/../../../..
|
||||
|
||||
RELOC?= 240000
|
||||
DEFS?= -Dsun3x -DSTANDALONE
|
||||
INCL?= -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
|
||||
COPTS?= -msoft-float ${DEFS} ${INCL} ${DBG}
|
||||
|
||||
LIBSA?= ../libsa
|
||||
SRTOBJ?= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
|
||||
SRTLIB?= ${LIBSA}/libsa.a
|
||||
|
||||
LIBSA!=cd ${.CURDIR}/../libsa; $(MAKE) echo_objdir
|
||||
MDEC_DIR?=/usr/mdec
|
||||
|
||||
SRCS?= ${SA_PROG}.c
|
||||
OBJS?= ${SRCS:S/.c/.o/g}
|
||||
OBJS?= ${SRCS:.c=.o}
|
||||
|
||||
CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
|
||||
RELOC?= 240000
|
||||
DEFS?= -Dsun3x -D_STANDALONE
|
||||
INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
|
||||
|
||||
CFLAGS= -O2 -msoft-float -fno-defer-pop
|
||||
CPPFLAGS= ${DEFS} ${DBG} ${INCL}
|
||||
|
||||
SRTOBJ= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
|
||||
SRTLIB= ${LIBSA}/libsa.a
|
||||
|
||||
CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin machine m68k
|
||||
|
||||
# Make a copy of the executable with its exec header removed,
|
||||
# and with its length padded to a multiple of 1k bytes.
|
||||
@ -30,21 +32,31 @@ ${SA_PROG}.bin : ${SA_PROG}
|
||||
dd if=a.out ibs=32 skip=1 of=$@ obs=1k conv=osync
|
||||
-rm -f a.out
|
||||
|
||||
${SA_PROG} : ${OBJS} ${DPADD}
|
||||
${SA_PROG} : ${OBJS} ${DPADD} ${SRTLIB}
|
||||
${LD} -N -Ttext ${RELOC} -e start -o $@ \
|
||||
${SRTOBJ} ${OBJS} ${LDADD} ${SRTLIB}
|
||||
@size $@
|
||||
|
||||
.if !target(clean)
|
||||
clean:
|
||||
${OBJS} : machine m68k
|
||||
|
||||
machine :
|
||||
-rm -f $@
|
||||
ln -s ${S}/arch/sun3x/include $@
|
||||
|
||||
m68k :
|
||||
-rm -f $@
|
||||
ln -s ${S}/arch/m68k/include $@
|
||||
|
||||
.if !target(cleanprog)
|
||||
cleanprog:
|
||||
-rm -f a.out [Ee]rrs mklog core *.core
|
||||
-rm -f ${CLEANFILES} *.o
|
||||
.endif
|
||||
|
||||
.if !target(install)
|
||||
install: ${SA_PROG}.bin
|
||||
.if !target(proginstall)
|
||||
proginstall: ${SA_PROG}.bin
|
||||
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${SA_PROG}.bin ${DESTDIR}${MDEC_DIR}/${SA_PROG}
|
||||
.endif
|
||||
|
||||
.endif
|
||||
.endif # defined(SA_PROG)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.1.1.1 1997/03/13 16:27:27 gwr Exp $
|
||||
# $NetBSD: Makefile,v 1.2 1997/09/05 04:31:57 gwr Exp $
|
||||
|
||||
SA_PROG= bootxx
|
||||
SRCS= bootxx.c conf.c
|
||||
@ -6,7 +6,7 @@ SRCS= bootxx.c conf.c
|
||||
all: ${SA_PROG}
|
||||
|
||||
# Do not strip or remove a.out header for this one.
|
||||
install: ${SA_PROG}
|
||||
proginstall: ${SA_PROG}
|
||||
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${SA_PROG} ${DESTDIR}${MDEC_DIR}/${SA_PROG}
|
||||
|
||||
|
@ -1,44 +1,64 @@
|
||||
# $NetBSD: Makefile,v 1.5 1997/05/31 21:22:09 cjs Exp $
|
||||
# $NetBSD: Makefile,v 1.6 1997/09/05 04:31:58 gwr Exp $
|
||||
|
||||
LIB=sa
|
||||
|
||||
NOPIC=nopic
|
||||
NOPROFILE=noprofile
|
||||
NOLINT=
|
||||
NOPIC=
|
||||
NOPROFILE=
|
||||
|
||||
# Logically src/sys
|
||||
S=${.CURDIR}/../../../..
|
||||
DIR_SA=$S/lib/libsa
|
||||
DIR_KERN=$S/lib/libkern
|
||||
|
||||
SRC_net= nfs.c rpc.c net.c ether.c arp.c in_cksum.c \
|
||||
bootparam.c rarp.c
|
||||
.PATH: ${DIR_SA} ${DIR_KERN}
|
||||
|
||||
# DBG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
|
||||
# -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG -DDEBUG_PROM
|
||||
DEFS= -Dsun3x -D_STANDALONE
|
||||
INCL= -I. -I${.CURDIR} -I${S}/lib/libsa -I${S}
|
||||
CFLAGS= -O2 -msoft-float -fno-defer-pop
|
||||
CPPFLAGS= ${DEFS} ${DBG} ${INCL}
|
||||
CLEANFILES= SRT0.o SRT1.o machine m68k
|
||||
|
||||
SRC_net= net.c ether.c arp.c in_cksum.c rarp.c
|
||||
|
||||
SRC_sa = alloc.c bcopy.c close.c getfile.c memcpy.c open.c \
|
||||
printf.c read.c strerror.c ufs.c
|
||||
printf.c read.c strerror.c
|
||||
|
||||
SRC_kern= ashrdi3.c bcmp.c bzero.c strcmp.c strlen.c
|
||||
|
||||
SRC_here= clock.c dev_disk.c devopen.c dvma.c \
|
||||
exec_sun.c gets.c iommu.c mmu.c netif_sun.c\
|
||||
exec_sun.c gets.c iommu.c mmu.c netif_sun.c \
|
||||
panic.c promboot.c promcons.c promdev.c
|
||||
|
||||
SRCS= ${SRC_net} ${SRC_sa} ${SRC_kern} ${SRC_here}
|
||||
|
||||
CLEANFILES+= SRT0.o SRT1.o
|
||||
|
||||
# DBG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
|
||||
# -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG -DDEBUG_PROM
|
||||
|
||||
DEFS= -Dsun3x -DSTANDALONE -DCOMPAT_UFS
|
||||
INCL= -I${.CURDIR} -I${S}/lib/libsa -I${S}
|
||||
COPTS= -msoft-float
|
||||
CFLAGS= -O ${COPTS} ${DEFS} ${DBG} ${INCL}
|
||||
|
||||
.PATH: ${DIR_SA} ${DIR_KERN} ${.CURDIR}/../../sun3
|
||||
|
||||
all: libsa.a SRT0.o SRT1.o
|
||||
|
||||
# only needed during build
|
||||
libinstall::
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
# Nuke these...
|
||||
LOBJS=
|
||||
POBJS=
|
||||
SOBJS=
|
||||
|
||||
# Customized rules...
|
||||
|
||||
${OBJS} SRT0.o SRT1.o : machine m68k
|
||||
|
||||
machine :
|
||||
-rm -f $@
|
||||
ln -s ${S}/arch/sun3x/include $@
|
||||
|
||||
m68k :
|
||||
-rm -f $@
|
||||
ln -s ${S}/arch/m68k/include $@
|
||||
|
||||
# This is for programs using ../Makefile.inc
|
||||
echo_objdir:
|
||||
@echo ${.OBJDIR}
|
||||
|
||||
|
@ -1,19 +1,24 @@
|
||||
# $NetBSD: Makefile,v 1.2 1997/03/24 17:55:40 gwr Exp $
|
||||
# $NetBSD: Makefile,v 1.3 1997/09/05 04:31:59 gwr Exp $
|
||||
|
||||
SA_PROG= netboot
|
||||
SRCS= boot.c conf.c version.c
|
||||
OBJS= ${SRCS:S/.c/.o/g}
|
||||
SRC1= boot.c conf.c version.c
|
||||
OBJS+= ${SRC1:.c=.o}
|
||||
|
||||
# Using local rules for these
|
||||
OBJS+= dev_net.o globals.o
|
||||
# Using local rule for this
|
||||
OBJS+= dev_net.o
|
||||
|
||||
# Build these locally too
|
||||
SRC2= bootparam.c globals.c nfs.c rpc.c
|
||||
OBJS+= ${SRC2:.c=.o}
|
||||
|
||||
SRCS= ${SRC1} ${SRC2}
|
||||
|
||||
all: ${SA_PROG}.bin
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.PATH: ${S}/lib/libsa
|
||||
|
||||
# How about -DSUPPORT_BOOTP instead?
|
||||
dev_net.o : ${S}/lib/libsa/dev_net.c
|
||||
${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC}
|
||||
|
||||
globals.o : ${S}/lib/libsa/globals.c
|
||||
${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC}
|
||||
${COMPILE.c} -DSUN_BOOTPARAMS ${.IMPSRC}
|
||||
|
||||
|
@ -1,9 +1,16 @@
|
||||
# $NetBSD: Makefile,v 1.1.1.1 1997/03/13 16:27:28 gwr Exp $
|
||||
# $NetBSD: Makefile,v 1.2 1997/09/05 04:32:01 gwr Exp $
|
||||
|
||||
SA_PROG= ufsboot
|
||||
SRCS= boot.c conf.c version.c
|
||||
SRCS= boot.c conf.c version.c
|
||||
OBJS= ${SRCS:.c=.o}
|
||||
|
||||
# Using local rule for this
|
||||
OBJS+= ufs.o
|
||||
|
||||
all: ${SA_PROG}.bin
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
ufs.o : ${S}/lib/libsa/ufs.c
|
||||
${COMPILE.c} -DCOMPAT_UFS ${.IMPSRC}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user