summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2000-12-07 12:58:13 +0000
committerabs <abs@pkgsrc.org>2000-12-07 12:58:13 +0000
commit6f988f0a07228255a217e37df846048a0d60bc1b (patch)
treef703ce6cc453ba9f889d8a544258609853a1f61f /emulators
parent224a7afec48fddc5b030bca85a5807252d4f9837 (diff)
downloadpkgsrc-6f988f0a07228255a217e37df846048a0d60bc1b.tar.gz
If we are not on a CPU known by mame, determine risc or risc_lsb based on
<machine/endian.h>. Fixed xmame on arm32.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/xmame/Makefile8
-rwxr-xr-xemulators/xmame/files/endian.sh4
2 files changed, 10 insertions, 2 deletions
diff --git a/emulators/xmame/Makefile b/emulators/xmame/Makefile
index 59518a1ebe9..3b5c264928a 100644
--- a/emulators/xmame/Makefile
+++ b/emulators/xmame/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2000/11/05 00:43:30 mycroft Exp $
+# $NetBSD: Makefile,v 1.40 2000/12/07 12:58:13 abs Exp $
#
DISTNAME= xmame-0.37b6.1
@@ -43,11 +43,15 @@ MAME_CPU= m68k
MAME_CPU= alpha
.elif ${MACHINE_ARCH} == "i386"
MAME_CPU= i386
-.elif ${MACHINE_ARCH} == "mipsel"
+.else
+# Rather than enumerating all CPU types, check machine/endian.h
+ENDIAN!= sh files/endian.sh
+.if ${ENDIAN} == "LITTLE_ENDIAN"
MAME_CPU= risc_lsb
.else
MAME_CPU= risc
.endif
+.endif
post-patch:
(cd ${WRKSRC}/doc && ${SED} 's|@ROMPATH@|${ROMPATH}|;s|@SPOOLDIR@|${SPOOLDIR}|' \
diff --git a/emulators/xmame/files/endian.sh b/emulators/xmame/files/endian.sh
new file mode 100755
index 00000000000..0a7f33f0331
--- /dev/null
+++ b/emulators/xmame/files/endian.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# $Id: endian.sh,v 1.1 2000/12/07 12:58:14 abs Exp $
+# Trivial script to output BIG_ENDIAN or LITTLE_ENDIAN
+printf '#include <machine/endian.h>\n#if BYTE_ORDER == BIG_ENDIAN\nORDER_BIG_ENDIAN\n#else\nORDER_LITTLE_ENDIAN\n#endif\n' | cpp -P | sed -n 's/^ORDER_//p'