From b333b06772c89d96aacb5490d6a219fba7c09cc6 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 12 Feb 2026 20:57:17 +0100 Subject: Engage! --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a1935b2 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +LLAMA_DIR = llama.cpp +LLAMA_BUILD_DIR = $(LLAMA_DIR)/build + +CFLAGS = -Wall -Wextra -O3 -I$(LLAMA_DIR)/include -I$(LLAMA_DIR)/ggml/include +LDFLAGS = -L$(LLAMA_BUILD_DIR)/src -L$(LLAMA_BUILD_DIR)/ggml/src \ + -lpthread -lm -ldl -lstdc++ -g \ + -lllama -lggml -lggml-cpu -lggml-base + + +# -Wl,-rpath,$(shell pwd)/$(LLAMA_BUILD_DIR)/bin \ + +prompt: prompt.c + $(CC) $(CFLAGS) prompt.c -o prompt $(LDFLAGS) + +llama: + mkdir llama.cpp/build && \ + cd llama.cpp/build && \ + cmake ../ -DBUILD_SHARED_LIBS=OFF && \ + make -j8 + +clean: + -rm -f prompt + cd llama.cpp/build && make clean + -rm -Rf llama.cpp/build + +docker: + docker build -t promptd . + docker run -it promptd bash -- cgit v1.2.3