File: makefile.unix

package info (click to toggle)
golang-github-bep-gowebp 0.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,660 kB
  • sloc: ansic: 76,136; sh: 1,085; makefile: 585; python: 416; cpp: 262
file content (31 lines) | stat: -rw-r--r-- 987 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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 animencoder_fuzzer
FUZZERS += animdecoder_fuzzer mux_demux_api_fuzzer enc_dec_fuzzer
FUZZERS += 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