tools.mk 705 B

123456789101112131415161718192021222324252627
  1. #
  2. # Copyright 2011-2015 Branimir Karadzic. All rights reserved.
  3. # License: http://www.opensource.org/licenses/BSD-2-Clause
  4. #
  5. SILENT?=@
  6. THISDIR:=$(dir $(lastword $(MAKEFILE_LIST)))
  7. UNAME:=$(shell uname)
  8. ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin))
  9. CMD_MKDIR=mkdir -p "$(1)"
  10. CMD_RMDIR=rm -r "$(1)"
  11. ifeq ($(UNAME),$(filter $(UNAME),Darwin))
  12. OS=darwin
  13. else
  14. OS=linux
  15. endif
  16. else
  17. CMD_MKDIR=cmd /C "if not exist "$(subst /,\,$(1))" mkdir "$(subst /,\,$(1))""
  18. CMD_RMDIR=cmd /C "if exist "$(subst /,\,$(1))" rmdir /S /Q "$(subst /,\,$(1))""
  19. OS=windows
  20. endif
  21. SHADERC:="$(THISDIR)../tools/bin/$(OS)/shaderc"
  22. GEOMETRYC:="$(THISDIR)../tools/bin/$(OS)/geometryc"
  23. TEXTUREC:="$(THISDIR)../tools/bin/$(OS)/texturec"