diff --git a/.gitattributes b/.gitattributes index a996d791a..4a7180c2c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,4 @@ *.md eol=lf *.lua eol=lf *.mk eol=lf +makefile eol=lf diff --git a/examples/01-cubes/makefile b/examples/01-cubes/makefile index c599dedae..2733e50ca 100644 --- a/examples/01-cubes/makefile +++ b/examples/01-cubes/makefile @@ -1,17 +1,17 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -BGFX_DIR=../.. -RUNTIME_DIR=$(BGFX_DIR)/examples/runtime -BUILD_DIR=../../.build - -include $(BGFX_DIR)/premake/shader.mk - -rebuild: - @make -s --no-print-directory TARGET=0 clean all - @make -s --no-print-directory TARGET=1 clean all - @make -s --no-print-directory TARGET=2 clean all - @make -s --no-print-directory TARGET=3 clean all - @make -s --no-print-directory TARGET=4 clean all +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/premake/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all diff --git a/examples/02-metaballs/makefile b/examples/02-metaballs/makefile index c599dedae..2733e50ca 100644 --- a/examples/02-metaballs/makefile +++ b/examples/02-metaballs/makefile @@ -1,17 +1,17 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -BGFX_DIR=../.. -RUNTIME_DIR=$(BGFX_DIR)/examples/runtime -BUILD_DIR=../../.build - -include $(BGFX_DIR)/premake/shader.mk - -rebuild: - @make -s --no-print-directory TARGET=0 clean all - @make -s --no-print-directory TARGET=1 clean all - @make -s --no-print-directory TARGET=2 clean all - @make -s --no-print-directory TARGET=3 clean all - @make -s --no-print-directory TARGET=4 clean all +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/premake/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all diff --git a/examples/03-raymarch/makefile b/examples/03-raymarch/makefile index c599dedae..2733e50ca 100644 --- a/examples/03-raymarch/makefile +++ b/examples/03-raymarch/makefile @@ -1,17 +1,17 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -BGFX_DIR=../.. -RUNTIME_DIR=$(BGFX_DIR)/examples/runtime -BUILD_DIR=../../.build - -include $(BGFX_DIR)/premake/shader.mk - -rebuild: - @make -s --no-print-directory TARGET=0 clean all - @make -s --no-print-directory TARGET=1 clean all - @make -s --no-print-directory TARGET=2 clean all - @make -s --no-print-directory TARGET=3 clean all - @make -s --no-print-directory TARGET=4 clean all +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/premake/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all diff --git a/examples/04-mesh/makefile b/examples/04-mesh/makefile index 63a5bb614..d3d54cdcb 100644 --- a/examples/04-mesh/makefile +++ b/examples/04-mesh/makefile @@ -1,22 +1,22 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -BGFX_DIR=../.. -RUNTIME_DIR=$(BGFX_DIR)/examples/runtime -BUILD_DIR=../../.build - -include $(BGFX_DIR)/premake/shader.mk - -geometry: ../runtime/meshes/bunny.bin - -../runtime/meshes/bunny.bin: bunny.obj - ..\..\tools\bin\geometryc -f bunny.obj -o ..\runtime\meshes\bunny.bin --packnormal 1 - -rebuild: - @make -s --no-print-directory TARGET=0 clean all - @make -s --no-print-directory TARGET=1 clean all - @make -s --no-print-directory TARGET=2 clean all - @make -s --no-print-directory TARGET=3 clean all - @make -s --no-print-directory TARGET=4 clean all +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/premake/shader.mk + +geometry: ../runtime/meshes/bunny.bin + +../runtime/meshes/bunny.bin: bunny.obj + ..\..\tools\bin\geometryc -f bunny.obj -o ..\runtime\meshes\bunny.bin --packnormal 1 + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all diff --git a/examples/05-instancing/makefile b/examples/05-instancing/makefile index c599dedae..2733e50ca 100644 --- a/examples/05-instancing/makefile +++ b/examples/05-instancing/makefile @@ -1,17 +1,17 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -BGFX_DIR=../.. -RUNTIME_DIR=$(BGFX_DIR)/examples/runtime -BUILD_DIR=../../.build - -include $(BGFX_DIR)/premake/shader.mk - -rebuild: - @make -s --no-print-directory TARGET=0 clean all - @make -s --no-print-directory TARGET=1 clean all - @make -s --no-print-directory TARGET=2 clean all - @make -s --no-print-directory TARGET=3 clean all - @make -s --no-print-directory TARGET=4 clean all +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/premake/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all diff --git a/examples/06-bump/makefile b/examples/06-bump/makefile index c599dedae..2733e50ca 100644 --- a/examples/06-bump/makefile +++ b/examples/06-bump/makefile @@ -1,17 +1,17 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -BGFX_DIR=../.. -RUNTIME_DIR=$(BGFX_DIR)/examples/runtime -BUILD_DIR=../../.build - -include $(BGFX_DIR)/premake/shader.mk - -rebuild: - @make -s --no-print-directory TARGET=0 clean all - @make -s --no-print-directory TARGET=1 clean all - @make -s --no-print-directory TARGET=2 clean all - @make -s --no-print-directory TARGET=3 clean all - @make -s --no-print-directory TARGET=4 clean all +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/premake/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all diff --git a/examples/07-callback/makefile b/examples/07-callback/makefile index c599dedae..2733e50ca 100644 --- a/examples/07-callback/makefile +++ b/examples/07-callback/makefile @@ -1,17 +1,17 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -BGFX_DIR=../.. -RUNTIME_DIR=$(BGFX_DIR)/examples/runtime -BUILD_DIR=../../.build - -include $(BGFX_DIR)/premake/shader.mk - -rebuild: - @make -s --no-print-directory TARGET=0 clean all - @make -s --no-print-directory TARGET=1 clean all - @make -s --no-print-directory TARGET=2 clean all - @make -s --no-print-directory TARGET=3 clean all - @make -s --no-print-directory TARGET=4 clean all +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/premake/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all diff --git a/examples/08-update/makefile b/examples/08-update/makefile index c599dedae..2733e50ca 100644 --- a/examples/08-update/makefile +++ b/examples/08-update/makefile @@ -1,17 +1,17 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -BGFX_DIR=../.. -RUNTIME_DIR=$(BGFX_DIR)/examples/runtime -BUILD_DIR=../../.build - -include $(BGFX_DIR)/premake/shader.mk - -rebuild: - @make -s --no-print-directory TARGET=0 clean all - @make -s --no-print-directory TARGET=1 clean all - @make -s --no-print-directory TARGET=2 clean all - @make -s --no-print-directory TARGET=3 clean all - @make -s --no-print-directory TARGET=4 clean all +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +BGFX_DIR=../.. +RUNTIME_DIR=$(BGFX_DIR)/examples/runtime +BUILD_DIR=../../.build + +include $(BGFX_DIR)/premake/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all diff --git a/examples/makefile b/examples/makefile index 6e26636c1..40c702550 100644 --- a/examples/makefile +++ b/examples/makefile @@ -1,15 +1,15 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -rebuild: - @make -s --no-print-directory rebuild -C 01-cubes - @make -s --no-print-directory rebuild -C 02-metaballs - @make -s --no-print-directory rebuild -C 03-raymarch - @make -s --no-print-directory rebuild -C 04-mesh - @make -s --no-print-directory rebuild -C 05-instancing - @make -s --no-print-directory rebuild -C 06-bump - @make -s --no-print-directory rebuild -C 07-callback - @make -s --no-print-directory rebuild -C 08-update - @make -s --no-print-directory rebuild -C 09-hdr +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +rebuild: + @make -s --no-print-directory rebuild -C 01-cubes + @make -s --no-print-directory rebuild -C 02-metaballs + @make -s --no-print-directory rebuild -C 03-raymarch + @make -s --no-print-directory rebuild -C 04-mesh + @make -s --no-print-directory rebuild -C 05-instancing + @make -s --no-print-directory rebuild -C 06-bump + @make -s --no-print-directory rebuild -C 07-callback + @make -s --no-print-directory rebuild -C 08-update + @make -s --no-print-directory rebuild -C 09-hdr diff --git a/src/makefile b/src/makefile index 99d7ca6e2..80e2a7d07 100644 --- a/src/makefile +++ b/src/makefile @@ -1,38 +1,38 @@ -# -# Copyright 2011-2013 Branimir Karadzic. All rights reserved. -# License: http://www.opensource.org/licenses/BSD-2-Clause -# - -.PHONY: all clean - -all: vs_debugfont_dx9.bin.h fs_debugfont_dx9.bin.h \ - vs_debugfont_glsl.bin.h fs_debugfont_glsl.bin.h \ - vs_debugfont_dx11.bin.h fs_debugfont_dx11.bin.h \ - vs_clear_dx11.bin.h fs_clear_dx11.bin.h - -clean: - rm *.bin.h - -vs_debugfont_dx9.bin.h: - ..\tools\bin\shaderc -f vs_debugfont.sc -o vs_debugfont_dx9.bin.h --type v -p vs_2_0 --platform windows -O 3 --bin2c vs_debugfont_dx9 - -fs_debugfont_dx9.bin.h: - ..\tools\bin\shaderc -f fs_debugfont.sc -o fs_debugfont_dx9.bin.h --type f -p ps_2_a --platform windows -O 3 --bin2c fs_debugfont_dx9 - -vs_debugfont_glsl.bin.h: - ..\tools\bin\shaderc -f vs_debugfont.sc -o vs_debugfont_glsl.bin.h --type v --platform nacl -O 3 --bin2c vs_debugfont_glsl - -fs_debugfont_glsl.bin.h: - ..\tools\bin\shaderc -f fs_debugfont.sc -o fs_debugfont_glsl.bin.h --type f --platform nacl -O 3 --bin2c fs_debugfont_glsl - -vs_debugfont_dx11.bin.h: - ..\tools\bin\shaderc -f vs_debugfont.sc -o vs_debugfont_dx11.bin.h --type v -p vs_5_0 --platform windows -O 3 --bin2c vs_debugfont_dx11 - -fs_debugfont_dx11.bin.h: - ..\tools\bin\shaderc -f fs_debugfont.sc -o fs_debugfont_dx11.bin.h --type f -p ps_5_0 --platform windows -O 3 --bin2c fs_debugfont_dx11 - -vs_clear_dx11.bin.h: - ..\tools\bin\shaderc -f vs_clear.sc -o vs_clear_dx11.bin.h --type v -p vs_5_0 --platform windows -O 3 --bin2c vs_clear_dx11 - -fs_clear_dx11.bin.h: - ..\tools\bin\shaderc -f fs_clear.sc -o fs_clear_dx11.bin.h --type f -p ps_5_0 --platform windows -O 3 --bin2c fs_clear_dx11 +# +# Copyright 2011-2013 Branimir Karadzic. All rights reserved. +# License: http://www.opensource.org/licenses/BSD-2-Clause +# + +.PHONY: all clean + +all: vs_debugfont_dx9.bin.h fs_debugfont_dx9.bin.h \ + vs_debugfont_glsl.bin.h fs_debugfont_glsl.bin.h \ + vs_debugfont_dx11.bin.h fs_debugfont_dx11.bin.h \ + vs_clear_dx11.bin.h fs_clear_dx11.bin.h + +clean: + rm *.bin.h + +vs_debugfont_dx9.bin.h: + ..\tools\bin\shaderc -f vs_debugfont.sc -o vs_debugfont_dx9.bin.h --type v -p vs_2_0 --platform windows -O 3 --bin2c vs_debugfont_dx9 + +fs_debugfont_dx9.bin.h: + ..\tools\bin\shaderc -f fs_debugfont.sc -o fs_debugfont_dx9.bin.h --type f -p ps_2_a --platform windows -O 3 --bin2c fs_debugfont_dx9 + +vs_debugfont_glsl.bin.h: + ..\tools\bin\shaderc -f vs_debugfont.sc -o vs_debugfont_glsl.bin.h --type v --platform nacl -O 3 --bin2c vs_debugfont_glsl + +fs_debugfont_glsl.bin.h: + ..\tools\bin\shaderc -f fs_debugfont.sc -o fs_debugfont_glsl.bin.h --type f --platform nacl -O 3 --bin2c fs_debugfont_glsl + +vs_debugfont_dx11.bin.h: + ..\tools\bin\shaderc -f vs_debugfont.sc -o vs_debugfont_dx11.bin.h --type v -p vs_5_0 --platform windows -O 3 --bin2c vs_debugfont_dx11 + +fs_debugfont_dx11.bin.h: + ..\tools\bin\shaderc -f fs_debugfont.sc -o fs_debugfont_dx11.bin.h --type f -p ps_5_0 --platform windows -O 3 --bin2c fs_debugfont_dx11 + +vs_clear_dx11.bin.h: + ..\tools\bin\shaderc -f vs_clear.sc -o vs_clear_dx11.bin.h --type v -p vs_5_0 --platform windows -O 3 --bin2c vs_clear_dx11 + +fs_clear_dx11.bin.h: + ..\tools\bin\shaderc -f fs_clear.sc -o fs_clear_dx11.bin.h --type f -p ps_5_0 --platform windows -O 3 --bin2c fs_clear_dx11