55
66
77.PHONY : clean cleandist
8- COREDEPSINCLUDE = -Idependencies/rapidjson/include -Idependencies/sajson/include -Idependencies/cJSON -Idependencies/jsmn
8+ COREDEPSINCLUDE = -Idependencies/rapidjson/include -Idependencies/sajson/include -Idependencies/cJSON -Idependencies/jsmn
99EXTRADEPSINCLUDE = -Idependencies/jsoncppdist -Idependencies/json11 -Idependencies/fastjson/src -Idependencies/fastjson/include -Idependencies/gason/src -Idependencies/ujson4c/3rdparty -Idependencies/ujson4c/src
10- CXXFLAGS = -std=c++17 -march=native -Wall -Wextra -Wshadow -Iinclude -Ibenchmark/linux
10+ CXXFLAGS = -std=c++17 -march=native -Wall -Wextra -Wshadow -Iinclude -Ibenchmark/linux
1111CFLAGS = -march=native -Idependencies/ujson4c/3rdparty -Idependencies/ujson4c/src
1212ifeq ($(SANITIZE ) ,1)
1313 CXXFLAGS += -g3 -O0 -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
@@ -23,12 +23,12 @@ endif
2323endif
2424
2525MAINEXECUTABLES =parse minify json2json jsonstats statisticalmodel
26- TESTEXECUTABLES =jsoncheck numberparsingcheck stringparsingcheck
26+ TESTEXECUTABLES =jsoncheck numberparsingcheck stringparsingcheck
2727COMPARISONEXECUTABLES =minifiercompetition parsingcompetition parseandstatcompetition distinctuseridcompetition allparserscheckfile allparsingcompetition
2828SUPPLEMENTARYEXECUTABLES =parse_noutf8validation parse_nonumberparsing parse_nostringparsing
2929
3030HEADERS = include/simdjson/simdutf8check.h include/simdjson/stringparsing.h include/simdjson/numberparsing.h include/simdjson/jsonparser.h include/simdjson/common_defs.h include/simdjson/jsonioutil.h benchmark/benchmark.h benchmark/linux/linux-perf-events.h include/simdjson/parsedjson.h include/simdjson/stage1_find_marks.h include/simdjson/stage2_build_tape.h include/simdjson/jsoncharutils.h include/simdjson/jsonformatutils.h
31- LIBFILES =src/jsonioutil.cpp src/jsonparser.cpp src/stage1_find_marks.cpp src/stage2_build_tape.cpp
31+ LIBFILES =src/jsonioutil.cpp src/jsonparser.cpp src/stage1_find_marks.cpp src/stage2_build_tape.cpp src/parsedjson.cpp src/parsedjsoniterator.cpp
3232MINIFIERHEADERS =include/simdjson/jsonminifier.h include/simdjson/simdprune_tables.h
3333MINIFIERLIBFILES =src/jsonminifier.cpp
3434
@@ -39,7 +39,7 @@ JSON11_INCLUDE:=dependencies/json11/json11.hpp
3939FASTJSON_INCLUDE: =dependencies/include/fastjson/fastjson.h
4040GASON_INCLUDE: =dependencies/gason/src/gason.h
4141UJSON4C_INCLUDE: =dependencies/ujson4c/src/ujdecode.c
42- CJSON_INCLUDE: =dependencies/cJSON/cJSON.h
42+ CJSON_INCLUDE: =dependencies/cJSON/cJSON.h
4343JSMN_INCLUDE: =dependencies/jsmn/jsmn.h
4444
4545
@@ -52,7 +52,7 @@ competition: $(COMPARISONEXECUTABLES)
5252
5353.PHONY : benchmark test
5454
55- benchmark :
55+ benchmark :
5656 bash ./scripts/parser.sh
5757 bash ./scripts/parseandstat.sh
5858
@@ -61,7 +61,7 @@ test: jsoncheck numberparsingcheck stringparsingcheck
6161 ./stringparsingcheck
6262 ./jsoncheck
6363 ./scripts/testjson2json.sh
64- @echo
64+ @echo
6565 @tput setaf 2
6666 @echo " It looks like the code is good!"
6767 @tput sgr0
@@ -116,47 +116,47 @@ jsoncheck:tests/jsoncheck.cpp $(HEADERS) $(LIBFILES)
116116 $(CXX ) $(CXXFLAGS ) -o jsoncheck $(LIBFILES ) tests/jsoncheck.cpp -I. $(LIBFLAGS )
117117
118118numberparsingcheck :tests/numberparsingcheck.cpp $(HEADERS ) $(LIBFILES )
119- $(CXX ) $(CXXFLAGS ) -o numberparsingcheck tests/numberparsingcheck.cpp src/jsonioutil.cpp src/jsonparser.cpp src/stage1_find_marks.cpp -I. $(LIBFLAGS ) -DJSON_TEST_NUMBERS
119+ $(CXX ) $(CXXFLAGS ) -o numberparsingcheck tests/numberparsingcheck.cpp src/jsonioutil.cpp src/jsonparser.cpp src/stage1_find_marks.cpp src/parsedjson.cpp -I. $(LIBFLAGS ) -DJSON_TEST_NUMBERS
120120
121121
122122stringparsingcheck :tests/stringparsingcheck.cpp $(HEADERS ) $(LIBFILES )
123- $(CXX ) $(CXXFLAGS ) -o stringparsingcheck tests/stringparsingcheck.cpp src/jsonioutil.cpp src/jsonparser.cpp src/stage1_find_marks.cpp -I. $(LIBFLAGS ) -DJSON_TEST_STRINGS
123+ $(CXX ) $(CXXFLAGS ) -o stringparsingcheck tests/stringparsingcheck.cpp src/jsonioutil.cpp src/jsonparser.cpp src/stage1_find_marks.cpp src/parsedjson.cpp -I. $(LIBFLAGS ) -DJSON_TEST_STRINGS
124124
125125
126126minifiercompetition : benchmark/minifiercompetition.cpp $(HEADERS ) $(LIBS ) $(MINIFIERHEADERS ) $(LIBFILES ) $(MINIFIERLIBFILES )
127127 $(CXX ) $(CXXFLAGS ) -o minifiercompetition $(LIBFILES ) $(MINIFIERLIBFILES ) benchmark/minifiercompetition.cpp -I. $(LIBFLAGS ) $(COREDEPSINCLUDE )
128128
129129minify : tools/minify.cpp $(HEADERS ) $(MINIFIERHEADERS ) $(LIBFILES ) $(MINIFIERLIBFILES )
130- $(CXX ) $(CXXFLAGS ) -o minify $(MINIFIERLIBFILES ) $(LIBFILES ) tools/minify.cpp -I.
130+ $(CXX ) $(CXXFLAGS ) -o minify $(MINIFIERLIBFILES ) $(LIBFILES ) tools/minify.cpp -I.
131131
132132json2json : tools/json2json.cpp $(HEADERS ) $(LIBFILES )
133- $(CXX ) $(CXXFLAGS ) -o json2json $ tools/json2json.cpp $(LIBFILES ) -I.
133+ $(CXX ) $(CXXFLAGS ) -o json2json $ tools/json2json.cpp $(LIBFILES ) -I.
134134
135135jsonstats : tools/jsonstats.cpp $(HEADERS ) $(LIBFILES )
136- $(CXX ) $(CXXFLAGS ) -o jsonstats $ tools/jsonstats.cpp $(LIBFILES ) -I.
136+ $(CXX ) $(CXXFLAGS ) -o jsonstats $ tools/jsonstats.cpp $(LIBFILES ) -I.
137137
138138ujdecode.o : $(UJSON4C_INCLUDE )
139- $(CC ) $(CFLAGS ) -c dependencies/ujson4c/src/ujdecode.c
139+ $(CC ) $(CFLAGS ) -c dependencies/ujson4c/src/ujdecode.c
140140
141- parseandstatcompetition : benchmark/parseandstatcompetition.cpp $(HEADERS ) $(LIBFILES )
141+ parseandstatcompetition : benchmark/parseandstatcompetition.cpp $(HEADERS ) $(LIBFILES )
142142 $(CXX ) $(CXXFLAGS ) -o parseandstatcompetition $(LIBFILES ) benchmark/parseandstatcompetition.cpp -I. $(LIBFLAGS ) $(COREDEPSINCLUDE )
143143
144- distinctuseridcompetition : benchmark/distinctuseridcompetition.cpp $(HEADERS ) $(LIBFILES )
144+ distinctuseridcompetition : benchmark/distinctuseridcompetition.cpp $(HEADERS ) $(LIBFILES )
145145 $(CXX ) $(CXXFLAGS ) -o distinctuseridcompetition $(LIBFILES ) benchmark/distinctuseridcompetition.cpp -I. $(LIBFLAGS ) $(COREDEPSINCLUDE )
146146
147- parsingcompetition : benchmark/parsingcompetition.cpp $(HEADERS ) $(LIBFILES )
148- $(CXX ) $(CXXFLAGS ) -o parsingcompetition $(LIBFILES ) benchmark/parsingcompetition.cpp -I. $(LIBFLAGS ) $(COREDEPSINCLUDE )
147+ parsingcompetition : benchmark/parsingcompetition.cpp $(HEADERS ) $(LIBFILES )
148+ $(CXX ) $(CXXFLAGS ) -o parsingcompetition $(LIBFILES ) benchmark/parsingcompetition.cpp -I. $(LIBFLAGS ) $(COREDEPSINCLUDE )
149149
150150allparsingcompetition : benchmark/parsingcompetition.cpp $(HEADERS ) $(LIBFILES ) $(EXTRAOBJECTS ) $(LIBS )
151151 $(CXX ) $(CXXFLAGS ) -o allparsingcompetition $(LIBFILES ) benchmark/parsingcompetition.cpp $(EXTRAOBJECTS ) -I. $(LIBFLAGS ) $(COREDEPSINCLUDE ) $(EXTRADEPSINCLUDE ) -DALLPARSER
152152
153153
154- allparserscheckfile : tests/allparserscheckfile.cpp $(HEADERS ) $(LIBFILES ) $(EXTRAOBJECTS ) $(LIBS )
154+ allparserscheckfile : tests/allparserscheckfile.cpp $(HEADERS ) $(LIBFILES ) $(EXTRAOBJECTS ) $(LIBS )
155155 $(CXX ) $(CXXFLAGS ) -o allparserscheckfile $(LIBFILES ) tests/allparserscheckfile.cpp $(EXTRAOBJECTS ) -I. $(LIBFLAGS ) $(COREDEPSINCLUDE ) $(EXTRADEPSINCLUDE )
156156
157157
158158cppcheck :
159- cppcheck --enable=all src/* .cpp benchmarks/* .cpp tests/* .cpp -Iinclude -I. -Ibenchmark/linux
159+ cppcheck --enable=all src/* .cpp benchmarks/* .cpp tests/* .cpp -Iinclude -I. -Ibenchmark/linux
160160
161161everything : $(MAINEXECUTABLES ) $(EXTRA_EXECUTABLES ) $(TESTEXECUTABLES ) $(COMPARISONEXECUTABLES ) $(SUPPLEMENTARYEXECUTABLES )
162162
0 commit comments