From 94c74c42434c5028029def2206c8b0933f0767c6 Mon Sep 17 00:00:00 2001 From: Dmitry Mikhirev Date: Mon, 1 Dec 2014 16:29:28 +0300 Subject: added ability to build plugin with other versions of make --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..80f5452 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +CFLAGS = -Wall -g +PCRE_CONFIG = pcre-config +#PCRE_CONFIG = pkg-config libpcre +PCRE_CFLAGS := $(shell $(PCRE_CONFIG) --cflags) +PCRE_LIBS := $(shell $(PCRE_CONFIG) --libs) +LIBS = $(PCRE_LIBS) + +pcre.so: pcre.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(MAKE_CFLAGS) -fPIC \ + $(LDFLAGS) -shared -o $@ $< $(LIBS) + +check: + @if [ -n "`which $(GNUMAKE4)`" ] ; then \ + $(GNUMAKE4) -k -f tests.mk ; \ + else \ + echo 'you need GNU make 4.x to run tests' ; \ + return 1 ; \ + fi + +clean: + $(RM) *.o *.so -- cgit v1.2.1