-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (35 loc) · 1008 Bytes
/
Copy pathMakefile
File metadata and controls
41 lines (35 loc) · 1008 Bytes
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
.PHONY: \
build \
clean \
download-build-static-deps
build:
( \
mkdir -p build/release; \
cd build/release; \
cmake ../.. \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DCMAKE_BUILD_TYPE=Release; \
make -j8; \
)
clean:
rm -rf build bindings/python/fasttokenizer/*.so
download-build-static-deps:
@mkdir -p deps
@echo "Downloading pybind"
curl -L -o deps/pybind-v2.5.0.tar.gz \
https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz
tar -C deps -xf deps/pybind-v2.5.0.tar.gz
@echo "Downloading CLI11"
curl -L -o deps/CLI11-v1.9.1.tar.gz \
https://github.com/CLIUtils/CLI11/archive/v1.9.1.tar.gz
tar -C deps -xf deps/CLI11-v1.9.1.tar.gz
@echo "Downloading and building ICU"
curl -L -o deps/icu4c-67_1-src.tgz \
https://github.com/unicode-org/icu/releases/download/release-67-1/icu4c-67_1-src.tgz
tar -C deps -xf deps/icu4c-67_1-src.tgz
( \
cd deps/icu/source; \
CFLAGS="-fPIC" CXXFLAGS="-fPIC -std=c++11" ./configure \
--disable-shared --enable-static; \
make -j8; \
)