diff options
| author | Dominik Maier <domenukk@gmail.com> | 2020-02-12 12:00:38 +0100 |
|---|---|---|
| committer | Dominik Maier <domenukk@gmail.com> | 2020-02-12 12:00:38 +0100 |
| commit | 5a114fd840305dff0692ccfb3c3aca0475f9ca8f (patch) | |
| tree | edb9483260e6858617cb90bab1e3c5fd952cff8d /Makefile | |
| parent | 9db58da8b7be0f47209cba3b2d49247e3f1e13cf (diff) | |
| parent | 54bbddec602feef0bd4e3bdc066c50779825d178 (diff) | |
| download | afl++-5a114fd840305dff0692ccfb3c3aca0475f9ca8f.tar.gz | |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile index 5af8444a..ea991cd3 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,9 @@ # For Heiko: #TEST_MMAP=1 +# the hash character is treated differently in different make versions +# so use a variable for '#' +HASH=\# PREFIX ?= /usr/local BIN_PATH = $(PREFIX)/bin @@ -24,7 +27,7 @@ MISC_PATH = $(PREFIX)/share/afl MAN_PATH = $(PREFIX)/man/man8 PROGNAME = afl -VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) +VERSION = $(shell grep '^$(HASH)define VERSION ' ../config.h | cut -d '"' -f2) # PROGS intentionally omit afl-as, which gets installed elsewhere. @@ -127,7 +130,7 @@ endif COMM_HDR = include/alloc-inl.h include/config.h include/debug.h include/types.h -ifeq "$(shell echo '\#include <Python.h>@int main() {return 0; }' | tr @ '\n' | $(CC) -x c - -o .test $(PYTHON_INCLUDE) $(LDFLAGS) $(PYTHON_LIB) 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1" +ifeq "$(shell echo '$(HASH)include <Python.h>@int main() {return 0; }' | tr @ '\n' | $(CC) -x c - -o .test $(PYTHON_INCLUDE) $(LDFLAGS) $(PYTHON_LIB) 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1" PYTHON_OK=1 PYFLAGS=-DUSE_PYTHON $(PYTHON_INCLUDE) $(LDFLAGS) $(PYTHON_LIB) -DPYTHON_VERSION="\"$(PYTHON_VERSION)\"" else @@ -145,7 +148,7 @@ ifdef STATIC LDFLAGS += -lm -lrt -lpthread -lz -lutil endif -ifeq "$(shell echo '\#include <sys/ipc.h>@\#include <sys/shm.h>@int main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, 0); return 0;}' | tr @ '\n' | $(CC) -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1" +ifeq "$(shell echo '$(HASH)include <sys/ipc.h>@$(HASH)include <sys/shm.h>@int main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, 0); return 0;}' | tr @ '\n' | $(CC) -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1" SHMAT_OK=1 else SHMAT_OK=0 |
