Blame fuzz/build.sh

Packit ea8578
#!/bin/bash -eu
Packit ea8578
# Copyright 2018 Google Inc.
Packit ea8578
#
Packit ea8578
# Licensed under the Apache License, Version 2.0 (the "License");
Packit ea8578
# you may not use this file except in compliance with the License.
Packit ea8578
# You may obtain a copy of the License at
Packit ea8578
#
Packit ea8578
#      http://www.apache.org/licenses/LICENSE-2.0
Packit ea8578
#
Packit ea8578
# Unless required by applicable law or agreed to in writing, software
Packit ea8578
# distributed under the License is distributed on an "AS IS" BASIS,
Packit ea8578
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit ea8578
# See the License for the specific language governing permissions and
Packit ea8578
# limitations under the License.
Packit ea8578
#
Packit ea8578
################################################################################
Packit ea8578
Packit ea8578
./autogen.sh
Packit ea8578
./configure --enable-static --disable-shared
Packit ea8578
make -j$(nproc) all
Packit ea8578
ar rc json_c.a *.o
Packit ea8578
Packit ea8578
cp $SRC/*.dict $OUT/
Packit ea8578
Packit ea8578
for f in $SRC/*_fuzzer.cc; do
Packit ea8578
    fuzzer=$(basename "$f" _fuzzer.cc)
Packit ea8578
    $CXX $CXXFLAGS -std=c++11 -I$SRC/json-c \
Packit ea8578
         $SRC/${fuzzer}_fuzzer.cc -o $OUT/${fuzzer}_fuzzer \
Packit ea8578
         -lFuzzingEngine $SRC/json-c/json_c.a
Packit ea8578
done