diff options
author | Ankit Navik <ankit.tarot@gmail.com> | 2018-12-22 23:15:21 +0530 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-12-22 15:37:35 -0800 |
commit | 547ba317de0d4a22cf535f82fcc039687cd4385f (patch) | |
tree | 413c21a1639102a3fc016c77cebce118368401dc /meta-oe/recipes-graphics | |
parent | 47d5d28972bc564fec90f22a24e1b2bc24fa5ce6 (diff) | |
download | meta-openembedded-contrib-547ba317de0d4a22cf535f82fcc039687cd4385f.tar.gz |
spirv-shader-generator: Initial recipe for SPIRV-Cross
Add generic recipe for SPIRV-Cross tool.
SPIRV-Cross is a practical tool and library for performing reflection on
SPIR-V and disassembling SPIR-V back to high level languages.
Signed-off-by: Ankit Navik <ankit.tarot@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics')
-rw-r--r-- | meta-oe/recipes-graphics/spir/files/0001-Add-install-PHONY-target-in-Makefile.patch | 31 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb | 22 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/spir/files/0001-Add-install-PHONY-target-in-Makefile.patch b/meta-oe/recipes-graphics/spir/files/0001-Add-install-PHONY-target-in-Makefile.patch new file mode 100644 index 0000000000..78598ea1ea --- /dev/null +++ b/meta-oe/recipes-graphics/spir/files/0001-Add-install-PHONY-target-in-Makefile.patch @@ -0,0 +1,31 @@ +From 8d9870b66c3cfcf12ce7e8e013946e2a215bb722 Mon Sep 17 00:00:00 2001 +From: Ankit Navik <ankit.tarot@gmail.com> +Date: Sat, 22 Dec 2018 19:16:02 +0530 +Subject: [PATCH] Add install PHONY target in Makefile + +--- + Makefile | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 0564b65..0993372 100644 +--- a/Makefile ++++ b/Makefile +@@ -35,7 +35,13 @@ $(STATIC_LIB): $(OBJECTS) + %.o: %.cpp + $(CXX) -c -o $@ $< $(CXXFLAGS) -MMD + ++install: ++ mkdir -p $(TARGET_DIR_BIN) ++ mkdir -p $(TARGET_DIR_LIB) ++ cp $(TARGET) $(TARGET_DIR_BIN)/ ++ cp $(STATIC_LIB) $(TARGET_DIR_LIB)/ ++ + clean: + rm -f $(TARGET) $(OBJECTS) $(CLI_OBJECTS) $(STATIC_LIB) $(DEPS) + +-.PHONY: clean ++.PHONY: all install clean +-- +2.7.4 + diff --git a/meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb b/meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb new file mode 100644 index 0000000000..b787972da6 --- /dev/null +++ b/meta-oe/recipes-graphics/spir/spirv-shader-generator_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "SPIRV-Cross is a tool designed for parsing and converting SPIR-V \ +to other shader languages" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" +SECTION = "graphics" + +S = "${WORKDIR}/git" +SRCREV = "ed16b3e69985feaf565efbecea70a1cc2fca2a58" +SRC_URI = "git://github.com/KhronosGroup/SPIRV-Cross.git \ + file://0001-Add-install-PHONY-target-in-Makefile.patch \ +" + +EXTRA_OEMAKE += 'TARGET_DIR_LIB="${D}${libdir}"' +EXTRA_OEMAKE += 'TARGET_DIR_BIN="${D}${bindir}"' + +do_compile () { + cd ${S} && oe_runmake +} + +do_install () { + cd ${S} && oe_runmake install +} |