Tests: Update OSS-Fuzz Makefile.
All .c files can be built as separate fuzz targets. This simplifies the Makefile by allowing us to use wildcards instead of having a Makefile target for each fuzz target.
This commit is contained in:
parent
28ce6a1c2a
commit
37581a77ad
|
@ -1,7 +1,12 @@
|
||||||
fuzz: fuzz.c
|
FUZZ_TARGET_SRCS = $(wildcard *.c)
|
||||||
$(CC) $(CFLAGS) -c fuzz.c -I ../../src/liblzma/api/
|
FUZZ_TARGET_BINS = $(FUZZ_TARGET_SRCS:.c=)
|
||||||
$(CXX) $(CXXFLAGS) $(LIB_FUZZING_ENGINE) fuzz.o -o $(OUT)/fuzz \
|
|
||||||
../../src/liblzma/.libs/liblzma.a
|
all: $(FUZZ_TARGET_BINS)
|
||||||
|
|
||||||
|
%: %.c
|
||||||
|
$(CC) $(CFLAGS) -c $< -I ../../src/liblzma/api/ ;
|
||||||
|
$(CXX) $(CXXFLAGS) $(LIB_FUZZING_ENGINE) $(<:.c=.o) -o $(OUT)/$@ \
|
||||||
|
../../src/liblzma/.libs/liblzma.a ;
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
|
|
Loading…
Reference in New Issue