diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -4,6 +4,12 @@ CFLAGS = -march=native -O2 -std=c11 -Wall -Wextra CXXFLAGS = -march=native -O2 -O2 -Wall -Wextra INCLUDES = -I. -Ideps/include +# Standard tools and target directory +BINDIR = /usr/local/bin +INSTALL = install +INSTALL_PROGRAM = $(INSTALL) -m 755 +MKDIR_P = mkdir -p + LLAMA_TAG = b10107 LLAMA_URL = https://github.com/ggml-org/llama.cpp/archive/refs/tags/$(LLAMA_TAG).tar.gz LLAMA_TAR = deps/llama-$(LLAMA_TAG).tar.gz @@ -17,7 +23,7 @@ STATIC_LIBS = deps/lib/libllama.a \ # System flags required for static linking llama on OpenBSD SYS_LIBS = -static -pthread -lm -lc++ -lc++abi -TARGET = lex +TARGET = lexd SRC = llm.c main.c OBJS = $(SRC:.c=.o) @@ -79,6 +85,13 @@ deps/lib/libllama.a deps/lib/libggml.a deps/lib/libggml-cpu.a: @echo "===> Cleaning up build directory..." rm -rf $(LLAMA_SRC_DIR) +install: $(TARGET) + $(MKDIR_P) $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET) + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/$(TARGET) + clean: rm -f $(TARGET) $(OBJS) |
