-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile.am
126 lines (98 loc) · 3.96 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Copyright (C) Tildeslash Ltd. All rights reserved.
AUTOMAKE_OPTIONS = foreign no-dependencies subdir-objects
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = . $(UNIT_TEST)
DIST_SUBDIRS = . test
EXTRA_DIST = README AUTHORS CHANGES COPYING bootstrap doc test src tools config
LIBRARY_NAME = zdb
RE2C = @RE2C@
RE2CFLAGS = -b
FILTERH = ./tools/bin/filterh
AM_CPPFLAGS = $(CPPFLAGS) $(DBCPPFLAGS)
AM_CPPFLAGS += -Isrc -Isrc/util -Isrc/net -Isrc/db -Isrc/exceptions
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(LIBRARY_NAME).pc
lib_LTLIBRARIES = libzdb.la
libzdb_la_SOURCES = src/util/Str.c src/util/Vector.c src/util/StringBuffer.c \
src/system/Mem.c src/system/System.c src/system/Time.c \
src/db/ConnectionPool.c src/db/Connection.c src/db/ResultSet.c \
src/db/PreparedStatement.c \
src/exceptions/assert.c src/exceptions/Exception.c
if ! WITH_ZILD
libzdb_la_SOURCES += src/net/URL.c
endif
if WITH_MYSQL
libzdb_la_SOURCES += src/db/mysql/MysqlConnection.c \
src/db/mysql/MysqlResultSet.c \
src/db/mysql/MysqlPreparedStatement.c
endif
if WITH_POSTGRESQL
libzdb_la_SOURCES += src/db/postgresql/PostgresqlConnection.c \
src/db/postgresql/PostgresqlResultSet.c \
src/db/postgresql/PostgresqlPreparedStatement.c
endif
if WITH_SQLITE
libzdb_la_SOURCES += src/db/sqlite/SQLiteConnection.c \
src/db/sqlite/SQLiteResultSet.c \
src/db/sqlite/SQLitePreparedStatement.c
endif
if WITH_ORACLE
libzdb_la_SOURCES += src/db/oracle/OracleConnection.c \
src/db/oracle/OracleResultSet.c \
src/db/oracle/OraclePreparedStatement.c
endif
API_INTERFACES = src/zdb.h src/db/ConnectionPool.h src/db/Connection.h \
src/db/ResultSet.h src/net/URL.h src/db/PreparedStatement.h \
src/exceptions/SQLException.h src/exceptions/Exception.h
nobase_nodist_include_HEADERS = $(patsubst %, $(LIBRARY_NAME)/%, $(notdir $(API_INTERFACES)))
libzdb_la_LDFLAGS = $(DBLDFLAGS) -version-info 9:2:0
BUILT_SOURCES = $(nobase_nodist_include_HEADERS)
CLEANFILES = $(BUILT_SOURCES)
DISTCLEANFILES = *~
dist-hook::
-rm -rf `find $(distdir) -name CVS`
-rm -rf `find $(distdir) -name "._*"`
-rm -rf `find $(distdir) -name ".DS_Store"`
-rm -rf `find $(distdir) -name ".libs"`
-rm -rf `find $(distdir) -name ".svn"`
-rm -f $(distdir)/src/xconfig.h $(distdir)/src/stamp-* \
$(distdir)/tools/bin/filterh
clean-local:
-rm -f `find src -name "*.o" -o -name "*.lo" -o -name "*.loT" \
-o -name "*~" -o -name ".#*" -o -name "core*"`
distclean-local:
-rm -rf autom4te.cache/ \
build/ \
$(LIBRARY_NAME)
-rm -f doc/api-docs/*h.html \
doc/api-docs/doxygen.css \
doc/api-docs/tabs.css \
doc/api-docs/*.gif \
tools/bin/filterh \
src/xconfig.h.in \
config/config.guess \
config/config.sub
cleanall: clean distclean
-rm -f Makefile.in test/Makefile.in configure aclocal.m4 \
libzdb-[0-9].*tar.gz conf/config.* $(pkgconfig_DATA)
verify: libzdb.la
cd $(srcdir)/test && $(MAKE) verify
doc: $(nobase_nodist_include_HEADERS)
doxygen config/Doxyfile
-cp doc/api-docs/files.html doc/api-docs/index.html
define check-exit
|| exit 1
endef
$(nobase_nodist_include_HEADERS): $(API_INTERFACES)
$(shell test -d $(LIBRARY_NAME) || mkdir $(LIBRARY_NAME))
$(foreach file, $(API_INTERFACES), \
$(FILTERH) < $(file) > $(LIBRARY_NAME)/$(notdir $(file)) \
$(check-exit))
#<< start-filter out
src/net/URL.c: src/net/URL.re
$(RE2C) $(RE2CFLAGS) $< > $@
dist-hook::
-rm -f $(distdir)/src/net/URL.re
$(FILTERH) < Makefile.am > $(distdir)/Makefile.am
$(FILTERH) < Makefile.in > $(distdir)/Makefile.in
#>> end-filter out