| OLD | NEW |
| 1 # | 1 # |
| 2 # american fuzzy lop - LLVM instrumentation | 2 # american fuzzy lop - LLVM instrumentation |
| 3 # ----------------------------------------- | 3 # ----------------------------------------- |
| 4 # | 4 # |
| 5 # Written by Laszlo Szekeres <lszekeres@google.com> and | 5 # Written by Laszlo Szekeres <lszekeres@google.com> and |
| 6 # Michal Zalewski <lcamtuf@google.com> | 6 # Michal Zalewski <lcamtuf@google.com> |
| 7 # | 7 # |
| 8 # LLVM integration design comes from Laszlo Szekeres. | 8 # LLVM integration design comes from Laszlo Szekeres. |
| 9 # | 9 # |
| 10 # Copyright 2015, 2016 Google Inc. All rights reserved. | 10 # Copyright 2015, 2016 Google Inc. All rights reserved. |
| 11 # | 11 # |
| 12 # Licensed under the Apache License, Version 2.0 (the "License"); | 12 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 13 # you may not use this file except in compliance with the License. | 13 # you may not use this file except in compliance with the License. |
| 14 # You may obtain a copy of the License at: | 14 # You may obtain a copy of the License at: |
| 15 # | 15 # |
| 16 # http://www.apache.org/licenses/LICENSE-2.0 | 16 # http://www.apache.org/licenses/LICENSE-2.0 |
| 17 # | 17 # |
| 18 | 18 |
| 19 PREFIX ?= /usr/local | 19 PREFIX ?= /usr/local |
| 20 HELPER_PATH = $(PREFIX)/lib/afl | 20 HELPER_PATH = $(PREFIX)/lib/afl |
| 21 BIN_PATH = $(PREFIX)/bin | 21 BIN_PATH = $(PREFIX)/bin |
| 22 | 22 |
| 23 VERSION = $(shell grep ^VERSION ../Makefile | cut -d= -f2 | sed 's/ //') | 23 VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) |
| 24 | 24 |
| 25 LLVM_CONFIG ?= llvm-config | 25 LLVM_CONFIG ?= llvm-config |
| 26 | 26 |
| 27 CFLAGS ?= -O3 -funroll-loops | 27 CFLAGS ?= -O3 -funroll-loops |
| 28 CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \ | 28 CFLAGS += -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign \ |
| 29 -DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \ | 29 -DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \ |
| 30 -DVERSION=\"$(VERSION)\" | 30 -DVERSION=\"$(VERSION)\" |
| 31 ifdef AFL_TRACE_PC | 31 ifdef AFL_TRACE_PC |
| 32 CFLAGS += -DUSE_TRACE_PC=1 | 32 CFLAGS += -DUSE_TRACE_PC=1 |
| 33 endif | 33 endif |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 @echo "[+] All right, the instrumentation seems to be working!" | 103 @echo "[+] All right, the instrumentation seems to be working!" |
| 104 | 104 |
| 105 all_done: test_build | 105 all_done: test_build |
| 106 @echo "[+] All done! You can now use '../afl-clang-fast' to compile prog
rams." | 106 @echo "[+] All done! You can now use '../afl-clang-fast' to compile prog
rams." |
| 107 | 107 |
| 108 .NOTPARALLEL: clean | 108 .NOTPARALLEL: clean |
| 109 | 109 |
| 110 clean: | 110 clean: |
| 111 rm -f *.o *.so *~ a.out core core.[1-9][0-9]* test-instr .test-instr0 .t
est-instr1 | 111 rm -f *.o *.so *~ a.out core core.[1-9][0-9]* test-instr .test-instr0 .t
est-instr1 |
| 112 rm -f $(PROGS) ../afl-clang-fast++ | 112 rm -f $(PROGS) ../afl-clang-fast++ |
| OLD | NEW |