Makefile.arch 703 B

123456789101112131415161718
  1. ifndef ARCH
  2. ARCH := $(shell uname -m 2>/dev/null || echo not)
  3. endif
  4. ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
  5. -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
  6. -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
  7. -e s/s390x/s390/ -e s/parisc64/parisc/ \
  8. -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
  9. -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
  10. -e s/tile.*/tile/ )
  11. LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
  12. ifeq ($(LP64), 1)
  13. IS_64_BIT := 1
  14. else
  15. IS_64_BIT := 0
  16. endif