xref: /freebsd/share/mk/bsd.endian.mk (revision 5dae51da3da0cc94d17bd67b308fad304ebec7e0)
1# $FreeBSD$
2
3.if ${MACHINE_ARCH} == "aarch64" || \
4    ${MACHINE_ARCH} == "amd64" || \
5    ${MACHINE_ARCH} == "i386" || \
6    (${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} == "") || \
7    ${MACHINE_CPUARCH} == "riscv" || \
8    ${MACHINE_ARCH:Mmips*el} != ""
9TARGET_ENDIANNESS= 1234
10.elif ${MACHINE_ARCH} == "powerpc" || \
11    ${MACHINE_ARCH} == "powerpc64" || \
12    ${MACHINE_ARCH} == "powerpcspe" || \
13    ${MACHINE_ARCH} == "sparc64" || \
14    (${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} != "") || \
15    ${MACHINE_ARCH:Mmips*} != ""
16TARGET_ENDIANNESS= 4321
17.endif
18