-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
27 lines (25 loc) · 1.06 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
.PHONY: debug release build clean test docker
VERSION = $(shell cat ./version)
build: debug release
debug:
g++ src/*.cpp -pthread -std=c++17 -D_VERSION='"$(VERSION)"' -DDEBUG -rdynamic -o ijson.debug
release:
g++ src/*.cpp -pthread -std=c++17 -D_VERSION='"$(VERSION)"' -O2 -o ijson
release_freebsd:
g++ src/*.cpp -pthread -std=c++17 -D_VERSION='"$(VERSION)"' -O2 -D_KQUEUE -o ijson
release_macos:
g++ src/*.cpp -pthread -std=c++17 -D_VERSION='"$(VERSION)"' -O2 -D_KQUEUE -D_NOBALANCER -o ijson
clean:
rm -f ijson ijson.debug
docker:
g++ src/*.cpp -pthread -std=c++17 -D_VERSION='"$(VERSION)"' -DDOCKER -O2 -o docker/ijson
g++ src/*.cpp -pthread -std=c++17 -D_VERSION='"$(VERSION)"' -DDOCKER -DDEBUG -rdynamic -o docker/ijson.debug
docker_slim:
g++ src/*.cpp -pthread -std=c++17 -D_VERSION='"$(VERSION)"' -DDOCKER -O2 -o docker-slim/ijson -static
test:
cd tests; pytest -v -s main.py
cd tests; pytest -v -s main4.py
make_builder_u16:
docker build -t ijson_builder_u16 ./docker/builder_u16
build_u16:
docker run -it --rm -v `pwd`:/cpp -w /cpp ijson_builder_u16 make build