diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-02-03 20:49:02 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-02-03 20:49:02 +0000 |
commit | a0067f51183d8b472112a095c7c0d32145ff98b3 (patch) | |
tree | 96321fd1bd5ffaea0d4f16723ebb5a9cc4a139e9 /usr.bin | |
parent | 7dfb23e53684ac495a4cf9a6a5188a1f91d5885a (diff) |
Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependent
files or directories when applicable.
The inspiration and name of MACHINE_CPU come from NetBSD, although the way to
provide it to Makefiles is completely different.
ok kettenis@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/gprof/Makefile | 7 | ||||
-rw-r--r-- | usr.bin/pmdb/Makefile | 12 |
2 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/gprof/Makefile b/usr.bin/gprof/Makefile index bc6ca9a940c..7064396d33c 100644 --- a/usr.bin/gprof/Makefile +++ b/usr.bin/gprof/Makefile @@ -1,13 +1,14 @@ -# $OpenBSD: Makefile,v 1.17 2007/12/09 19:51:30 espie Exp $ +# $OpenBSD: Makefile,v 1.18 2010/02/03 20:49:01 miod Exp $ .include <bsd.own.mk> TARGET_MACHINE_ARCH?= ${MACHINE_ARCH} +TARGET_MACHINE_CPU?= ${MACHINE_CPU} PROG= gprof -SRCS= gprof.c arcs.c dfn.c lookup.c ${TARGET_MACHINE_ARCH}.c hertz.c \ +SRCS= gprof.c arcs.c dfn.c lookup.c ${TARGET_MACHINE_CPU}.c hertz.c \ printgprof.c printlist.c -CFLAGS+= -I. -DMD_INCLUDE=\"${TARGET_MACHINE_ARCH}.h\" +CFLAGS+= -I. -DMD_INCLUDE=\"${TARGET_MACHINE_CPU}.h\" # XXX - need support for multiple archs. .if (${ELF_TOOLCHAIN:L} == "yes") diff --git a/usr.bin/pmdb/Makefile b/usr.bin/pmdb/Makefile index 4ddd65be7a0..543894cba58 100644 --- a/usr.bin/pmdb/Makefile +++ b/usr.bin/pmdb/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.11 2006/11/19 03:34:03 deraadt Exp $ +# $OpenBSD: Makefile,v 1.12 2010/02/03 20:49:01 miod Exp $ .include <bsd.own.mk> MAN=pmdb.1 .if (!exists(arch/${MACHINE}/Makefile.inc) && \ - !exists(arch/${MACHINE_ARCH}/Makefile.inc)) + !exists(arch/${MACHINE_CPU}/Makefile.inc)) NOPROG=no, man .else @@ -39,10 +39,10 @@ CPPFLAGS+=-I${.CURDIR} CPPFLAGS+=-I${.CURDIR}/arch/${MACHINE} .endif -.if (${MACHINE_ARCH} != ${MACHINE}) && exists(arch/${MACHINE_ARCH}/Makefile.inc) -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} -.include "arch/${MACHINE_ARCH}/Makefile.inc" -CPPFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH} +.if (${MACHINE_CPU} != ${MACHINE}) && exists(arch/${MACHINE_CPU}/Makefile.inc) +.PATH: ${.CURDIR}/arch/${MACHINE_CPU} +.include "arch/${MACHINE_CPU}/Makefile.inc" +CPPFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPU} .endif COPTS+=-Wall -Wno-uninitialized |