about summary refs log tree commit diff
path: root/gcc_plugin
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-03-18 17:26:21 +0100
committerhexcoder- <heiko@hexco.de>2020-03-18 17:26:21 +0100
commita5e747af14ee89ea7d8f98f782df96d02ee68063 (patch)
tree87b61cd6ff53b00d06c5af55b87364ae05fe3a80 /gcc_plugin
parent50608615459b65eb9f9348a3dfd8fe257bb9deff (diff)
downloadafl++-a5e747af14ee89ea7d8f98f782df96d02ee68063.tar.gz
rework docs installation
Diffstat (limited to 'gcc_plugin')
-rw-r--r--gcc_plugin/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc_plugin/Makefile b/gcc_plugin/Makefile
index 6e8821e1..37485d0b 100644
--- a/gcc_plugin/Makefile
+++ b/gcc_plugin/Makefile
@@ -21,8 +21,10 @@
 #
 
 PREFIX      ?= /usr/local
-HELPER_PATH  = $(PREFIX)/lib/afl
-BIN_PATH     = $(PREFIX)/bin
+HELPER_PATH ?= $(PREFIX)/lib/afl
+BIN_PATH    ?= $(PREFIX)/bin
+DOC_PATH    ?= $(PREFIX)/share/doc/afl
+MAN_PATH    ?= $(PREFIX)/man/man8
 
 VERSION     = $(shell grep '^$(HASH)define VERSION ' ../config.h | cut -d '"' -f2)
 
@@ -137,6 +139,12 @@ vpath  % ..
 	@echo Apache License Version 2.0, January 2004 >> ../$@
 	ln -sf afl-gcc-fast.8 ../afl-g++-fast.8
 
+install: all
+	install -m 755 ../afl-gcc-fast $${DESTDIR}$(BIN_PATH)
+	install -m 755 ../afl-gcc-pass.so ../afl-gcc-rt.o $${DESTDIR}$(HELPER_PATH)
+	install -m 644 -T README.md $${DESTDIR}$(DOC_PATH)/README.gcc_plugin.md
+	install -m 644 -T README.whitelist.md $${DESTDIR}$(DOC_PATH)/README.gcc_plugin_whitelist.md
+
 clean:
 	rm -f *.o *.so *~ a.out core core.[1-9][0-9]* test-instr .test-instr0 .test-instr1 .test2
 	rm -f $(PROGS) afl-common.o ../afl-g++-fast ../afl-g*-fast.8