about summary refs log tree commit diff
path: root/unicorn_mode/samples/c
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-04-02 12:24:39 +0200
committervan Hauser <vh@thc.org>2020-04-09 10:23:37 +0200
commit7f817fe5832c2159d8eb782e79dc08a30fcd5d68 (patch)
treef2ca58837578975dfe42bc8677260af6368e2fa9 /unicorn_mode/samples/c
parent5e66d95fbd88d422393046ae095de51c37c6f632 (diff)
downloadafl++-7f817fe5832c2159d8eb782e79dc08a30fcd5d68.tar.gz
rename all 'Makefile' to 'GNUmakefile', use -Werror for -flto checks
Diffstat (limited to 'unicorn_mode/samples/c')
-rw-r--r--unicorn_mode/samples/c/GNUmakefile42
-rw-r--r--unicorn_mode/samples/c/Makefile44
2 files changed, 44 insertions, 42 deletions
diff --git a/unicorn_mode/samples/c/GNUmakefile b/unicorn_mode/samples/c/GNUmakefile
new file mode 100644
index 00000000..fe100490
--- /dev/null
+++ b/unicorn_mode/samples/c/GNUmakefile
@@ -0,0 +1,42 @@
+# UnicornAFL Usage
+# Original Unicorn Example Makefile by Nguyen Anh Quynh <aquynh@gmail.com>, 2015
+# Adapted for AFL++ by domenukk <domenukk@gmail.com>, 2020
+
+UNAME_S := $(shell uname -s)
+
+LIBDIR = ../../unicornafl
+BIN_EXT =
+AR_EXT = a
+
+# Verbose output?
+V ?= 0
+
+CFLAGS += -Wall -Werror -I../../unicornafl/include
+
+LDFLAGS += -L$(LIBDIR) -lpthread -lm
+ifeq ($(UNAME_S), Linux)
+LDFLAGS += -lrt
+endif
+
+ifneq ($(CROSS),)
+CC = $(CROSS)gcc
+endif
+
+.PHONY: all clean
+
+all: harness
+
+clean:		
+	rm -rf *.o harness harness-debug
+
+harness.o: harness.c ../../unicornafl/include/unicorn/*.h
+	${CC} ${CFLAGS} -O3 -c $<
+
+harness-debug.o: harness.c ../../unicornafl/include/unicorn/*.h
+	${CC} ${CFLAGS} -g -c $< -o $@
+
+harness: harness.o
+	${CC} -L${LIBDIR} $< ../../unicornafl/libunicornafl.a $(LDFLAGS) -o $@
+
+debug: harness-debug.o
+	${CC} -L${LIBDIR} $< ../../unicornafl/libunicornafl.a $(LDFLAGS) -o harness-debug
diff --git a/unicorn_mode/samples/c/Makefile b/unicorn_mode/samples/c/Makefile
index fe100490..0b306dde 100644
--- a/unicorn_mode/samples/c/Makefile
+++ b/unicorn_mode/samples/c/Makefile
@@ -1,42 +1,2 @@
-# UnicornAFL Usage
-# Original Unicorn Example Makefile by Nguyen Anh Quynh <aquynh@gmail.com>, 2015
-# Adapted for AFL++ by domenukk <domenukk@gmail.com>, 2020
-
-UNAME_S := $(shell uname -s)
-
-LIBDIR = ../../unicornafl
-BIN_EXT =
-AR_EXT = a
-
-# Verbose output?
-V ?= 0
-
-CFLAGS += -Wall -Werror -I../../unicornafl/include
-
-LDFLAGS += -L$(LIBDIR) -lpthread -lm
-ifeq ($(UNAME_S), Linux)
-LDFLAGS += -lrt
-endif
-
-ifneq ($(CROSS),)
-CC = $(CROSS)gcc
-endif
-
-.PHONY: all clean
-
-all: harness
-
-clean:		
-	rm -rf *.o harness harness-debug
-
-harness.o: harness.c ../../unicornafl/include/unicorn/*.h
-	${CC} ${CFLAGS} -O3 -c $<
-
-harness-debug.o: harness.c ../../unicornafl/include/unicorn/*.h
-	${CC} ${CFLAGS} -g -c $< -o $@
-
-harness: harness.o
-	${CC} -L${LIBDIR} $< ../../unicornafl/libunicornafl.a $(LDFLAGS) -o $@
-
-debug: harness-debug.o
-	${CC} -L${LIBDIR} $< ../../unicornafl/libunicornafl.a $(LDFLAGS) -o harness-debug
+all:
+	@echo please use GNU make, thanks!