2008-01-09 14:25:58 +03:00
|
|
|
# $NetBSD: bsd.endian.mk,v 1.15 2008/01/09 11:26:14 simonb Exp $
|
2003-05-18 12:19:03 +04:00
|
|
|
|
2004-03-13 02:43:41 +03:00
|
|
|
.if !defined(_BSD_ENDIAN_MK_)
|
|
|
|
_BSD_ENDIAN_MK_=1
|
2002-05-31 01:40:47 +04:00
|
|
|
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
|
2004-03-13 02:43:41 +03:00
|
|
|
.if ${MACHINE_ARCH} == "alpha" || \
|
|
|
|
${MACHINE_ARCH} == "arm" || \
|
|
|
|
${MACHINE_ARCH} == "i386" || \
|
2005-08-17 11:13:32 +04:00
|
|
|
${MACHINE_ARCH} == "ia64" || \
|
2004-03-17 23:16:21 +03:00
|
|
|
${MACHINE_ARCH} == "vax" || \
|
|
|
|
${MACHINE_ARCH} == "x86_64" || \
|
|
|
|
${MACHINE_ARCH:C/^.*el$/el/} == "el"
|
2004-03-14 23:43:20 +03:00
|
|
|
TARGET_ENDIANNESS= 1234
|
2004-03-17 23:16:21 +03:00
|
|
|
.elif ${MACHINE_ARCH} == "hppa" || \
|
2004-03-16 17:46:44 +03:00
|
|
|
${MACHINE_ARCH} == "m68000" || \
|
2004-03-13 02:43:41 +03:00
|
|
|
${MACHINE_ARCH} == "m68k" || \
|
|
|
|
${MACHINE_ARCH} == "powerpc" || \
|
2006-06-30 09:46:33 +04:00
|
|
|
${MACHINE_ARCH} == "powerpc64" || \
|
2004-03-13 02:43:41 +03:00
|
|
|
${MACHINE_ARCH} == "sparc" || \
|
2004-03-17 23:16:21 +03:00
|
|
|
${MACHINE_ARCH} == "sparc64" || \
|
|
|
|
${MACHINE_ARCH:C/^.*eb$/eb/} == "eb"
|
2004-03-14 23:43:20 +03:00
|
|
|
TARGET_ENDIANNESS= 4321
|
2002-05-31 01:40:47 +04:00
|
|
|
.endif
|
|
|
|
|
2004-03-13 02:43:41 +03:00
|
|
|
.endif # !defined(_BSD_ENDIAN_MK_)
|