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 503B

123456789101112131415161718192021222324
  1. # Detect architecture if ARCH is not defined
  2. ifndef ARCH
  3. MACHINE = $(shell $(CC) -dumpmachine)
  4. ifneq (, $(findstring linux, $(MACHINE)))
  5. # Linux
  6. ARCH = lin
  7. else ifneq (, $(findstring apple, $(MACHINE)))
  8. # Mac
  9. ARCH = mac
  10. else ifneq (, $(findstring mingw, $(MACHINE)))
  11. # Windows
  12. ARCH = win
  13. ifneq ( ,$(findstring x86_64, $(MACHINE)))
  14. BITS = 64
  15. else ifneq (, $(findstring i686, $(MACHINE)))
  16. BITS = 32
  17. endif
  18. else
  19. $(error Could not determine machine type. Try hacking around in arch.mk)
  20. endif
  21. endif