Makefile 908 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. TARGET = template_debug
  2. BASE = scons target=$(TARGET) $(EXTRA_ARGS)
  3. LINUX = $(BASE) platform=linux
  4. WINDOWS = $(BASE) platform=windows
  5. MACOS = $(BASE) platform=macos
  6. .PHONY: usage
  7. usage:
  8. @echo -e "Specify one of the available targets:\n"
  9. # https://stackoverflow.com/a/26339924
  10. @LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'
  11. @echo -e "\nDefine the SCons target with TARGET, and pass extra SCons arguments with EXTRA_ARGS."
  12. linux:
  13. make linux32
  14. make linux64
  15. linux32: SConstruct
  16. $(LINUX) arch=x86_32
  17. linux64: SConstruct
  18. $(LINUX) arch=x86_64
  19. windows:
  20. make windows32
  21. make windows64
  22. windows32: SConstruct
  23. $(WINDOWS) arch=x86_32
  24. windows64: SConstruct
  25. $(WINDOWS) arch=x86_64
  26. macos: SConstruct
  27. $(MACOS)