-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (26 loc) · 1.25 KB
/
Makefile
File metadata and controls
40 lines (26 loc) · 1.25 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
JSON_C_CFLAGS=$(shell pkg-config --cflags json-c)
JSON_C_LDFLAGS=$(shell pkg-config --libs json-c)
all: test-json-c-get-a test-json-update test-json-filter
bench:
make -C bench
bench-clean:
make -C bench clean
.PHONY: all clean tests pip-dev pip-dev bench bench-clean
CFLAGS=-fsanitize=address -fsanitize=undefined -Wall -Wextra -Wno-unused-function -Wno-unused-parameter -O0 -g
test-json-c-get-a: tests/json-c/get-a.c csonpath_json-c.h csonpath.h csonpath_do.h
$(CC) tests/json-c/get-a.c $(JSON_C_CFLAGS) $(CFLAGS) -Wno-format -I./ -o test-json-c-get-a $(JSON_C_LDFLAGS)
test-json-update: tests/json-c/set-a.c csonpath_json-c.h csonpath.h csonpath_do.h
$(CC) tests/json-c/set-a.c $(JSON_C_CFLAGS) $(CFLAGS) -Wno-format -I./ -o test-json-update $(JSON_C_LDFLAGS)
test-json-filter: tests/json-c/filter.c csonpath_json-c.h csonpath.h csonpath_do.h
$(CC) tests/json-c/filter.c $(JSON_C_CFLAGS) $(CFLAGS) -Wno-format -I./ -o test-json-filter $(JSON_C_LDFLAGS)
tests-c: test-json-c-get-a test-json-update test-json-filter
./test-json-c-get-a
./test-json-update
./test-json-filter
pip-dev:
pip install -e .[dev] --force-reinstall
tests-py: pip-dev
python -m pytest
tests: tests-py tests-c
clean:
rm -rvf test-json-c-get-a test-json-update test-json-filter