-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
33 lines (25 loc) · 848 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
PREFIX ?= /usr/pkg/triforcenetbsdsyscallfuzzer
DOC_PATH = $(PREFIX)/docs
HOST_PROGS = ./testAfl ./runFuzz
TARG_PROGS = ./genInputs ./genRepro ./driver
TARG_PROGS += ./gen.py ./gen2.py ./genTempl.py
TARG_PROGS += ./genRepro.py
TARG_FILES = ./templ.txt
CFLAGS= -g -Wall
OBJS= aflCall.o driver.o parse.o sysc.o argfd.o
all : testAfl driver
testAfl : testAfl.o
$(CC) $(CFLAGS) -o $@ testAfl.o
driver: $(OBJS)
$(CC) $(CFLAGS) -static -o $@ $(OBJS)
argfd.c : argfd.c.tmpl numTempl.py
./numTempl.py < argfd.c.tmpl > argfd.c
clean:
rm -f testAfl.o testAfl
rm -f $(OBJS) testAfl.o argfd.c
install: all
mkdir -p -m 755 $${DESTDIR}$(DOC_PATH)
install -m 755 $(HOST_PROGS) $${DESTDIR}$(PREFIX)
install -m 755 $(TARG_PROGS) $${DESTDIR}$(PREFIX)
install -m 644 $(TARG_FILES) $${DESTDIR}$(PREFIX)
install -m 644 ./docs/* $${DESTDIR}$(DOC_PATH)