From 99c3027298fd315d3eeef22535fec6f0dc43d5e1 Mon Sep 17 00:00:00 2001 From: Mason M Date: Tue, 25 Jun 2024 22:18:56 -0300 Subject: [PATCH] Use pkg-config to locate vulkan library --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 38bee897b..3194607df 100644 --- a/Makefile +++ b/Makefile @@ -597,8 +597,8 @@ endif # LLAMA_CUDA ifdef LLAMA_VULKAN MK_CPPFLAGS += -DGGML_USE_VULKAN - MK_LDFLAGS += -lvulkan - OBJS += ggml-vulkan.o + MK_LDFLAGS += $(shell pkg-config --libs vulkan) + OBJS += ggml-vulkan.o ggml-vulkan-shaders.o ifdef LLAMA_VULKAN_CHECK_RESULTS MK_CPPFLAGS += -DGGML_VULKAN_CHECK_RESULTS @@ -852,6 +852,7 @@ clean: rm -vrf *.o tests/*.o *.so *.a *.dll common/build-info.cpp *.dot $(COV_TARGETS) $(BUILD_TARGETS) $(TEST_TARGETS) rm -vrf ggml-cuda/*.o rm -vrf ggml-cuda/template-instances/*.o + rm -f ggml-vulkan-shaders.hpp ggml-vulkan-shaders.cpp find examples pocs -type f -name "*.o" -delete #