2014-09-19 21:45:42 +04:00
|
|
|
# $NetBSD: bsd.endian.mk,v 1.22 2014/09/19 17:45:42 matt 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>
|
|
|
|
|
2014-08-10 09:56:36 +04:00
|
|
|
.if ${MACHINE_ARCH} == "aarch64" || \
|
|
|
|
${MACHINE_ARCH} == "alpha" || \
|
2004-03-13 02:43:41 +03:00
|
|
|
${MACHINE_ARCH} == "arm" || \
|
2013-08-05 19:33:07 +04:00
|
|
|
(!empty(MACHINE_ARCH:Mearm*) && empty(MACHINE_ARCH:Mearm*eb)) || \
|
2004-03-13 02:43:41 +03:00
|
|
|
${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" || \
|
2014-09-19 21:45:42 +04:00
|
|
|
${MACHINE_ARCH} == "riscv32" || \
|
|
|
|
${MACHINE_ARCH} == "riscv64" || \
|
2004-03-17 23:16:21 +03:00
|
|
|
${MACHINE_ARCH} == "x86_64" || \
|
|
|
|
${MACHINE_ARCH:C/^.*el$/el/} == "el"
|
2004-03-14 23:43:20 +03:00
|
|
|
TARGET_ENDIANNESS= 1234
|
2013-07-19 02:06:09 +04:00
|
|
|
.elif ${MACHINE_ARCH} == "coldfire" || \
|
|
|
|
${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" || \
|
2014-09-03 23:22:53 +04:00
|
|
|
${MACHINE_ARCH} == "or1k" || \
|
2004-03-13 02:43:41 +03:00
|
|
|
${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_)
|