1 # $NetBSD: bsd.endian.mk,v 1.22 2014/09/19 17:45:42 matt Exp $
3 .if
!defined
(_BSD_ENDIAN_MK_
)
8 .if
${MACHINE_ARCH} == "aarch64" || \
9 ${MACHINE_ARCH} == "alpha" || \
10 ${MACHINE_ARCH} == "arm" || \
11 (!empty
(MACHINE_ARCH
:Mearm
*) && empty
(MACHINE_ARCH
:Mearm
*eb
)) || \
12 ${MACHINE_ARCH} == "i386" || \
13 ${MACHINE_ARCH} == "ia64" || \
14 ${MACHINE_ARCH} == "vax" || \
15 ${MACHINE_ARCH} == "riscv32" || \
16 ${MACHINE_ARCH} == "riscv64" || \
17 ${MACHINE_ARCH} == "x86_64" || \
18 ${MACHINE_ARCH
:C
/^.
*el
$/el
/} == "el"
19 TARGET_ENDIANNESS
= 1234
20 .elif
${MACHINE_ARCH} == "coldfire" || \
21 ${MACHINE_ARCH} == "hppa" || \
22 ${MACHINE_ARCH} == "m68000" || \
23 ${MACHINE_ARCH} == "m68k" || \
24 ${MACHINE_ARCH} == "or1k" || \
25 ${MACHINE_ARCH} == "powerpc" || \
26 ${MACHINE_ARCH} == "powerpc64" || \
27 ${MACHINE_ARCH} == "sparc" || \
28 ${MACHINE_ARCH} == "sparc64" || \
29 ${MACHINE_ARCH
:C
/^.
*eb
$/eb
/} == "eb"
30 TARGET_ENDIANNESS
= 4321
33 .
endif # !defined(_BSD_ENDIAN_MK_)