diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-02-18 13:26:22 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-02-18 13:26:22 +0100 |
| commit | a123d9f1ebebb6ad20155285c9457a6d6a5c7a61 (patch) | |
| tree | 6b446b9b24a3d076e9eeb1a79d1bd67d7e59e7a5 /Makefile | |
| parent | 4c133f6e6345e3ee7df50d5cacea4393bc3e389a (diff) | |
| download | llmnpc-a123d9f1ebebb6ad20155285c9457a6d6a5c7a61.tar.gz | |
Cleanup and refactor
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -10,9 +10,12 @@ LDFLAGS = -L$(LLAMA_DIR)/build/src -L$(LLAMA_DIR)/build/ggml/src \ -lpthread -lm -ldl -lstdc++ -g \ -lllama -lggml -lggml-cpu -lggml-base +PROMPT_TXT := $(wildcard prompts/*.txt) +PROMPT_HEADERS := $(PROMPT_TXT:.txt=.h) + help: .help -build/npc: run/system-prompt npc.c vectordb.c models.h # Build npc binary for testing +build/npc: build/prompts npc.c vectordb.c models.h # Build npc binary for testing $(CC) $(CFLAGS) npc.c vectordb.c -o npc $(LDFLAGS) build/context: context.c vectordb.c models.h # Build context binary for testing @@ -24,6 +27,8 @@ build/llama.cpp: .assure # Build llama.cpp libraries cmake ../ -DBUILD_SHARED_LIBS=OFF && \ make -j8 +build/prompts: $(PROMPT_HEADERS) # Generate C style header + run/fetch-models: .assure # Fetch GGUF models -mkdir -p models cd models && wget -nc -i ../models.txt @@ -32,10 +37,10 @@ run/docker: .assure # Runs npc in Docker container docker build -t npcd . docker run -it npcd -run/system-prompt: .assure # Generate C style header - xxd -i system_prompt.txt > system_prompt.h - run/clean: # Cleans up all the build artefacts -rm -f npc cd $(LLAMA_DIR)/build && make clean -rm -Rf $(LLAMA_DIR)/build + +prompts/%.h: prompts/%.txt .assure + xxd -i $< > $@ |
