aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDmitry Mikhirev2014-12-01 16:29:28 +0300
committerDmitry Mikhirev2014-12-01 16:29:28 +0300
commit94c74c42434c5028029def2206c8b0933f0767c6 (patch)
treee4d47d12944b53b2a596437badbe2f64c25cddd8 /Makefile
parent77fab23504bea4948e7c81f21050629ec0e05588 (diff)
downloadmake_pcre-94c74c42434c5028029def2206c8b0933f0767c6.tar.gz
make_pcre-94c74c42434c5028029def2206c8b0933f0767c6.tar.bz2
make_pcre-94c74c42434c5028029def2206c8b0933f0767c6.tar.xz
make_pcre-94c74c42434c5028029def2206c8b0933f0767c6.zip
added ability to build plugin with other versions of make
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
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