diff options
author | miod <> | 2010-02-03 20:49:00 +0000 |
---|---|---|
committer | miod <> | 2010-02-03 20:49:00 +0000 |
commit | 44a740d46dbdb3792d875e44b2e570f98dbd5d75 (patch) | |
tree | 34505bc357a186d3e726fcef9a7c5076687821b1 | |
parent | 4657a66d1fec85b57a7f7f8b9f650123db7d66a4 (diff) | |
download | openbsd-44a740d46dbdb3792d875e44b2e570f98dbd5d75.tar.gz openbsd-44a740d46dbdb3792d875e44b2e570f98dbd5d75.tar.bz2 openbsd-44a740d46dbdb3792d875e44b2e570f98dbd5d75.zip |
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@
-rw-r--r-- | src/lib/libc/crypt/Makefile.inc | 4 | ||||
-rw-r--r-- | src/lib/libc/net/Makefile.inc | 6 | ||||
-rw-r--r-- | src/lib/libc/stdlib/Makefile.inc | 18 | ||||
-rw-r--r-- | src/lib/libc/string/Makefile.inc | 6 | ||||
-rw-r--r-- | src/lib/libssl/crypto/Makefile | 14 |
5 files changed, 25 insertions, 23 deletions
diff --git a/src/lib/libc/crypt/Makefile.inc b/src/lib/libc/crypt/Makefile.inc index d961f36b52..df23499b3a 100644 --- a/src/lib/libc/crypt/Makefile.inc +++ b/src/lib/libc/crypt/Makefile.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.16 2008/03/16 22:08:12 deraadt Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.17 2010/02/03 20:49:00 miod Exp $ |
2 | 2 | ||
3 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/crypt ${LIBCSRCDIR}/crypt | 3 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/crypt ${LIBCSRCDIR}/crypt |
4 | 4 | ||
5 | SRCS+= cast.c crypt.c crypt2.c md5crypt.c arc4random.c blowfish.c | 5 | SRCS+= cast.c crypt.c crypt2.c md5crypt.c arc4random.c blowfish.c |
6 | SRCS+= bcrypt.c skipjack.c | 6 | SRCS+= bcrypt.c skipjack.c |
diff --git a/src/lib/libc/net/Makefile.inc b/src/lib/libc/net/Makefile.inc index 50924ec135..66f181d473 100644 --- a/src/lib/libc/net/Makefile.inc +++ b/src/lib/libc/net/Makefile.inc | |||
@@ -1,7 +1,7 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.46 2009/11/18 07:43:22 guenther Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.47 2010/02/03 20:49:00 miod Exp $ |
2 | 2 | ||
3 | # net sources | 3 | # net sources |
4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/net ${LIBCSRCDIR}/net | 4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/net ${LIBCSRCDIR}/net |
5 | 5 | ||
6 | CFLAGS+=-DRESOLVSORT | 6 | CFLAGS+=-DRESOLVSORT |
7 | 7 | ||
@@ -25,7 +25,7 @@ SRCS+= ip6opt.c rthdr.c vars6.c | |||
25 | # m-d Makefile.inc must include sources for: | 25 | # m-d Makefile.inc must include sources for: |
26 | # htonl() htons() ntohl() ntohs() | 26 | # htonl() htons() ntohl() ntohs() |
27 | 27 | ||
28 | .include "${LIBCSRCDIR}/arch/${MACHINE_ARCH}/net/Makefile.inc" | 28 | .include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/net/Makefile.inc" |
29 | 29 | ||
30 | MAN+= byteorder.3 ethers.3 gai_strerror.3 getaddrinfo.3 gethostbyname.3 \ | 30 | MAN+= byteorder.3 ethers.3 gai_strerror.3 getaddrinfo.3 gethostbyname.3 \ |
31 | getifaddrs.3 getnameinfo.3 getnetent.3 getprotoent.3 \ | 31 | getifaddrs.3 getnameinfo.3 getnetent.3 getprotoent.3 \ |
diff --git a/src/lib/libc/stdlib/Makefile.inc b/src/lib/libc/stdlib/Makefile.inc index 3b9b36a1ed..b003560291 100644 --- a/src/lib/libc/stdlib/Makefile.inc +++ b/src/lib/libc/stdlib/Makefile.inc | |||
@@ -1,7 +1,7 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.42 2009/06/03 15:52:16 millert Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.43 2010/02/03 20:49:00 miod Exp $ |
2 | 2 | ||
3 | # stdlib sources | 3 | # stdlib sources |
4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/stdlib ${LIBCSRCDIR}/stdlib | 4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib |
5 | 5 | ||
6 | SRCS+= a64l.c abort.c atexit.c atoi.c atof.c atol.c atoll.c bsearch.c \ | 6 | SRCS+= a64l.c abort.c atexit.c atoi.c atof.c atol.c atoll.c bsearch.c \ |
7 | cfree.c exit.c ecvt.c gcvt.c getenv.c getopt_long.c \ | 7 | 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 \ | |||
12 | tfind.c tsearch.c _rand48.c drand48.c erand48.c jrand48.c lcong48.c \ | 12 | tfind.c tsearch.c _rand48.c drand48.c erand48.c jrand48.c lcong48.c \ |
13 | lrand48.c mrand48.c nrand48.c seed48.c srand48.c qabs.c qdiv.c _Exit.c | 13 | lrand48.c mrand48.c nrand48.c seed48.c srand48.c qabs.c qdiv.c _Exit.c |
14 | 14 | ||
15 | .if (${MACHINE_ARCH} == "m68k") | 15 | .if (${MACHINE_CPU} == "m68k") |
16 | SRCS+= abs.S div.c labs.c ldiv.c | 16 | SRCS+= abs.S div.c labs.c ldiv.c |
17 | LSRCS+= abs.c | 17 | LSRCS+= abs.c |
18 | .elif (${MACHINE_ARCH} == "i386") | 18 | .elif (${MACHINE_CPU} == "i386") |
19 | SRCS+= abs.S div.S labs.S ldiv.S | 19 | SRCS+= abs.S div.S labs.S ldiv.S |
20 | LSRCS+= abs.c div.c labs.c ldiv.c | 20 | LSRCS+= abs.c div.c labs.c ldiv.c |
21 | .elif (${MACHINE_ARCH} == "ns32k") | 21 | .elif (${MACHINE_CPU} == "ns32k") |
22 | SRCS+= abs.S div.c labs.c ldiv.c | 22 | SRCS+= abs.S div.c labs.c ldiv.c |
23 | LSRCS+= abs.c | 23 | LSRCS+= abs.c |
24 | .elif (${MACHINE_ARCH} == "tahoe") | 24 | .elif (${MACHINE_CPU} == "tahoe") |
25 | SRCS+= abs.S div.c labs.c ldiv.c | 25 | SRCS+= abs.S div.c labs.c ldiv.c |
26 | LSRCS+= abs.c | 26 | LSRCS+= abs.c |
27 | .elif (${MACHINE_ARCH} == "vax") | 27 | .elif (${MACHINE_CPU} == "vax") |
28 | SRCS+= abs.c div.c labs.c ldiv.c | 28 | SRCS+= abs.c div.c labs.c ldiv.c |
29 | .elif (${MACHINE_ARCH} == "alpha") | 29 | .elif (${MACHINE_CPU} == "alpha") |
30 | # XXX should be .S's | 30 | # XXX should be .S's |
31 | SRCS+= abs.c div.c labs.c ldiv.c | 31 | SRCS+= abs.c div.c labs.c ldiv.c |
32 | .else | 32 | .else |
33 | SRCS+= abs.c div.c labs.c ldiv.c | 33 | SRCS+= abs.c div.c labs.c ldiv.c |
34 | .endif | 34 | .endif |
35 | 35 | ||
36 | .if (${MACHINE_ARCH} == "vax") || (${MACHINE_ARCH} == "m68k") | 36 | .if (${MACHINE_CPU} == "vax") || (${MACHINE_CPU} == "m68k") |
37 | SRCS+= insque.S remque.S | 37 | SRCS+= insque.S remque.S |
38 | .else | 38 | .else |
39 | SRCS+= insque.c remque.c | 39 | SRCS+= insque.c remque.c |
diff --git a/src/lib/libc/string/Makefile.inc b/src/lib/libc/string/Makefile.inc index 124469cd3a..8aa072a289 100644 --- a/src/lib/libc/string/Makefile.inc +++ b/src/lib/libc/string/Makefile.inc | |||
@@ -1,7 +1,7 @@ | |||
1 | # $OpenBSD: Makefile.inc,v 1.20 2007/10/25 22:41:02 miod Exp $ | 1 | # $OpenBSD: Makefile.inc,v 1.21 2010/02/03 20:49:00 miod Exp $ |
2 | 2 | ||
3 | # string sources | 3 | # string sources |
4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/string ${LIBCSRCDIR}/string | 4 | .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/string ${LIBCSRCDIR}/string |
5 | 5 | ||
6 | SRCS+= bm.c memccpy.c memrchr.c strcasecmp.c strcasestr.c strcoll.c strdup.c \ | 6 | SRCS+= bm.c memccpy.c memrchr.c strcasecmp.c strcasestr.c strcoll.c strdup.c \ |
7 | strerror.c strerror_r.c strlcat.c strmode.c strsignal.c strtok.c \ | 7 | 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 \ | |||
20 | # m-d Makefile.inc may include sources for: | 20 | # m-d Makefile.inc may include sources for: |
21 | # memcpy() memmove() strchr() strrchr() | 21 | # memcpy() memmove() strchr() strrchr() |
22 | 22 | ||
23 | .include "${LIBCSRCDIR}/arch/${MACHINE_ARCH}/string/Makefile.inc" | 23 | .include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/string/Makefile.inc" |
24 | 24 | ||
25 | # if no machine specific memmove(3), build one out of bcopy(3). | 25 | # if no machine specific memmove(3), build one out of bcopy(3). |
26 | .if empty(SRCS:Mmemmove.S) | 26 | .if empty(SRCS:Mmemmove.S) |
diff --git a/src/lib/libssl/crypto/Makefile b/src/lib/libssl/crypto/Makefile index 364cdab83a..a09d54d690 100644 --- a/src/lib/libssl/crypto/Makefile +++ b/src/lib/libssl/crypto/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.51 2009/01/09 12:16:52 djm Exp $ | 1 | # $OpenBSD: Makefile,v 1.52 2010/02/03 20:49:00 miod Exp $ |
2 | 2 | ||
3 | LIB= crypto | 3 | LIB= crypto |
4 | WANTLINT= | 4 | WANTLINT= |
@@ -8,9 +8,11 @@ SSL_SRC= ${.CURDIR}/../${SSLEAYDIST} | |||
8 | LCRYPTO_SRC= ${SSL_SRC}/crypto | 8 | LCRYPTO_SRC= ${SSL_SRC}/crypto |
9 | FIPS_SRC= ${SSL_SRC}/fips | 9 | FIPS_SRC= ${SSL_SRC}/fips |
10 | 10 | ||
11 | .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" || \ | 11 | # arm and sh default to little endian, mips defaults to big endian |
12 | ${MACHINE_ARCH} == "vax" || ${MACHINE_ARCH} == "amd64" || \ | 12 | .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || \ |
13 | ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sh" | 13 | ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "i386" || \ |
14 | ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "sh" || \ | ||
15 | ${MACHINE_ARCH} == "vax" | ||
14 | CFLAGS+= -DL_ENDIAN | 16 | CFLAGS+= -DL_ENDIAN |
15 | .else | 17 | .else |
16 | CFLAGS+= -DB_ENDIAN | 18 | CFLAGS+= -DB_ENDIAN |
@@ -197,7 +199,7 @@ SRCS+= str_err.c str_lib.c str_mem.c str_meth.c | |||
197 | ${LCRYPTO_SRC}/ec ${LCRYPTO_SRC}/ecdh ${LCRYPTO_SRC}/ecdsa \ | 199 | ${LCRYPTO_SRC}/ec ${LCRYPTO_SRC}/ecdh ${LCRYPTO_SRC}/ecdsa \ |
198 | ${LCRYPTO_SRC}/pqueue ${LCRYPTO_SRC}/store \ | 200 | ${LCRYPTO_SRC}/pqueue ${LCRYPTO_SRC}/store \ |
199 | ${LCRYPTO_SRC} \ | 201 | ${LCRYPTO_SRC} \ |
200 | ${LCRYPTO_SRC}/acss ${.CURDIR}/arch/${MACHINE_ARCH} \ | 202 | ${LCRYPTO_SRC}/acss ${.CURDIR}/arch/${MACHINE_CPU} \ |
201 | ${LCRYPTO_SRC}/bn/asm \ | 203 | ${LCRYPTO_SRC}/bn/asm \ |
202 | ${FIPS_SRC}/ ${FIPS_SRC}/aes ${FIPS_SRC}/des ${FIPS_SRC}/dh \ | 204 | ${FIPS_SRC}/ ${FIPS_SRC}/aes ${FIPS_SRC}/des ${FIPS_SRC}/dh \ |
203 | ${FIPS_SRC}/dsa ${FIPS_SRC}/rand ${FIPS_SRC}/rsa ${FIPS_SRC}/sha1 | 205 | ${FIPS_SRC}/dsa ${FIPS_SRC}/rand ${FIPS_SRC}/rsa ${FIPS_SRC}/sha1 |
@@ -272,7 +274,7 @@ HDRS=\ | |||
272 | fips/rand/fips_rand.h | 274 | fips/rand/fips_rand.h |
273 | 275 | ||
274 | HDRS_GEN=\ | 276 | HDRS_GEN=\ |
275 | ${.CURDIR}/arch/${MACHINE_ARCH}/opensslconf.h \ | 277 | ${.CURDIR}/arch/${MACHINE_CPU}/opensslconf.h \ |
276 | ${.OBJDIR}/obj_mac.h | 278 | ${.OBJDIR}/obj_mac.h |
277 | 279 | ||
278 | includes: obj_mac.h | 280 | includes: obj_mac.h |