-
Notifications
You must be signed in to change notification settings - Fork 103
/
Makefile.am
204 lines (170 loc) · 6.72 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#
# Copyright 2010 Couchbase, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Automake file used to build libcouchbase. Please avoid using propritary
# make constructs, but keep the syntax portable. To reduce the posibility
# for merge conflicts all list of files should be sorted aphabetically
# (If everyone always add their files to the end of the list that line will
# always result in a conflict..)
#
# @author Trond Norbye
#
ACLOCAL_AMFLAGS = -I m4 --force
lib_LTLIBRARIES = libcouchbase.la libcouchbase_libevent.la
noinst_LTLIBRARIES =
pkginclude_HEADERS = \
include/libcouchbase/callbacks.h \
include/libcouchbase/configuration.h \
include/libcouchbase/couchbase.h \
include/libcouchbase/libevent_io_opts.h \
include/libcouchbase/tap_filter.h \
include/libcouchbase/timings.h \
include/libcouchbase/types.h \
include/libcouchbase/visibility.h \
include/libcouchbase/winsock_io_opts.h
libcouchbase_la_SOURCES = \
src/arithmetic.c \
src/base64.c \
src/config_static.h \
src/cookie.c \
src/error.c \
src/event.c \
src/flush.c \
src/get.c \
src/handler.c \
src/instance.c \
src/internal.h \
src/iofactory.c \
src/packet.c \
src/remove.c \
src/ringbuffer.c \
src/ringbuffer.h \
src/server.c \
src/stats.c \
src/store.c \
src/strerror.c \
src/tap.c \
src/timings.c \
src/touch.c \
src/utilities.c \
src/wait.c
if !HAVE_GETHRTIME
libcouchbase_la_SOURCES += src/gethrtime.c
endif
if HAVE_LIBEVENT2
libcouchbase_la_SOURCES += src/views.c
endif
# Please remember to update the version info before each release if you
# add / remove functions.
libcouchbase_la_LDFLAGS=-version-info 0:0:0
libcouchbase_la_CPPFLAGS=$(AM_CPPFLAGS) $(CPPFLAGS) -DLIBCOUCHBASE_INTERNAL=1
libcouchbase_la_LIBADD=-lvbucket $(LIBSASL)
libcouchbase_libevent_la_SOURCES = src/plugin-libevent.c
libcouchbase_libevent_la_LDFLAGS=-version-info 1:0:0
libcouchbase_libevent_la_LIBADD=-levent
libcouchbase_libevent_la_CPPFLAGS=$(AM_CPPFLAGS) $(CPPFLAGS) -DLIBCOUCHBASE_INTERNAL=1
tests/CouchbaseMock.jar:
@echo "+---------------------------------------------+"
@echo "| Download CouchbaseMock for functional tests |"
@echo "+---------------------------------------------+"
${WGET} -nv http://files.couchbase.com/maven2/org/couchbase/mock/CouchbaseMock/0.5-SNAPSHOT/CouchbaseMock-0.5-20111128.191335-3.jar
mv CouchbaseMock-0.5-20111128.191335-3.jar tests/CouchbaseMock.jar
libmockserver_la_DEPENDENCIES = tests/CouchbaseMock.jar
libmockserver_la_SOURCES = \
tests/server.c tests/server.h
#
# Example programs using the library
#
noinst_PROGRAMS = \
example/memcat \
example/memcp \
example/memdump \
example/memflush \
example/memrm \
example/memstat
if HAVE_LIBEVENT2
noinst_PROGRAMS += example/couchview
if HAVE_LIBYAJL
noinst_PROGRAMS += example/couchview_yajl
endif
endif
example_memcat_SOURCES = example/memcat.c
example_memcat_LDADD = libcouchbase.la
example_memcat_LDFLAGS = -levent
example_memcp_SOURCES = example/memcp.c
example_memcp_LDADD = libcouchbase.la
example_memcp_LDFLAGS = -levent
example_memdump_SOURCES = example/memdump.c
example_memdump_LDADD = libcouchbase.la
example_memdump_LDFLAGS = -levent
example_memflush_SOURCES = example/memflush.c
example_memflush_LDADD = libcouchbase.la
example_memflush_LDFLAGS = -levent
example_memrm_SOURCES = example/memrm.c
example_memrm_LDADD = libcouchbase.la
example_memrm_LDFLAGS = -levent
example_memstat_SOURCES = example/memstat.c
example_memstat_LDADD = libcouchbase.la
example_memstat_LDFLAGS = -levent
example_couchview_SOURCES = example/couchview.c
example_couchview_LDADD = libcouchbase.la
example_couchview_LDFLAGS = -levent
example_couchview_yajl_SOURCES = example/couchview_yajl.c
example_couchview_yajl_LDADD = libcouchbase.la
example_couchview_yajl_LDFLAGS = -levent -lyajl
check_PROGRAMS = base64-test \
getopt-test \
ringbuffer-test \
strerror-test
if HAVE_COUCHBASEMOCK
noinst_LTLIBRARIES += libmockserver.la
check_PROGRAMS += arithmetic-test \
flags-test \
timings-test \
config-test \
smoke-test
endif
base64_test_SOURCES = tests/base64-test.c src/base64.c
getopt_test_SOURCES = tests/getopt-test.cc
config_test_SOURCES = tests/test.h tests/config-test.c
config_test_LDADD = libcouchbase.la libmockserver.la
config_test_LDFLAGS = -ldl -levent -lvbucket
ringbuffer_test_SOURCES = tests/ringbuffer-test.c src/ringbuffer.c
timings_test_SOURCES = tests/timings-test.c
timings_test_LDADD = libcouchbase.la libmockserver.la
timings_test_LDFLAGS = -levent
smoke_test_SOURCES = tests/test.h tests/smoke-test.c
smoke_test_LDADD = libcouchbase.la libmockserver.la
smoke_test_LDFLAGS = -levent
strerror_test_SOURCES = tests/strerror-test.c
strerror_test_LDADD = ${libcouchbase_la_OBJECTS} -levent -lvbucket $(LIBSASL)
arithmetic_test_SOURCES = tests/arithmetic.c
arithmetic_test_LDADD = libcouchbase.la libmockserver.la
arithmetic_test_LDFLAGS = -levent
arithmetic_test_CPPFLAGS=$(AM_CPPFLAGS) $(CPPFLAGS) -Itests
flags_test_SOURCES = tests/flags-test.c
flags_test_LDADD = libcouchbase.la libmockserver.la
flags_test_LDFLAGS = -levent
flags_test_CPPFLAGS=$(AM_CPPFLAGS) $(CPPFLAGS) -Itests
TESTS=${check_PROGRAMS}
EXTRA_DIST = \
LICENSE \
NMakefile \
include/libcouchbase/configuration.h.in \
src/iofactory_win32.c \
tests/start_mock.sh \
win32
sinclude packaging/*/package.mk