Seregon/sJson

sJson (also known as Secure JSON) is a thread-safe, dynamic-allocation-free, cross-compilable JSON parser based on a PAL (Platform Abstraction Layer) architecture writed in c99

C/251 B/No license
Makefile
sJson / Makefile
1CC ?= gcc
2CFLAGS ?= -std=c99 -Wall -Wextra -Wpedantic -Wshadow -O2
3LDFLAGS ?= -lm
4SRC_DIR ?= src
5TEST_SRC ?= $(SRC_DIR)/test_json.c
6TEST_BIN ?= $(SRC_DIR)/test_json
7TEST_INC ?= $(SRC_DIR)/json_pal.h
8 
9.PHONY: all test clean asan
10 
11all: $(TEST_BIN)
12 
13$(TEST_BIN): $(TEST_SRC) $(TEST_INC)
14 $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
15 
16test: $(TEST_BIN)
17 ./$(TEST_BIN)
18 
19asan: CFLAGS += -fsanitize=address,undefined -g
20asan: $(TEST_BIN)
21 ./$(TEST_BIN)
22 
23clean:
24 rm -f $(TEST_BIN)
25