-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (76 loc) · 1.92 KB
/
Makefile
File metadata and controls
95 lines (76 loc) · 1.92 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
BIND=/usr/local/bin
MAND=/usr/local/share/man/man1
#CC=gcc
CC=clang
all: README retail
retail: retail.c
${CC} -lz -o $@ $?
#--------------------------------------------------------
#
# testing
#
#--------------------------------------------------------
# Check out:
# http://lcamtuf.coredump.cx/afl/
# https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer
lint: retail.c
${CC} -lz -Weverything -o retail $?
test: lint test_retail.sh
./test_retail.sh
#--------------------------------------------------------
#
# documentation
#
#--------------------------------------------------------
README: retail.1
@# Zap backspace character (^H) and preceding char
groff -Tascii -man $? | sed -e 's/.//g' >> t
mv t $@
install: ${BIND}/retail ${MAND}/retail.1
${BIND}/retail: retail
cp -p $? $@
chmod 755 $@
${MAND}/retail.1: retail.1
cp -p $? $@
#--------------------------------------------------------
#
# misc
#
#--------------------------------------------------------
clean:
rm -f retail
rm -rf testing
#--------------------------------------------------------
#
# fuzzing
#
# Commented out, couldn't get it to do anything useful.
# Ran, but got the following warning:
#
# Instrumentation output varies across runs.
#
#--------------------------------------------------------
#
# AFLVERS=0.89b
# AFL=afl-${CC}
#
# afl-${AFLVERS}.tgz:
# curl http://lcamtuf.coredump.cx/afl/releases/afl-${AFLVERS}.tgz > t
# mv t afl-${AFLVERS}.tgz
#
# fuzz/afl-${AFLVERS}: afl-${AFLVERS}.tgz
# mkdir -p fuzz
# tar -C fuzz -xf $?
#
# fuzz/afl-${AFLVERS}/${AFL}: fuzz/afl-${AFLVERS}
# (cd fuzz/afl-${AFLVERS} ; make)
# touch $@
#
# fuzzyretail: fuzz/afl-${AFLVERS}/${AFL} retail.c
# AFL_HARDEN=1 $? -lz -o fuzzyretail
#
#
# fuzzer: fuzzyretail
# fuzz/afl-${AFLVERS}/afl-fuzz -i fuzz/testcases -o fuzz/findings ./fuzzyretail -o @@ testing/1.log
#
#