From 6f988f0a07228255a217e37df846048a0d60bc1b Mon Sep 17 00:00:00 2001 From: abs Date: Thu, 7 Dec 2000 12:58:13 +0000 Subject: If we are not on a CPU known by mame, determine risc or risc_lsb based on . Fixed xmame on arm32. --- emulators/xmame/Makefile | 8 ++++++-- emulators/xmame/files/endian.sh | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 emulators/xmame/files/endian.sh (limited to 'emulators') 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 \n#if BYTE_ORDER == BIG_ENDIAN\nORDER_BIG_ENDIAN\n#else\nORDER_LITTLE_ENDIAN\n#endif\n' | cpp -P | sed -n 's/^ORDER_//p' -- cgit v1.2.3