File tree Expand file tree Collapse file tree 1 file changed +29
-7
lines changed
Expand file tree Collapse file tree 1 file changed +29
-7
lines changed Original file line number Diff line number Diff line change 1515#
1616# ###############################################################################
1717
18- ./autogen.sh
19- ./configure --enable-static --disable-shared
20- make -j$( nproc) all
21- ar rc json_c.a * .o
18+ # This should be run from the top of the json-c source tree.
2219
23- cp $SRC /* .dict $OUT /
20+ mkdir build
21+ cd build
22+ cmake -DBUILD_SHARED_LIBS=OFF ..
23+ make -j$( nproc)
2424
25+ LIB=$( pwd) /libjson-c.a
26+ cd ..
27+
28+ # These seem to be set externally, but let's assign defaults to
29+ # make it possible to at least partially test this standalone.
30+ : ${SRC:= $(dirname " $0 " )}
31+ : ${OUT:= $SRC / out}
32+ : ${CXX:= gcc}
33+ : ${CXXFLAGS:= }
34+
35+ [ -d " $OUT " ] || mkdir " $OUT "
36+ cp $SRC /* .dict $OUT /.
37+
38+ # XXX this doesn't seem to make much sense, since $SRC is presumably
39+ # the "fuzz" directory, which is _inside_ the json-c repo, rather than
40+ # the other way around, but I'm just preserving existing behavior. -erh
41+ INCS=$SRC /json-c
42+ # Compat when testing standalone
43+ [ -e " ${INCS} " ] || ln -s .. " ${INCS} "
44+
45+ set -x
46+ set -v
2547for f in $SRC /* _fuzzer.cc; do
2648 fuzzer=$( basename " $f " _fuzzer.cc)
27- $CXX $CXXFLAGS -std=c++11 -I$SRC /json-c \
49+ $CXX $CXXFLAGS -std=c++11 -I$INCS \
2850 $SRC /${fuzzer} _fuzzer.cc -o $OUT /${fuzzer} _fuzzer \
29- -lFuzzingEngine $SRC /json-c/json_c.a
51+ -lFuzzingEngine $LIB
3052done
You can’t perform that action at this time.
0 commit comments