diff --git a/makefile b/makefile index 5bf6050f2..61b6a1219 100644 --- a/makefile +++ b/makefile @@ -156,3 +156,42 @@ docs: clean: @echo Cleaning... -@rm -rf .build + +### + +SILENT ?= @ + +UNAME := $(shell uname) +ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin)) +ifeq ($(UNAME),$(filter $(UNAME),Darwin)) +OS=darwin +BUILD_PROJECT_DIR=gmake-osx +BUILD_OUTPUT_DIR=linux64_gcc +EXE= +else +OS=linux +BUILD_PROJECT_DIR=gmake-linux +BUILD_OUTPUT_DIR=osx64_gcc +EXE= +endif +else +OS=windows +BUILD_PROJECT_DIR=gmake-mingw +BUILD_OUTPUT_DIR=win32_mingw +BUILD_TOOLS_CONFIG=release32 +EXE=.exe +endif + +.build/$(BUILD_OUTPUT_DIR)/bin/shadercRelease$(EXE): .build/projects/$(BUILD_PROJECT_DIR) + $(SILENT) make -C .build/projects/$(BUILD_PROJECT_DIR) -f shaderc.make config=$(BUILD_TOOLS_CONFIG) + +tools/bin/$(OS)/shaderc$(EXE): .build/$(BUILD_OUTPUT_DIR)/bin/shadercRelease$(EXE) + $(SILENT) cp $(<) $(@) + +.build/$(BUILD_OUTPUT_DIR)/bin/geometrycRelease$(EXE): .build/projects/$(BUILD_PROJECT_DIR) + $(SILENT) make -C .build/projects/$(BUILD_PROJECT_DIR) -f geometryc.make config=$(BUILD_TOOLS_CONFIG) + +tools/bin/$(OS)/geometryc$(EXE): .build/$(BUILD_OUTPUT_DIR)/bin/geometrycRelease$(EXE) + $(SILENT) cp $(<) $(@) + +tools: tools/bin/$(OS)/shaderc$(EXE) tools/bin/$(OS)/geometryc$(EXE) diff --git a/tools/bin/darwin/.gitignore b/tools/bin/darwin/.gitignore new file mode 100644 index 000000000..5e4debcc1 --- /dev/null +++ b/tools/bin/darwin/.gitignore @@ -0,0 +1 @@ +* diff --git a/tools/bin/darwin/geometryc b/tools/bin/darwin/geometryc deleted file mode 100755 index 06204a077..000000000 Binary files a/tools/bin/darwin/geometryc and /dev/null differ diff --git a/tools/bin/darwin/shaderc b/tools/bin/darwin/shaderc deleted file mode 100755 index 45a76bcfb..000000000 Binary files a/tools/bin/darwin/shaderc and /dev/null differ diff --git a/tools/bin/linux/.gitignore b/tools/bin/linux/.gitignore new file mode 100644 index 000000000..5e4debcc1 --- /dev/null +++ b/tools/bin/linux/.gitignore @@ -0,0 +1 @@ +* diff --git a/tools/bin/linux/geometryc b/tools/bin/linux/geometryc deleted file mode 100755 index 6e194518a..000000000 Binary files a/tools/bin/linux/geometryc and /dev/null differ diff --git a/tools/bin/linux/shaderc b/tools/bin/linux/shaderc deleted file mode 100755 index e4b8ccc81..000000000 Binary files a/tools/bin/linux/shaderc and /dev/null differ diff --git a/tools/bin/windows/.gitignore b/tools/bin/windows/.gitignore new file mode 100644 index 000000000..5e4debcc1 --- /dev/null +++ b/tools/bin/windows/.gitignore @@ -0,0 +1 @@ +* diff --git a/tools/bin/windows/geometryc.exe b/tools/bin/windows/geometryc.exe deleted file mode 100644 index 68bfd133a..000000000 Binary files a/tools/bin/windows/geometryc.exe and /dev/null differ diff --git a/tools/bin/windows/shaderc.exe b/tools/bin/windows/shaderc.exe deleted file mode 100644 index 4aec1f94e..000000000 Binary files a/tools/bin/windows/shaderc.exe and /dev/null differ