Browse Source

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@
OPENBSD_4_7
miod 15 years ago
parent
commit
0d9cbfe642
3 changed files with 14 additions and 14 deletions
  1. +2
    -2
      src/lib/libc/crypt/Makefile.inc
  2. +9
    -9
      src/lib/libc/stdlib/Makefile.inc
  3. +3
    -3
      src/lib/libc/string/Makefile.inc

+ 2
- 2
src/lib/libc/crypt/Makefile.inc View File

@ -1,6 +1,6 @@
# $OpenBSD: Makefile.inc,v 1.16 2008/03/16 22:08:12 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.17 2010/02/03 20:49:00 miod Exp $
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/crypt ${LIBCSRCDIR}/crypt
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/crypt ${LIBCSRCDIR}/crypt
SRCS+= cast.c crypt.c crypt2.c md5crypt.c arc4random.c blowfish.c
SRCS+= bcrypt.c skipjack.c


+ 9
- 9
src/lib/libc/stdlib/Makefile.inc View File

@ -1,7 +1,7 @@
# $OpenBSD: Makefile.inc,v 1.42 2009/06/03 15:52:16 millert Exp $
# $OpenBSD: Makefile.inc,v 1.43 2010/02/03 20:49:00 miod Exp $
# stdlib sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/stdlib ${LIBCSRCDIR}/stdlib
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib
SRCS+= a64l.c abort.c atexit.c atoi.c atof.c atol.c atoll.c bsearch.c \
cfree.c exit.c ecvt.c gcvt.c getenv.c getopt_long.c \
@ -12,28 +12,28 @@ SRCS+= a64l.c abort.c atexit.c atoi.c atof.c atol.c atoll.c bsearch.c \
tfind.c tsearch.c _rand48.c drand48.c erand48.c jrand48.c lcong48.c \
lrand48.c mrand48.c nrand48.c seed48.c srand48.c qabs.c qdiv.c _Exit.c
.if (${MACHINE_ARCH} == "m68k")
.if (${MACHINE_CPU} == "m68k")
SRCS+= abs.S div.c labs.c ldiv.c
LSRCS+= abs.c
.elif (${MACHINE_ARCH} == "i386")
.elif (${MACHINE_CPU} == "i386")
SRCS+= abs.S div.S labs.S ldiv.S
LSRCS+= abs.c div.c labs.c ldiv.c
.elif (${MACHINE_ARCH} == "ns32k")
.elif (${MACHINE_CPU} == "ns32k")
SRCS+= abs.S div.c labs.c ldiv.c
LSRCS+= abs.c
.elif (${MACHINE_ARCH} == "tahoe")
.elif (${MACHINE_CPU} == "tahoe")
SRCS+= abs.S div.c labs.c ldiv.c
LSRCS+= abs.c
.elif (${MACHINE_ARCH} == "vax")
.elif (${MACHINE_CPU} == "vax")
SRCS+= abs.c div.c labs.c ldiv.c
.elif (${MACHINE_ARCH} == "alpha")
.elif (${MACHINE_CPU} == "alpha")
# XXX should be .S's
SRCS+= abs.c div.c labs.c ldiv.c
.else
SRCS+= abs.c div.c labs.c ldiv.c
.endif
.if (${MACHINE_ARCH} == "vax") || (${MACHINE_ARCH} == "m68k")
.if (${MACHINE_CPU} == "vax") || (${MACHINE_CPU} == "m68k")
SRCS+= insque.S remque.S
.else
SRCS+= insque.c remque.c


+ 3
- 3
src/lib/libc/string/Makefile.inc View File

@ -1,7 +1,7 @@
# $OpenBSD: Makefile.inc,v 1.20 2007/10/25 22:41:02 miod Exp $
# $OpenBSD: Makefile.inc,v 1.21 2010/02/03 20:49:00 miod Exp $
# string sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/string ${LIBCSRCDIR}/string
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/string ${LIBCSRCDIR}/string
SRCS+= bm.c memccpy.c memrchr.c strcasecmp.c strcasestr.c strcoll.c strdup.c \
strerror.c strerror_r.c strlcat.c strmode.c strsignal.c strtok.c \
@ -20,7 +20,7 @@ SRCS+= bm.c memccpy.c memrchr.c strcasecmp.c strcasestr.c strcoll.c strdup.c \
# m-d Makefile.inc may include sources for:
# memcpy() memmove() strchr() strrchr()
.include "${LIBCSRCDIR}/arch/${MACHINE_ARCH}/string/Makefile.inc"
.include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/string/Makefile.inc"
# if no machine specific memmove(3), build one out of bcopy(3).
.if empty(SRCS:Mmemmove.S)


Loading…
Cancel
Save