]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
make : add libllama.so target for llama-cpp-python (#797)
authorbhubbb <redacted>
Fri, 7 Apr 2023 16:11:58 +0000 (02:11 +1000)
committerGitHub <redacted>
Fri, 7 Apr 2023 16:11:58 +0000 (19:11 +0300)
I was able to get llama-cpp-python working but only when I build libllama.so with make.

Makefile

index cb14ffdbc74b627a196d10f77fa3da47e478442d..96c19deb60147dd5a327eccb173ef716a91b6e66 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -166,6 +166,8 @@ perplexity: examples/perplexity/perplexity.cpp ggml.o llama.o common.o
 embedding: examples/embedding/embedding.cpp ggml.o llama.o common.o
        $(CXX) $(CXXFLAGS) examples/embedding/embedding.cpp ggml.o llama.o common.o -o embedding $(LDFLAGS)
 
+libllama.so: llama.o ggml.o
+       $(CXX) $(CXXFLAGS) -shared -fPIC -o libllama.so llama.o ggml.o $(LDFLAGS)
 #
 # Tests
 #