summaryrefslogtreecommitdiff
path: root/emulators/xmame
diff options
context:
space:
mode:
authorjlam <jlam>2002-04-22 02:49:27 +0000
committerjlam <jlam>2002-04-22 02:49:27 +0000
commit59303fc8e527aa717ff01fe3926da206723bc210 (patch)
treeb45a924c826d96b9836f17d6fd53bb16fe3d7495 /emulators/xmame
parent28e1d2efbff3277e2f8b793f039eec38c51af550 (diff)
downloadpkgsrc-59303fc8e527aa717ff01fe3926da206723bc210.tar.gz
Use endian.mk instead of own endian-detection code.
Diffstat (limited to 'emulators/xmame')
-rw-r--r--emulators/xmame/Makefile35
1 files changed, 3 insertions, 32 deletions
diff --git a/emulators/xmame/Makefile b/emulators/xmame/Makefile
index 07564890e54..a0c773814e3 100644
--- a/emulators/xmame/Makefile
+++ b/emulators/xmame/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.70 2002/03/27 20:44:30 kristerw Exp $
+# $NetBSD: Makefile,v 1.71 2002/04/22 02:49:29 jlam Exp $
#
DISTNAME= xmame-0.59.1
@@ -38,39 +38,10 @@ MAME_DISP_METHOD?= x11
MAME_CPU.${MARCH}?= ${MARCH}
.endfor
.if !defined(MAME_CPU.${MACHINE_ARCH})
-# Determine the endianness of the CPU by checking header files.
-. if !defined(MACHINE_ENDIAN)
-_ENDIAN_H_FILES= /usr/include/sys/endian.h
-_ENDIAN_H_FILES+= /usr/include/machine/endian.h
-_ENDIAN_H_FILES+= /usr/include/endian.h
-_ENDIAN_H_FILES+= /usr/include/sys/byteorder.h
-_ENDIAN_H_FILES+= /dev/null
-. for FILE in ${_ENDIAN_H_FILES}
-. if exists(${FILE})
-_ENDIAN_H?= ${FILE:S/\/usr\/include\///}
-. endif
-. endfor
-MACHINE_ENDIAN!= \
- if ( \
- ${ECHO} "\#include <${_ENDIAN_H}>"; \
- ${ECHO} "\#ifndef BYTE_ORDER"; \
- ${ECHO} "\#ifdef _BIG_ENDIAN"; \
- ${ECHO} "\#define BYTE_ORDER 4321"; \
- ${ECHO} "\#else"; \
- ${ECHO} "\#define BYTE_ORDER 1234"; \
- ${ECHO} "\#endif"; \
- ${ECHO} "\#endif"; \
- ${ECHO} "BYTE_ORDER"; \
- ) | ${CC} -E - | ${GREP} "4321" >/dev/null 2>&1; \
- then \
- ${ECHO} big; \
- else \
- ${ECHO} little; \
- fi
-MAKEFLAGS+= MACHINE_ENDIAN="${MACHINE_ENDIAN}"
-. endif
+. include "../../mk/endian.mk"
_MAME_CPU.big-endian= risc
_MAME_CPU.little-endian= risc_lsb
+_MAME_CPU.unknown-endian= risc # assume unknown == big
MAME_CPU.${MACHINE_ARCH}?= ${_MAME_CPU.${MACHINE_ENDIAN}-endian}
.endif