1#!/bin/bash -eu
2
3export USERCC=$CC
4export HOST_CC=$CC
5
6sys/static.sh
7cp -r r2-static $OUT/
8
9cp -r ../radare2-regressions/fuzz/targets .
10export RADARE2_STATIC_BUILD=$OUT/r2-static
11
12cd targets
13make
14
15for target in $(ls *.cc); do
16	fuzzer=$(echo $target | cut -d'.' -f1)
17	cp $fuzzer $OUT
18	cp $SRC/default.options $OUT/$fuzzer.options
19done
20
21for seed in $(ls corpora); do
22	zip -j corpora/$seed.zip corpora/$seed/*
23	cp corpora/$seed.zip $OUT
24done
25