xref: /aosp_15_r20/external/libldac/fuzzer/ossfuzz.sh (revision aef9bcd9217ad2365ebc8e70efaf94b64e04df14)
1*aef9bcd9SKiyoung Kim# Copyright (C) 2022 The Android Open Source Project
2*aef9bcd9SKiyoung Kim#
3*aef9bcd9SKiyoung Kim# Licensed under the Apache License, Version 2.0 (the "License");
4*aef9bcd9SKiyoung Kim# you may not use this file except in compliance with the License.
5*aef9bcd9SKiyoung Kim# You may obtain a copy of the License at
6*aef9bcd9SKiyoung Kim#
7*aef9bcd9SKiyoung Kim# http://www.apache.org/licenses/LICENSE-2.0
8*aef9bcd9SKiyoung Kim#
9*aef9bcd9SKiyoung Kim# Unless required by applicable law or agreed to in writing, software
10*aef9bcd9SKiyoung Kim# distributed under the License is distributed on an "AS IS" BASIS,
11*aef9bcd9SKiyoung Kim# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*aef9bcd9SKiyoung Kim# See the License for the specific language governing permissions and
13*aef9bcd9SKiyoung Kim# limitations under the License.
14*aef9bcd9SKiyoung Kim#
15*aef9bcd9SKiyoung Kim################################################################################
16*aef9bcd9SKiyoung Kim
17*aef9bcd9SKiyoung Kim$CXX $CXXFLAGS -Iinc -c fuzzer/libldac_encode_fuzzer.cc -o libldac_encode_fuzzer.o
18*aef9bcd9SKiyoung Kim$CC $CFLAGS -Iinc -c src/ldaclib.c -o src/ldaclib.o
19*aef9bcd9SKiyoung Kim$CC $CFLAGS -Iinc -c src/ldacBT.c -o src/ldacBT.o
20*aef9bcd9SKiyoung Kim
21*aef9bcd9SKiyoung Kim$CXX $CXXFLAGS $LIB_FUZZING_ENGINE \
22*aef9bcd9SKiyoung Kim    libldac_encode_fuzzer.o \
23*aef9bcd9SKiyoung Kim    src/ldaclib.o \
24*aef9bcd9SKiyoung Kim    src/ldacBT.o \
25*aef9bcd9SKiyoung Kim    -o $OUT/libldac_encode_fuzzer
26*aef9bcd9SKiyoung Kim
27*aef9bcd9SKiyoung Kimzip -q $OUT/libldac_encode_fuzzer_seed_corpus.zip $SRC/corpora/*
28