mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-25 08:14:24 +00:00
makefile fix vulkan noext compile (+1 squashed commits)
Squashed commits: [eae88fd49] makefile fix vulkan noext compile
This commit is contained in:
parent
f2ad0b78d4
commit
c00ae93421
1 changed files with 9 additions and 4 deletions
13
Makefile
13
Makefile
|
|
@ -471,8 +471,13 @@ endif
|
|||
|
||||
ifdef NO_VULKAN_EXTENSIONS
|
||||
VKGEN_NOEXT_ADD = -DNO_VULKAN_EXTENSIONS
|
||||
VKGEN_SUFFIX = -noext
|
||||
else
|
||||
VKGEN_SUFFIX =
|
||||
endif
|
||||
VKGEN_NOEXT_FORCE = -DNO_VULKAN_EXTENSIONS
|
||||
VKGEN_HPP = ggml/src/ggml-vulkan-shaders$(VKGEN_SUFFIX).hpp
|
||||
VKGEN_CPP = ggml/src/ggml-vulkan-shaders$(VKGEN_SUFFIX).cpp
|
||||
|
||||
#
|
||||
# Print build information
|
||||
|
|
@ -685,9 +690,9 @@ ggml_v3-opencl.o: otherarch/ggml_v3-opencl.cpp otherarch/ggml_v3-opencl.h
|
|||
$(CXX) $(CXXFLAGS) $(CLBLAST_FLAGS) -c $< -o $@
|
||||
|
||||
#vulkan
|
||||
ggml-vulkan.o: ggml/src/ggml-vulkan/ggml-vulkan.cpp ggml/include/ggml-vulkan.h ggml/src/ggml-vulkan-shaders.cpp
|
||||
ggml-vulkan.o: ggml/src/ggml-vulkan/ggml-vulkan.cpp ggml/include/ggml-vulkan.h $(VKGEN_CPP)
|
||||
$(CXX) $(CXXFLAGS) $(VKGEN_NOEXT_ADD) $(VULKAN_FLAGS) -c $< -o $@
|
||||
ggml-vulkan-shaders.o: ggml/src/ggml-vulkan-shaders.cpp ggml/include/ggml-vulkan.h
|
||||
ggml-vulkan-shaders.o: $(VKGEN_CPP) ggml/include/ggml-vulkan.h
|
||||
$(CXX) $(CXXFLAGS) $(VKGEN_NOEXT_ADD) $(VULKAN_FLAGS) -c $< -o $@
|
||||
ggml-vulkan-noext.o: ggml/src/ggml-vulkan/ggml-vulkan.cpp ggml/include/ggml-vulkan.h ggml/src/ggml-vulkan-shaders-noext.cpp
|
||||
$(CXX) $(CXXFLAGS) $(VKGEN_NOEXT_FORCE) $(VULKAN_FLAGS) -c $< -o $@
|
||||
|
|
@ -785,7 +790,7 @@ vulkan-shaders-gen: ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp
|
|||
$(CXX) $(CXXFLAGS) $(VKGEN_NOEXT_ADD) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
|
||||
ifeq ($(OS),Windows_NT)
|
||||
@echo 'Now rebuilding vulkan shaders for Windows...'
|
||||
$(shell) vulkan-shaders-gen --glslc glslc --input-dir ggml/src/ggml-vulkan/vulkan-shaders --target-hpp ggml/src/ggml-vulkan-shaders.hpp --target-cpp ggml/src/ggml-vulkan-shaders.cpp --output-dir vulkan-spv-tmp
|
||||
$(shell) vulkan-shaders-gen --glslc glslc --input-dir ggml/src/ggml-vulkan/vulkan-shaders --target-hpp $(VKGEN_HPP) --target-cpp $(VKGEN_CPP) --output-dir vulkan-spv-tmp
|
||||
@echo 'Vulkan Shaders Rebuilt for Windows...'
|
||||
else
|
||||
@echo 'Now rebuilding vulkan shaders for Linux...'
|
||||
|
|
@ -819,7 +824,7 @@ else
|
|||
echo "Error: No usable glslc found. Vulkan shaders cannot be compiled!"; \
|
||||
else \
|
||||
echo "Using GLSLC: $$GLSLC_BIN"; \
|
||||
./vulkan-shaders-gen --glslc "$$GLSLC_BIN" --input-dir ggml/src/ggml-vulkan/vulkan-shaders --target-hpp ggml/src/ggml-vulkan-shaders.hpp --target-cpp ggml/src/ggml-vulkan-shaders.cpp --output-dir vulkan-spv-tmp; \
|
||||
./vulkan-shaders-gen --glslc "$$GLSLC_BIN" --input-dir ggml/src/ggml-vulkan/vulkan-shaders --target-hpp $(VKGEN_HPP) --target-cpp $(VKGEN_CPP) --output-dir vulkan-spv-tmp; \
|
||||
fi
|
||||
@echo 'Vulkan Shaders Rebuilt for Linux...'
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue