-
Notifications
You must be signed in to change notification settings - Fork 72
/
Makefile
35 lines (27 loc) · 912 Bytes
/
Makefile
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
32
33
34
35
BLAB := $(shell command -v blab 2> /dev/null)
RADAMSA := $(shell command -v radamsa 2> /dev/null)
CFLAGS = -W -g -O3
LIBS = -lpcre -lssl -lcrypto -lpthread
FUZZOTRON = fuzzotron
REPLAY = replay
FUZZOTRON_SRC = fuzzotron.c callback.c generator.c monitor.c sender.c trace.c
REPLAY_SRC = replay.c callback.c sender.c
FUZZOTRON_OBJ = $(FUZZOTRON_SRC:.c=.o)
REPLAY_OBJ = $(REPLAY_SRC:.c=.o)
.PHONY: all
all: fuzzotron replay
ifndef RADAMSA
$(error radamsa is not available. Download from https://gitlab.com/akihe/radamsa)
endif
ifndef BLAB
$(info Blab is not available, attempting to use blab mode will fail. Download from https://gitlab.com/akihe/blab)
endif
$(FUZZOTRON): $(FUZZOTRON_OBJ)
$(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
$(REPLAY): $(REPLAY_OBJ)
$(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
$(SRCS:.c):%.c
$(CC) $(CFLAGS) -MM $<
.PHONY: clean
clean:
rm -f $(REPLAY_OBJ) $(FUZZOTRON_OBJ) ${FUZZOTRON} ${REPLAY}