From f6993940e5962d16ac8d52a4616a92f765289d3c Mon Sep 17 00:00:00 2001 From: pogokeen Date: Fri, 12 Jul 2019 08:44:36 +0000 Subject: [PATCH] Separate out polymost1Frag and polymost1Vert shaders from polymost.cpp and add rules for building in the GNUmakefile. Additionally, git ignore the shader's generated headers folder. git-svn-id: https://svn.eduke32.com/eduke32@7782 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # .gitignore # source/build/src/polymost.cpp --- .gitignore | 2 + Common.mak | 6 + GNUmakefile | 9 + source/build/src/polymost.cpp | 280 +++------------------------- source/build/src/polymost1Frag.glsl | 116 ++++++++++++ source/build/src/polymost1Vert.glsl | 33 ++++ 6 files changed, 193 insertions(+), 253 deletions(-) create mode 100644 source/build/src/polymost1Frag.glsl create mode 100644 source/build/src/polymost1Vert.glsl diff --git a/.gitignore b/.gitignore index 3182b84df..12438be7f 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,8 @@ project.xcworkspace/ .DS_Store ._* + +/source/build/src/generated/ Platform/Windows/Build Platform/Windows/Win32 Platform/Windows/x64 diff --git a/Common.mak b/Common.mak index 55dbe4623..c7900dc3e 100644 --- a/Common.mak +++ b/Common.mak @@ -126,6 +126,9 @@ endef define RMDIR rm -rf $(filter-out / *,$1) endef +define CAT + cat $1 +endef ifeq (0,$(HAVE_SH)) DONT_FAIL := & rem @@ -142,6 +145,9 @@ ifeq (0,$(HAVE_SH)) define RMDIR rmdir /s /q $(subst /,\,$(filter-out / *,$1)) $(DONT_PRINT_STDERR) $(DONT_FAIL) endef + define CAT + type $1 + endef # if, printf, exit, and ; are unavailable without sh PRETTY_OUTPUT := 0 diff --git a/GNUmakefile b/GNUmakefile index e401c1d9f..f77cfabd8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -218,6 +218,8 @@ engine_objs := \ 2d.cpp \ hash.cpp \ palette.cpp \ + polymost1Frag.glsl \ + polymost1Vert.glsl \ polymost.cpp \ texcache.cpp \ dxtfilter.cpp \ @@ -1010,6 +1012,13 @@ $$($1_obj)/%.$$o: $$($1_obj)/%.c $$(COMPILE_STATUS) $$(RECIPE_IF) $$(COMPILER_C) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE) +$$($1_obj)/%.$$o: $$($1_src)/%.glsl | $$($1_src)/generated + echo "Creating header from "$$< + echo "char const *$$(basename $$( $$(> $$(> $$(