xref: /netbsd-src/share/mk/bsd.endian.mk (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1#	$NetBSD: bsd.endian.mk,v 1.14 2006/06/30 05:46:33 mrg Exp $
2
3.if !defined(_BSD_ENDIAN_MK_)
4_BSD_ENDIAN_MK_=1
5
6.include <bsd.init.mk>
7
8.if ${MACHINE_ARCH} == "alpha" || \
9    ${MACHINE_ARCH} == "arm" || \
10    ${MACHINE_ARCH} == "i386" || \
11    ${MACHINE_ARCH} == "ia64" || \
12    ${MACHINE_ARCH} == "ns32k" || \
13    ${MACHINE_ARCH} == "vax" || \
14    ${MACHINE_ARCH} == "x86_64" || \
15    ${MACHINE_ARCH:C/^.*el$/el/} == "el"
16TARGET_ENDIANNESS=	1234
17.elif ${MACHINE_ARCH} == "hppa" || \
18      ${MACHINE_ARCH} == "m68000" || \
19      ${MACHINE_ARCH} == "m68k" || \
20      ${MACHINE_ARCH} == "powerpc" || \
21      ${MACHINE_ARCH} == "powerpc64" || \
22      ${MACHINE_ARCH} == "sparc" || \
23      ${MACHINE_ARCH} == "sparc64" || \
24      ${MACHINE_ARCH:C/^.*eb$/eb/} == "eb"
25TARGET_ENDIANNESS=	4321
26.endif
27
28.endif  # !defined(_BSD_ENDIAN_MK_)
29