mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
a35ea50de4
Change-Id: If8c30aaa87c34007ae455a03daa7b3c0f22fc8c3
32 lines
1002 B
Plaintext
32 lines
1002 B
Plaintext
# This Makefile will compile all fuzzing targets. It doesn't check tool
|
|
# requirements and paths may need to be updated depending on your environment.
|
|
# Note a clang 6+ toolchain is assumed for use of -fsanitize=fuzzer.
|
|
|
|
CC = clang
|
|
CXX = clang++
|
|
CFLAGS = -fsanitize=fuzzer -I../../src -I../.. -Wall -Wextra
|
|
CXXFLAGS = $(CFLAGS)
|
|
LDFLAGS = -fsanitize=fuzzer
|
|
LDLIBS = ../../src/mux/libwebpmux.a ../../src/demux/libwebpdemux.a
|
|
LDLIBS += ../../src/libwebp.a ../../imageio/libimageio_util.a
|
|
LDLIBS += ../../sharpyuv/libsharpyuv.a
|
|
|
|
FUZZERS = advanced_api_fuzzer animation_api_fuzzer animdecoder_fuzzer
|
|
FUZZERS += animencoder_fuzzer enc_dec_fuzzer huffman_fuzzer
|
|
FUZZERS += mux_demux_api_fuzzer simple_api_fuzzer
|
|
|
|
%.o: fuzz_utils.h img_alpha.h img_grid.h img_peak.h
|
|
all: $(FUZZERS)
|
|
|
|
define FUZZER_template
|
|
$(1): $$(addsuffix .o, $(1)) $(LDLIBS)
|
|
OBJS += $$(addsuffix .o, $(1))
|
|
endef
|
|
|
|
$(foreach fuzzer, $(FUZZERS), $(eval $(call FUZZER_template, $(fuzzer))))
|
|
|
|
clean:
|
|
$(RM) $(FUZZERS) $(OBJS)
|
|
|
|
.PHONY: all clean
|