aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2019-07-13 08:09:19 +0200
committerHexcoder <heiko@hexco.de>2019-07-13 09:39:51 +0200
commitf45332e1ab1f7b82c38c6fcc3c451fca35d5a9ce (patch)
tree1cb23f960ccb9e4881e5e0979a78bb3c4f803262 /Makefile
parentd9c70c7b8cdcde0827e167c61f60f862bc9a3ba8 (diff)
downloadAFLplusplus-f45332e1ab1f7b82c38c6fcc3c451fca35d5a9ce.tar.gz
portability fix: getcwd(NULL, 0) is a non-POSIX glibc extension. Refactor
detect_file_args() in a separate file in order to avoid multiple copies.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index cb3beb11..7c151f8b 100644
--- a/Makefile
+++ b/Makefile
@@ -131,20 +131,23 @@ afl-as: afl-as.c afl-as.h $(COMM_HDR) | test_x86
$(CC) $(CFLAGS) $@.c -o $@ $(LDFLAGS)
ln -sf afl-as as
+afl-common.o : afl-common.c
+ $(CC) $(CFLAGS) -c afl-common.c
+
sharedmem.o : sharedmem.c
$(CC) $(CFLAGS) -c sharedmem.c
afl-fuzz: afl-fuzz.c sharedmem.o $(COMM_HDR) | test_x86
- $(CC) $(CFLAGS) $@.c sharedmem.o -o $@ $(LDFLAGS) $(PYFLAGS)
+ $(CC) $(CFLAGS) $@.c afl-common.o sharedmem.o -o $@ $(LDFLAGS) $(PYFLAGS)
afl-showmap: afl-showmap.c sharedmem.o $(COMM_HDR) | test_x86
- $(CC) $(CFLAGS) $@.c sharedmem.o -o $@ $(LDFLAGS)
+ $(CC) $(CFLAGS) $@.c afl-common.o sharedmem.o -o $@ $(LDFLAGS)
afl-tmin: afl-tmin.c sharedmem.o $(COMM_HDR) | test_x86
- $(CC) $(CFLAGS) $@.c sharedmem.o -o $@ $(LDFLAGS)
+ $(CC) $(CFLAGS) $@.c afl-common.o sharedmem.o -o $@ $(LDFLAGS)
afl-analyze: afl-analyze.c sharedmem.o $(COMM_HDR) | test_x86
- $(CC) $(CFLAGS) $@.c sharedmem.o -o $@ $(LDFLAGS)
+ $(CC) $(CFLAGS) $@.c afl-common.o sharedmem.o -o $@ $(LDFLAGS)
afl-gotcpu: afl-gotcpu.c $(COMM_HDR) | test_x86
$(CC) $(CFLAGS) $@.c -o $@ $(LDFLAGS)