diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-09-06 19:12:35 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-09-06 19:12:35 +0000 |
commit | cc67d9e5cd11f5b8645ecb7f05dc2423eb1c5c70 (patch) | |
tree | 57dd751f64dae23722df2b48e03d398aeefdc46a /sys/arch | |
parent | 7876f1c58060284e52d7df556230e67ce61da8e5 (diff) |
use some make magic (borrowed from macppc) to build {obj/}machine
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/stand/bootblk/Makefile | 15 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/libkern/Makefile | 17 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/libsa/Makefile | 12 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/libz/Makefile | 14 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/ofwboot/Makefile | 16 |
5 files changed, 31 insertions, 43 deletions
diff --git a/sys/arch/sparc64/stand/bootblk/Makefile b/sys/arch/sparc64/stand/bootblk/Makefile index f05ca900e0f..cad8419a66c 100644 --- a/sys/arch/sparc64/stand/bootblk/Makefile +++ b/sys/arch/sparc64/stand/bootblk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2001/09/06 18:36:41 jason Exp $ +# $OpenBSD: Makefile,v 1.5 2001/09/06 19:12:34 jason Exp $ # $NetBSD: Makefile,v 1.1 2000/08/20 14:58:45 mrg Exp $ CURDIR= ${.CURDIR} @@ -30,18 +30,17 @@ SVR4=-U__SVR4 -U__svr4__ -D__NetBSD__ INCLUDES= -I. -I$S/arch -I$S -nostdinc CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM ${SVR4} -all: bootblk.text bootblk +.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) +.BEGIN: + @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) +.endif -#clean:: -# rm assym.fth.h bootblk.text machine bootblk +all: bootblk.text bootblk sparc: ln -s ${.CURDIR}/../../../sparc/include sparc -machine: - ln -s ${.CURDIR}/../../../${MACHINE}/include machine - -assym.fth.h: ${.CURDIR}/genassym.sh genfth.cf machine +assym.fth.h: ${.CURDIR}/genassym.sh genfth.cf sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} \ ${CPPFLAGS} ${PROF} <${.CURDIR}/genfth.cf >assym.fth.h.tmp && \ mv -f assym.fth.h.tmp assym.fth.h diff --git a/sys/arch/sparc64/stand/libkern/Makefile b/sys/arch/sparc64/stand/libkern/Makefile index f5f8be2ed50..04178da0ad7 100644 --- a/sys/arch/sparc64/stand/libkern/Makefile +++ b/sys/arch/sparc64/stand/libkern/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2001/08/18 16:26:37 jason Exp $ +# $OpenBSD: Makefile,v 1.3 2001/09/06 19:12:34 jason Exp $ LIB= kern @@ -15,8 +15,6 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -I${.CURDIR}/../include \ -I${.CURDIR}/../../../.. -I${.CURDIR}/../../../../lib/libkern \ -I${.CURDIR}/../../../../lib/libkern/arch/sparc -.NOPATH: machine - # kern routines SRCS= __main.c ashrdi3.c bzero.S divdi3.c qdivrem.c strlen.S strcat.c \ strcmp.c strcpy.c strncmp.c umoddi3.c @@ -26,15 +24,16 @@ SRCS+= saveregs.S ${OBJS}: ${.CURDIR}/../Makefile.inc +CLEANFILES += machine + NOPROFILE= NOPIC= +.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) +.BEGIN: + @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) +.endif + install: .include <bsd.lib.mk> - -machine: - rm -f $@ - ln -s ${.CURDIR}/../../include $@ - -beforedepend: machine diff --git a/sys/arch/sparc64/stand/libsa/Makefile b/sys/arch/sparc64/stand/libsa/Makefile index f2c2c2f5034..0ac7a2fbbda 100644 --- a/sys/arch/sparc64/stand/libsa/Makefile +++ b/sys/arch/sparc64/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2001/08/22 10:20:41 art Exp $ +# $OpenBSD: Makefile,v 1.3 2001/09/06 19:12:34 jason Exp $ LIB= sa @@ -34,13 +34,11 @@ ${OBJS}: ${.CURDIR}/../Makefile.inc NOPROFILE= NOPIC= -.NOPATH: machine -beforedepend: machine +.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) +.BEGIN: + @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) +.endif install: .include <bsd.lib.mk> - -machine: - rm -f machine - ln -s ${.CURDIR}/../../include machine diff --git a/sys/arch/sparc64/stand/libz/Makefile b/sys/arch/sparc64/stand/libz/Makefile index d076f765730..3e7bd011676 100644 --- a/sys/arch/sparc64/stand/libz/Makefile +++ b/sys/arch/sparc64/stand/libz/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2001/08/22 10:25:55 art Exp $ +# $OpenBSD: Makefile,v 1.3 2001/09/06 19:12:34 jason Exp $ LIB= z @@ -11,18 +11,16 @@ CFLAGS= -nostdinc ${CEXTRAFLAGS} ${AFLAGS} -O2 -D_ZLIB_PRIVATE -I${.CURDIR}/../. SRCS= adler32.c crc32.c infblock.c infcodes.c inffast.c \ inflate.c inftrees.c infutil.c -.NOPATH:machine -beforedepend: machine - ${OBJS}: ${.CURDIR}/../Makefile.inc +.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) +.BEGIN: + @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) +.endif + install: NOPIC= NOPROFILE= .include <bsd.lib.mk> - -machine: - rm -f $@ - ln -s ${.CURDIR}/../../include $@ diff --git a/sys/arch/sparc64/stand/ofwboot/Makefile b/sys/arch/sparc64/stand/ofwboot/Makefile index 6110e71aa53..28b26250e8d 100644 --- a/sys/arch/sparc64/stand/ofwboot/Makefile +++ b/sys/arch/sparc64/stand/ofwboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2001/08/22 10:41:46 art Exp $ +# $OpenBSD: Makefile,v 1.6 2001/09/06 19:12:34 jason Exp $ # $NetBSD: Makefile,v 1.2 2001/03/04 14:50:05 mrg Exp $ CURDIR= ${.CURDIR} @@ -51,16 +51,10 @@ CPPFLAGS+= -DSPARC_BOOT_UFS CPPFLAGS+= -DSPARC_BOOT_NFS #CPPFLAGS+= -DSPARC_BOOT_HSFS -.NOPATH: machine sparc64 -beforedepend: machine sparc64 - -machine: - rm -f machine - ln -s sparc64 machine - -sparc64: - rm -f sparc64 - ln -s ${.CURDIR}/../../../sparc64/include sparc64 +.if !make(libdep) && !make(sadep) && !make(salibdir) && !make(kernlibdir) && !make(obj) +.BEGIN: + @([ -h machine ] || ln -s ${.CURDIR}/../../include machine) +.endif vers.c: version sh ${S}/conf/newvers.sh ${CURDIR}/version "sparc64" ${NEWVERSWHAT} |