mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Clone zlib into the oss-fuzz zlib project and build zlib alongside libpng.
This commit is contained in:
@@ -14,12 +14,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Last changed in libpng 1.6.33 [September 28, 2017]
|
||||
# Last changed in libpng 1.6.35 [October 1, 2017]
|
||||
#
|
||||
# Revisions by Glenn Randers-Pehson, 2017:
|
||||
# Revisions by Glenn Randers-Pehrson, 2017:
|
||||
# 1. Build only the library, not the tools (changed "make -j$(nproc) all" to
|
||||
# "make -j$(nproc) libpng16.la").
|
||||
# 2. Disabled WARNING and WRITE options in pnglibconf.dfa.
|
||||
# 3. Build zlib alongside libpng
|
||||
################################################################################
|
||||
|
||||
# Disable logging via library build configuration control.
|
||||
@@ -30,14 +31,17 @@ cat scripts/pnglibconf.dfa | \
|
||||
> scripts/pnglibconf.dfa.temp
|
||||
mv scripts/pnglibconf.dfa.temp scripts/pnglibconf.dfa
|
||||
|
||||
# build the library.
|
||||
# build zlib library.
|
||||
(cd ../zlib; ./configure; make -j$(nproc) clean; make -j$(nproc) all)
|
||||
|
||||
# build the libpng library.
|
||||
autoreconf -f -i
|
||||
./configure
|
||||
CPPFLAGS="-I../zlib" LDFLAGS="-L../zlib" ./configure
|
||||
make -j$(nproc) clean
|
||||
make -j$(nproc) libpng16.la
|
||||
|
||||
# build libpng_read_fuzzer.
|
||||
$CXX $CXXFLAGS -std=c++11 -I. \
|
||||
$CXX $CXXFLAGS -std=c++11 -I. -I../zlib -L../zlib \
|
||||
$SRC/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc \
|
||||
-o $OUT/libpng_read_fuzzer \
|
||||
-lFuzzingEngine .libs/libpng16.a -lz
|
||||
|
||||
Reference in New Issue
Block a user