1#!/bin/bash -eu 2# Copyright 2018 Google Inc. 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16################################################################################ 17 18$CXX -c $CXXFLAGS skcms.cc -DIS_FUZZING_WITH_LIBFUZZER 19$CC -c $CFLAGS fuzz/fuzz_iccprofile_info.c fuzz/fuzz_iccprofile_atf.c fuzz/fuzz_iccprofile_transform.c -DIS_FUZZING_WITH_LIBFUZZER 20$CXX $CXXFLAGS skcms.o fuzz_iccprofile_info.o $LIB_FUZZING_ENGINE -o $OUT/iccprofile_info 21$CXX $CXXFLAGS skcms.o fuzz_iccprofile_atf.o $LIB_FUZZING_ENGINE -o $OUT/iccprofile_atf 22$CXX $CXXFLAGS skcms.o fuzz_iccprofile_transform.o $LIB_FUZZING_ENGINE -o $OUT/iccprofile_transform 23 24# They share the same options 25cp iccprofile.options $OUT/iccprofile_info.options 26cp iccprofile.options $OUT/iccprofile_atf.options 27cp iccprofile.options $OUT/fuzz_iccprofile_transform.options 28# They all share the same seed corpus of icc profiles 29cp iccprofile_seed_corpus.zip $OUT/iccprofile_info_seed_corpus.zip 30cp iccprofile_seed_corpus.zip $OUT/iccprofile_atf_seed_corpus.zip 31cp iccprofile_seed_corpus.zip $OUT/iccprofile_transform_seed_corpus.zip 32# They all use the same dictionary file. 33cp iccprofile.dict $OUT/iccprofile.dict 34