summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2023-10-21 10:22:37 +0300
committerkx <kx@radix.pro>2023-10-21 10:22:37 +0300
commita09ddd7ef79af378bf2023eaa05d7db36702a2be (patch)
tree85a9908f5563e03efa26443d20014359e2c906b1
parent876d397b89491d6045617045faf7a4c23689b768 (diff)
downloadsources-a09ddd7ef79af378bf2023eaa05d7db36702a2be.tar.xz
SPIRV-LLVM-Translator
-rw-r--r--packages/x/Vulkan/Makefile3
-rw-r--r--packages/x/Vulkan/SPIRV-LLVM-Translator/Makefile59
2 files changed, 61 insertions, 1 deletions
diff --git a/packages/x/Vulkan/Makefile b/packages/x/Vulkan/Makefile
index 32d0809..68092c3 100644
--- a/packages/x/Vulkan/Makefile
+++ b/packages/x/Vulkan/Makefile
@@ -4,7 +4,8 @@
# $ tree -fid .
#
-SUBDIRS := Vulkan-Docs \
+SUBDIRS := SPIRV-LLVM-Translator \
+ Vulkan-Docs \
Vulkan-ExtensionLayer-sdk \
Vulkan-Headers-sdk \
Vulkan-Loader-sdk \
diff --git a/packages/x/Vulkan/SPIRV-LLVM-Translator/Makefile b/packages/x/Vulkan/SPIRV-LLVM-Translator/Makefile
new file mode 100644
index 0000000..e6d7af9
--- /dev/null
+++ b/packages/x/Vulkan/SPIRV-LLVM-Translator/Makefile
@@ -0,0 +1,59 @@
+#
+# Project Home:
+# ============
+# https://github.com/KhronosGroup/SPIRV-LLVM-Translator
+#
+# Clone:
+# =====
+# https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git
+#
+
+url = https://github.com/KhronosGroup
+
+repo_name = SPIRV-LLVM-Translator
+pkg_name = spirv-llvm-translator
+suffix = tar.xz
+
+versions = 16.0.0 17.0.0
+
+git_repo = .git_clone
+tarballs = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+TARGETS = repository_clean
+
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean repository_clean
+
+$(git_repo):
+ @echo -e "\n======= Clone $(repo_name).git repository =======\n"
+ @rm -rf $(repo_name)
+ @git clone $(url)/$(repo_name).git $(repo_name)
+ @touch $@
+
+$(tarballs): $(git_repo)
+ @for version in $(versions) ; do \
+ tag=v`echo $$version` ; \
+ if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(pkg_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(pkg_name)-$$version/ $$tag | \
+ xz >../$(pkg_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ done
+
+$(sha1s): %.tar.xz.sha1sum : %.tar.xz
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+repository_clean: $(sha1s)
+ @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
+ @rm -rf $(git_repo) $(repo_name)
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)
+ @rm -rf $(git_repo) $(repo_name)