-
Notifications
You must be signed in to change notification settings - Fork 563
/
Makefile
81 lines (61 loc) · 1.58 KB
/
Makefile
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
74
75
76
77
78
79
80
81
RIME_ROOT ?= $(CURDIR)
prefix ?= $(DESTDIR)/usr
debug install-debug uninstall-debug test-debug: build ?= debug
build ?= build
.PHONY: all thirdparty xcode clean \
librime librime-static install-librime uninstall-librime \
release debug test install uninstall install-debug uninstall-debug
all: release
thirdparty:
make -f thirdparty.mk
thirdparty/%:
make -f thirdparty.mk $(@:thirdparty/%=%)
xcode:
make -f xcode.mk
xcode/%:
make -f xcode.mk $(@:xcode/%=%)
clean:
rm -Rf build debug
librime: release
install-librime: install
uninstall-librime: uninstall
librime-static:
cmake . -B$(build) \
-DCMAKE_INSTALL_PREFIX=$(prefix) \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_STATIC=ON \
-DBUILD_SHARED_LIBS=OFF
cmake --build $(build)
release:
cmake . -B$(build) \
-DCMAKE_INSTALL_PREFIX=$(prefix) \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_MERGED_PLUGINS=OFF \
-DENABLE_EXTERNAL_PLUGINS=ON
cmake --build $(build)
merged-plugins:
cmake . -B$(build) \
-DCMAKE_INSTALL_PREFIX=$(prefix) \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_MERGED_PLUGINS=ON \
-DENABLE_EXTERNAL_PLUGINS=OFF
cmake --build $(build)
debug:
cmake . -B$(build) \
-DCMAKE_INSTALL_PREFIX=$(prefix) \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_MERGED_PLUGINS=OFF \
-DENABLE_EXTERNAL_PLUGINS=ON
cmake --build $(build)
install:
cmake --build $(build) --target install
install-debug:
cmake --build $(build) --target install
uninstall:
cmake --build $(build) --target uninstall
uninstall-debug:
cmake --build $(build) --target uninstall
test: release
(cd $(build)/test; ./rime_test)
test-debug: debug
(cd $(build)/test; ./rime_test)