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.

25 lines
627B

  1. MACHINE = $(shell $(CC) -dumpmachine)
  2. ifneq (,$(findstring x86_64-,$(MACHINE)))
  3. ARCH_x64 := 1
  4. ARCH_NAME := x64
  5. else ifneq (,$(findstring i686-,$(MACHINE)))
  6. ARCH_x86 := 1
  7. ARCH_NAME := x86
  8. else
  9. $(error Could not determine CPU architecture of $(MACHINE). Try hacking around in arch.mk)
  10. endif
  11. ifneq (,$(findstring -darwin,$(MACHINE)))
  12. ARCH_MAC := 1
  13. ARCH_OS_NAME := mac
  14. else ifneq (,$(findstring -mingw32,$(MACHINE)))
  15. ARCH_WIN := 1
  16. ARCH_OS_NAME := win
  17. else ifneq (,$(findstring -linux,$(MACHINE)))
  18. ARCH_LIN := 1
  19. ARCH_OS_NAME := lin
  20. else
  21. $(error Could not determine OS of $(MACHINE). Try hacking around in arch.mk)
  22. endif