2004-03-17 23:16:21 +03:00
|
|
|
# $NetBSD: bsd.endian.mk,v 1.12 2004/03/17 20:16:21 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>
|
|
|
|
|
2004-03-13 02:43:41 +03:00
|
|
|
.if ${MACHINE_ARCH} == "alpha" || \
|
|
|
|
${MACHINE_ARCH} == "arm" || \
|
|
|
|
${MACHINE_ARCH} == "i386" || \
|
|
|
|
${MACHINE_ARCH} == "ns32k" || \
|
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" || \
|
|
|
|
${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_)
|