-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (58 loc) · 2.04 KB
/
Makefile
File metadata and controls
73 lines (58 loc) · 2.04 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Shim Makefile - CMake now handles the build for the most part.
# We use git to clean
GIT := /bin/git
.PHONY: all prod sense dev mini tiny clean distclean install uninstall setup_build tests help
help:
@echo "Splinter's build is managed by CMake. This Makefile is a shim"
@echo "to help people get started quickly. Any build configuration is"
@echo "possible; here are targets that produce the most common"
@echo "configurations:"
@echo ""
@echo "------------------------------------"
@echo "| Type 'make' + target_name to use |"
@echo "------------------------------------"
@echo "sense | \"dev\" + Valgrind"
@echo "dev | \"prod\" + Llama + Rust"
@echo "prod | Numa + Lua + Embeddings"
@echo "mini | Embeddings only"
@echo "tiny | No Embeddings (KV Only)"
@echo "clean | Clean build artifacts"
@echo "distclean | Purge repo"
@echo "install | Install Splinter"
@echo "uninstall | Uninstall Splinter"
@echo ""
@echo "You can also run CMake manually, for example, if you wanted a "
@echo "stripped-down build + Rust bindings for it. Edit this Makefile to see how."
@echo ""
@echo "If unsure where to start, try 'make mini' - it requires no dependencies and"
@echo "enables many features."
@echo ""
setup_build:
@mkdir -p build
dev: setup_build
cd build && cmake -DWITH_EMBEDDINGS=ON -DWITH_LLAMA=ON -DWITH_LUA=ON -DWITH_NUMA=ON -DWITH_RUST=ON -DWITH_VALGRIND=ON ..
@$(MAKE) -C build
sense: setup_build
cd build && cmake -DWITH_EMBEDDINGS=ON -DWITH_LLAMA=ON -DWITH_LUA=ON -DWITH_NUMA=ON -DWITH_RUST=ON ..
@$(MAKE) -C build
prod: setup_build
cd build && cmake -DWITH_EMBEDDINGS=ON -DWITH_LUA=ON -DWITH_NUMA=ON ..
@$(MAKE) -C build
mini: setup_build
cd build && cmake -DWITH_EMBEDDINGS=ON ..
@$(MAKE) -C build
tiny: setup_build
cd build && cmake ..
@$(MAKE) -C build
all: help
install:
@$(MAKE) -C build install
uninstall:
@$(MAKE) -C build uninstall
tests:
@cd build && ctest --output-on-failure
clean:
@$(MAKE) -C build clean
@rm -f bind_watch bind_watch.c
distclean:
@$(GIT) clean -fdx || false