You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

arch.mk 750B

123456789101112131415161718192021222324252627282930313233
  1. ifdef CROSS_COMPILE
  2. MACHINE := $(CROSS_COMPILE)
  3. else
  4. MACHINE ?= $(shell $(CC) -dumpmachine)
  5. endif
  6. ifneq (,$(findstring x86_64-,$(MACHINE)))
  7. ARCH_X64 := 1
  8. ARCH_CPU := x64
  9. else ifneq (,$(findstring arm64-,$(MACHINE)))
  10. ARCH_ARM64 := 1
  11. ARCH_CPU := arm64
  12. else ifneq (,$(findstring aarch64-,$(MACHINE)))
  13. ARCH_ARM64 := 1
  14. ARCH_CPU := arm64
  15. else
  16. $(error Could not determine CPU architecture of $(MACHINE))
  17. endif
  18. ifneq (,$(findstring -darwin,$(MACHINE)))
  19. ARCH_MAC := 1
  20. ARCH_OS := mac
  21. else ifneq (,$(findstring -mingw32,$(MACHINE)))
  22. ARCH_WIN := 1
  23. ARCH_OS := win
  24. else ifneq (,$(findstring -linux,$(MACHINE)))
  25. ARCH_LIN := 1
  26. ARCH_OS := lin
  27. else
  28. $(error Could not determine operating system of $(MACHINE))
  29. endif
  30. ARCH_NAME := $(ARCH_OS)-$(ARCH_CPU)