-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile.am
78 lines (58 loc) · 2.07 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
AUTOMAKE_OPTIONS = foreign
.PHONY : test mrproper
lib_LTLIBRARIES = lib_mysqludf_preg.la
CFILES= \
preg.c \
preg_utils.c \
ghmysql.c \
ghfcns.c \
from_php.c \
lib_mysqludf_preg_capture.c \
lib_mysqludf_preg_check.c \
lib_mysqludf_preg_info.c \
lib_mysqludf_preg_position.c \
lib_mysqludf_preg_replace.c \
lib_mysqludf_preg_rlike.c
HFILES = \
preg.h \
ghmysql.h \
ghfcns.h \
preg_utils.h \
from_php.h
lib_mysqludf_preg_la_SOURCES = \
$(CFILES) \
$(HFILES)
DLL_OBJS=$(CFILES:%.c=.libs/lib_mysqludf_preg_la-%.o)
SUBDIRS=test doc
DIFFPROGRAM:=kompare -
lib_mysqludf_preg_la_CFLAGS = -DSTANDARD -DMYSQL_SERVER @MYSQL_CFLAGS@ @MYSQL_HEADERS@ @PCRE_CFLAGS@ @GHMYSQL_CFLAGS@ @PTHREAD_CFLAGS@
#lib_mysqludf_preg_la_LDFLAGS = -module -avoid-version -no-undefined @PCRE_LIBS@ @PTHREAD_LIBS@
lib_mysqludf_preg_la_LDFLAGS = -module -avoid-version @PCRE_LIBS@ @PTHREAD_LIBS@
EXTRA_DIST = *.sql
mrproper: clean maintainer-clean
for i in $(SUBDIRS) . ; do ( cd $$i && rm -rf config/config.guess config.h.* config/config.status configure config/missing config/config.sub config/ltmain.sh config/depcomp aclocal.m4 config/install-sh config.log installdb_win.sql config/compile Makefile.in *.tar.gz *.loT config/mkinstalldirs *~); done
mysqlbin:
@if test -z "$(MYSQL)" ; then echo "mysql client app (mysql) not found"; exit 1; fi
installdb_win.sql:installdb.sql
cat installdb.sql | sed 's/\.so/.dll/g' >installdb_win.sql
installdb: uninstalldb installdb_win.sql
if test -f .libs/lib_mysqludf_preg.dll; then \
$(MYSQL) <./installdb_win.sql; \
else \
$(MYSQL) <./installdb.sql;\
fi
uninstalldb: mysqlbin
$(MYSQL) <./uninstalldb.sql
test:
cd test; make test
dist-hook:
rm -rf `find $(distdir) -name .svn`
rm -rf `find $(distdir) -name .git`
rm -rf `find $(distdir) -name .DS_Store`
maintainer-dist:
make dist
git tag "$(PACKAGE)-$(VERSION)"
maintainer-diff:
git diff "$(PACKAGE)-$(DIFFVERSION)" . | $(DIFFPROGRAM)
lib_mysqludf_preg.dll: $(DLL_OBJS)
$(CC) -shared -o lib_mysqludf_preg.dll -Wl,"--strip-all" -Wl,"--export-all-symbols" $(DLL_OBJS) /opt/mingw/pcre/lib/libpcre.a