-
Notifications
You must be signed in to change notification settings - Fork 818
/
BUILD.mk
35 lines (28 loc) · 1.18 KB
/
BUILD.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
#── vi: set noet ft=make ts=8 sw=8 fenc=utf-8 :vi ────────────────────┘
PKGS += LLAMA_CPP
LLAMA_CPP_FILES := $(wildcard llama.cpp/*.*)
LLAMA_CPP_HDRS = $(filter %.h,$(LLAMA_CPP_FILES))
LLAMA_CPP_INCS = $(filter %.inc,$(LLAMA_CPP_FILES))
LLAMA_CPP_SRCS_C = $(filter %.c,$(LLAMA_CPP_FILES))
LLAMA_CPP_SRCS_CPP = $(filter %.cpp,$(LLAMA_CPP_FILES))
LLAMA_CPP_SRCS = $(LLAMA_CPP_SRCS_C) $(LLAMA_CPP_SRCS_CPP)
LLAMA_CPP_OBJS = \
$(LLAMAFILE_OBJS) \
$(LLAMA_CPP_SRCS_C:%.c=o/$(MODE)/%.o) \
$(LLAMA_CPP_SRCS_CPP:%.cpp=o/$(MODE)/%.o) \
$(LLAMA_CPP_FILES:%=o/$(MODE)/%.zip.o)
o/$(MODE)/llama.cpp/llama.cpp.a: $(LLAMA_CPP_OBJS)
include llama.cpp/llava/BUILD.mk
include llama.cpp/server/BUILD.mk
include llama.cpp/main/BUILD.mk
include llama.cpp/quantize/BUILD.mk
include llama.cpp/perplexity/BUILD.mk
$(LLAMA_CPP_OBJS): private CCFLAGS += -DGGML_MULTIPLATFORM
.PHONY: o/$(MODE)/llama.cpp
o/$(MODE)/llama.cpp: \
o/$(MODE)/llama.cpp/main \
o/$(MODE)/llama.cpp/llava \
o/$(MODE)/llama.cpp/server \
o/$(MODE)/llama.cpp/quantize \
o/$(MODE)/llama.cpp/perplexity