[mod_maxminddb] MaxMind GeoIP2 support
[lighttpd.git] / src / Makefile.am
blobac50f9c8141827c21a4b74529d6ea811541a8f46
1 AM_CFLAGS = $(FAM_CFLAGS) $(LIBUNWIND_CFLAGS)
3 noinst_PROGRAMS=\
4         t/test_array \
5         t/test_buffer \
6         t/test_burl \
7         t/test_base64 \
8         t/test_configfile \
9         t/test_keyvalue \
10         t/test_mod_access \
11         t/test_mod_evhost \
12         t/test_mod_simple_vhost \
13         t/test_request
15 sbin_PROGRAMS=lighttpd lighttpd-angel
16 LEMON=$(top_builddir)/src/lemon$(BUILD_EXEEXT)
18 TESTS=\
19         t/test_array$(EXEEXT) \
20         t/test_buffer$(EXEEXT) \
21         t/test_burl$(EXEEXT) \
22         t/test_base64$(EXEEXT) \
23         t/test_configfile$(EXEEXT) \
24         t/test_keyvalue$(EXEEXT) \
25         t/test_mod_access$(EXEEXT) \
26         t/test_mod_evhost$(EXEEXT) \
27         t/test_mod_simple_vhost$(EXEEXT) \
28         t/test_request$(EXEEXT)
30 lemon$(BUILD_EXEEXT): lemon.c
31         $(AM_V_CC)$(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $(srcdir)/lemon.c
33 lighttpd_angel_SOURCES=lighttpd-angel.c
35 .PHONY: versionstamp parsers
37 versionstamp:
38         @test -f versionstamp.h || touch versionstamp.h; \
39         REVISION=""; \
40         if test -d "$(top_srcdir)/.svn" -a -x "`which svnversion`"; then \
41                 REVISION="$$(LANG= LC_ALL=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)"; \
42                 if test "$$REVISION" = "exported"; then \
43                         REVISION=""; \
44                 fi; \
45         fi; \
46         if test -z "$$REVISION" -a -d "$(top_srcdir)/.git" -a -x "`which git`"; then \
47                 REVISION="$$(cd "$(top_srcdir)"; LANG= LC_ALL=C git describe --always 2>/dev/null || echo)"; \
48         fi; \
49         if test -n "$$REVISION"; then \
50                 echo "#define REPO_VERSION \"-devel-$$REVISION\"" > versionstamp.h.tmp; \
51         else \
52                 echo "#define REPO_VERSION \"\"" > versionstamp.h.tmp; \
53         fi; \
54         if ! diff versionstamp.h.tmp versionstamp.h >/dev/null 2>/dev/null; then \
55                 mv versionstamp.h.tmp versionstamp.h; \
56         else \
57                 rm versionstamp.h.tmp; \
58         fi
60 configparser.h: configparser.c
61 configparser.c: $(srcdir)/configparser.y $(srcdir)/lempar.c lemon$(BUILD_EXEEXT)
62         rm -f configparser.h
63         $(LEMON) -q $(srcdir)/configparser.y $(srcdir)/lempar.c
65 mod_ssi_exprparser.h: mod_ssi_exprparser.c
66 mod_ssi_exprparser.c: $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c lemon$(BUILD_EXEEXT)
67         rm -f mod_ssi_exprparser.h
68         $(LEMON) -q $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c
70 parsers: configparser.c mod_ssi_exprparser.c
72 BUILT_SOURCES = parsers versionstamp
73 MAINTAINERCLEANFILES = configparser.c configparser.h mod_ssi_exprparser.c mod_ssi_exprparser.h
74 CLEANFILES = versionstamp.h versionstamp.h.tmp lemon$(BUILD_EXEEXT)
76 common_src=base64.c buffer.c burl.c log.c \
77         http_header.c http_kv.c keyvalue.c chunk.c  \
78         http_chunk.c stream.c fdevent.c gw_backend.c \
79         stat_cache.c plugin.c joblist.c etag.c array.c \
80         data_string.c data_array.c \
81         data_integer.c algo_sha1.c md5.c \
82         vector.c \
83         fdevent_select.c fdevent_libev.c \
84         fdevent_poll.c fdevent_linux_sysepoll.c \
85         fdevent_solaris_devpoll.c fdevent_solaris_port.c \
86         fdevent_freebsd_kqueue.c \
87         data_config.c \
88         crc32.c \
89         connections-glue.c \
90         configfile-glue.c \
91         http-header-glue.c \
92         http_auth.c \
93         http_vhostdb.c \
94         rand.c \
95         request.c \
96         sock_addr.c \
97         splaytree.c \
98         safe_memclear.c
100 src = server.c response.c connections.c \
101         inet_ntop_cache.c \
102         network.c \
103         network_write.c \
104         configfile.c configparser.c
106 lib_LTLIBRARIES =
108 if NO_RDYNAMIC
109 # if the linker doesn't allow referencing symbols of the binary
110 # we have to put everything into a shared-lib and link it into
111 # everything
112 common_ldflags = -avoid-version -no-undefined
113 lib_LTLIBRARIES += liblightcomp.la
114 liblightcomp_la_SOURCES=$(common_src)
115 liblightcomp_la_CFLAGS=$(AM_CFLAGS) $(LIBEV_CFLAGS)
116 liblightcomp_la_LDFLAGS = $(common_ldflags)
117 liblightcomp_la_LIBADD = $(PCRE_LIB) $(CRYPTO_LIB) $(FAM_LIBS) $(LIBEV_LIBS) $(ATTR_LIB)
118 common_libadd = liblightcomp.la
119 else
120 src += $(common_src)
121 common_ldflags = -avoid-version
122 common_libadd =
123 endif
124 common_module_ldflags = -module -export-dynamic $(common_ldflags)
126 lib_LTLIBRARIES += mod_flv_streaming.la
127 mod_flv_streaming_la_SOURCES = mod_flv_streaming.c
128 mod_flv_streaming_la_LDFLAGS = $(common_module_ldflags)
129 mod_flv_streaming_la_LIBADD = $(common_libadd)
131 if BUILD_WITH_GEOIP
132 lib_LTLIBRARIES += mod_geoip.la
133 mod_geoip_la_SOURCES = mod_geoip.c
134 mod_geoip_la_LDFLAGS = $(common_module_ldflags)
135 mod_geoip_la_LIBADD = $(common_libadd) $(GEOIP_LIB)
136 endif
138 if BUILD_WITH_MAXMINDDB
139 lib_LTLIBRARIES += mod_maxminddb.la
140 mod_maxminddb_la_SOURCES = mod_maxminddb.c
141 mod_maxminddb_la_LDFLAGS = $(common_module_ldflags)
142 mod_maxminddb_la_LIBADD = $(common_libadd) $(MAXMINDDB_LIB)
143 endif
145 lib_LTLIBRARIES += mod_evasive.la
146 mod_evasive_la_SOURCES = mod_evasive.c
147 mod_evasive_la_LDFLAGS = $(common_module_ldflags)
148 mod_evasive_la_LIBADD = $(common_libadd)
150 lib_LTLIBRARIES += mod_webdav.la
151 mod_webdav_la_SOURCES = mod_webdav.c
152 mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS) 
153 mod_webdav_la_LDFLAGS = $(common_module_ldflags)
154 mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) $(ELFTC_LIB)
156 if BUILD_WITH_LUA
157 lib_LTLIBRARIES += mod_magnet.la
158 mod_magnet_la_SOURCES = mod_magnet.c mod_magnet_cache.c
159 mod_magnet_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS)
160 mod_magnet_la_LDFLAGS = $(common_module_ldflags)
161 mod_magnet_la_LIBADD = $(common_libadd) $(LUA_LIBS) -lm
162 endif
164 if BUILD_WITH_LUA
165 lib_LTLIBRARIES += mod_cml.la
166 mod_cml_la_SOURCES = mod_cml.c mod_cml_lua.c mod_cml_funcs.c
167 mod_cml_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS)
168 mod_cml_la_LDFLAGS = $(common_module_ldflags)
169 mod_cml_la_LIBADD = $(MEMCACHED_LIB) $(common_libadd) $(LUA_LIBS) -lm
170 endif
172 if BUILD_MOD_TRIGGER_B4_DL
173 lib_LTLIBRARIES += mod_trigger_b4_dl.la
174 mod_trigger_b4_dl_la_SOURCES = mod_trigger_b4_dl.c
175 mod_trigger_b4_dl_la_LDFLAGS = $(common_module_ldflags)
176 mod_trigger_b4_dl_la_LIBADD = $(GDBM_LIB) $(MEMCACHED_LIB) $(PCRE_LIB) $(common_libadd)
177 endif
179 lib_LTLIBRARIES += mod_vhostdb.la
180 mod_vhostdb_la_SOURCES = mod_vhostdb.c
181 mod_vhostdb_la_LDFLAGS = $(common_module_ldflags)
182 mod_vhostdb_la_LIBADD = $(common_libadd)
184 if BUILD_WITH_LDAP
185 lib_LTLIBRARIES += mod_vhostdb_ldap.la
186 mod_vhostdb_ldap_la_SOURCES = mod_vhostdb_ldap.c
187 mod_vhostdb_ldap_la_LDFLAGS = $(common_module_ldflags)
188 mod_vhostdb_ldap_la_LIBADD = $(LDAP_LIB) $(LBER_LIB) $(common_libadd)
189 endif
191 if BUILD_WITH_MYSQL
192 lib_LTLIBRARIES += mod_mysql_vhost.la
193 mod_mysql_vhost_la_SOURCES = mod_mysql_vhost.c
194 mod_mysql_vhost_la_LDFLAGS = $(common_module_ldflags)
195 mod_mysql_vhost_la_LIBADD = $(MYSQL_LIBS) $(common_libadd)
196 mod_mysql_vhost_la_CPPFLAGS = $(MYSQL_CFLAGS)
197 endif
199 if BUILD_WITH_MYSQL
200 lib_LTLIBRARIES += mod_vhostdb_mysql.la
201 mod_vhostdb_mysql_la_SOURCES = mod_vhostdb_mysql.c
202 mod_vhostdb_mysql_la_LDFLAGS = $(common_module_ldflags)
203 mod_vhostdb_mysql_la_LIBADD = $(MYSQL_LIBS) $(common_libadd)
204 mod_vhostdb_mysql_la_CPPFLAGS = $(MYSQL_CFLAGS)
205 endif
207 if BUILD_WITH_PGSQL
208 lib_LTLIBRARIES += mod_vhostdb_pgsql.la
209 mod_vhostdb_pgsql_la_SOURCES = mod_vhostdb_pgsql.c
210 mod_vhostdb_pgsql_la_LDFLAGS = $(common_module_ldflags)
211 mod_vhostdb_pgsql_la_LIBADD = $(PGSQL_LIBS) $(common_libadd)
212 mod_vhostdb_pgsql_la_CPPFLAGS = $(PGSQL_INCLUDE)
213 endif
215 if BUILD_WITH_DBI
216 lib_LTLIBRARIES += mod_vhostdb_dbi.la
217 mod_vhostdb_dbi_la_SOURCES = mod_vhostdb_dbi.c
218 mod_vhostdb_dbi_la_LDFLAGS = $(common_module_ldflags)
219 mod_vhostdb_dbi_la_LIBADD = $(DBI_LIBS) $(common_libadd)
220 mod_vhostdb_dbi_la_CPPFLAGS = $(DBI_CFLAGS)
221 endif
223 lib_LTLIBRARIES += mod_cgi.la
224 mod_cgi_la_SOURCES = mod_cgi.c
225 mod_cgi_la_LDFLAGS = $(common_module_ldflags)
226 mod_cgi_la_LIBADD = $(common_libadd)
228 lib_LTLIBRARIES += mod_scgi.la
229 mod_scgi_la_SOURCES = mod_scgi.c
230 mod_scgi_la_LDFLAGS = $(common_module_ldflags)
231 mod_scgi_la_LIBADD = $(common_libadd)
233 lib_LTLIBRARIES += mod_staticfile.la
234 mod_staticfile_la_SOURCES = mod_staticfile.c
235 mod_staticfile_la_LDFLAGS = $(common_module_ldflags)
236 mod_staticfile_la_LIBADD = $(common_libadd)
238 lib_LTLIBRARIES += mod_dirlisting.la
239 mod_dirlisting_la_SOURCES = mod_dirlisting.c
240 mod_dirlisting_la_LDFLAGS = $(common_module_ldflags)
241 mod_dirlisting_la_LIBADD = $(common_libadd) $(PCRE_LIB)
243 lib_LTLIBRARIES += mod_indexfile.la
244 mod_indexfile_la_SOURCES = mod_indexfile.c
245 mod_indexfile_la_LDFLAGS = $(common_module_ldflags)
246 mod_indexfile_la_LIBADD = $(common_libadd)
248 lib_LTLIBRARIES += mod_setenv.la
249 mod_setenv_la_SOURCES = mod_setenv.c
250 mod_setenv_la_LDFLAGS = $(common_module_ldflags)
251 mod_setenv_la_LIBADD = $(common_libadd)
253 lib_LTLIBRARIES += mod_alias.la
254 mod_alias_la_SOURCES = mod_alias.c
255 mod_alias_la_LDFLAGS = $(common_module_ldflags)
256 mod_alias_la_LIBADD = $(common_libadd)
258 lib_LTLIBRARIES += mod_userdir.la
259 mod_userdir_la_SOURCES = mod_userdir.c
260 mod_userdir_la_LDFLAGS = $(common_module_ldflags)
261 mod_userdir_la_LIBADD = $(common_libadd)
263 lib_LTLIBRARIES += mod_rrdtool.la
264 mod_rrdtool_la_SOURCES = mod_rrdtool.c
265 mod_rrdtool_la_LDFLAGS = $(common_module_ldflags)
266 mod_rrdtool_la_LIBADD = $(common_libadd)
268 lib_LTLIBRARIES += mod_usertrack.la
269 mod_usertrack_la_SOURCES = mod_usertrack.c
270 mod_usertrack_la_LDFLAGS = $(common_module_ldflags)
271 mod_usertrack_la_LIBADD = $(common_libadd)
273 lib_LTLIBRARIES += mod_proxy.la
274 mod_proxy_la_SOURCES = mod_proxy.c
275 mod_proxy_la_LDFLAGS = $(common_module_ldflags)
276 mod_proxy_la_LIBADD = $(common_libadd)
278 lib_LTLIBRARIES += mod_sockproxy.la
279 mod_sockproxy_la_SOURCES = mod_sockproxy.c
280 mod_sockproxy_la_LDFLAGS = $(common_module_ldflags)
281 mod_sockproxy_la_LIBADD = $(common_libadd)
283 lib_LTLIBRARIES += mod_ssi.la
284 mod_ssi_la_SOURCES = mod_ssi_exprparser.c mod_ssi_expr.c mod_ssi.c
285 mod_ssi_la_LDFLAGS = $(common_module_ldflags)
286 mod_ssi_la_LIBADD = $(common_libadd)
288 lib_LTLIBRARIES += mod_secdownload.la
289 mod_secdownload_la_SOURCES = mod_secdownload.c
290 mod_secdownload_la_LDFLAGS = $(common_module_ldflags)
291 mod_secdownload_la_LIBADD = $(common_libadd) $(CRYPTO_LIB)
293 #lib_LTLIBRARIES += mod_httptls.la
294 #mod_httptls_la_SOURCES = mod_httptls.c
295 #mod_httptls_la_LDFLAGS = $(common_module_ldflags)
296 #mod_httptls_la_LIBADD = $(common_libadd)
298 lib_LTLIBRARIES += mod_expire.la
299 mod_expire_la_SOURCES = mod_expire.c
300 mod_expire_la_LDFLAGS = $(common_module_ldflags)
301 mod_expire_la_LIBADD = $(common_libadd)
303 lib_LTLIBRARIES += mod_evhost.la
304 mod_evhost_la_SOURCES = mod_evhost.c
305 mod_evhost_la_LDFLAGS = $(common_module_ldflags)
306 mod_evhost_la_LIBADD = $(common_libadd)
308 lib_LTLIBRARIES += mod_simple_vhost.la
309 mod_simple_vhost_la_SOURCES = mod_simple_vhost.c
310 mod_simple_vhost_la_LDFLAGS = $(common_module_ldflags)
311 mod_simple_vhost_la_LIBADD = $(common_libadd)
313 lib_LTLIBRARIES += mod_fastcgi.la
314 mod_fastcgi_la_SOURCES = mod_fastcgi.c
315 mod_fastcgi_la_LDFLAGS = $(common_module_ldflags)
316 mod_fastcgi_la_LIBADD = $(common_libadd)
318 lib_LTLIBRARIES += mod_extforward.la
319 mod_extforward_la_SOURCES = mod_extforward.c
320 mod_extforward_la_LDFLAGS = $(common_module_ldflags)
321 mod_extforward_la_LIBADD = $(common_libadd)
323 lib_LTLIBRARIES += mod_access.la
324 mod_access_la_SOURCES = mod_access.c
325 mod_access_la_LDFLAGS = $(common_module_ldflags)
326 mod_access_la_LIBADD = $(common_libadd)
328 lib_LTLIBRARIES += mod_compress.la
329 mod_compress_la_SOURCES = mod_compress.c
330 mod_compress_la_LDFLAGS = $(common_module_ldflags)
331 mod_compress_la_LIBADD = $(Z_LIB) $(BZ_LIB) $(common_libadd)
333 lib_LTLIBRARIES += mod_deflate.la
334 mod_deflate_la_SOURCES = mod_deflate.c
335 mod_deflate_la_LDFLAGS = $(common_module_ldflags)
336 mod_deflate_la_LIBADD = $(Z_LIB) $(BZ_LIB) $(common_libadd)
338 lib_LTLIBRARIES += mod_auth.la
339 mod_auth_la_SOURCES = mod_auth.c
340 mod_auth_la_LDFLAGS = $(common_module_ldflags)
341 mod_auth_la_LIBADD = $(CRYPTO_LIB) $(common_libadd)
343 lib_LTLIBRARIES += mod_authn_file.la
344 mod_authn_file_la_SOURCES = mod_authn_file.c
345 mod_authn_file_la_LDFLAGS = $(common_module_ldflags)
346 mod_authn_file_la_LIBADD = $(CRYPT_LIB) $(CRYPTO_LIB) $(common_libadd)
348 if BUILD_WITH_KRB5
349 lib_LTLIBRARIES += mod_authn_gssapi.la
350 mod_authn_gssapi_la_SOURCES = mod_authn_gssapi.c
351 mod_authn_gssapi_la_LDFLAGS = $(common_module_ldflags)
352 mod_authn_gssapi_la_LIBADD = $(KRB5_LIB) $(common_libadd)
353 endif
355 if BUILD_WITH_LDAP
356 lib_LTLIBRARIES += mod_authn_ldap.la
357 mod_authn_ldap_la_SOURCES = mod_authn_ldap.c
358 mod_authn_ldap_la_LDFLAGS = $(common_module_ldflags)
359 mod_authn_ldap_la_LIBADD = $(LDAP_LIB) $(LBER_LIB) $(common_libadd)
360 endif
362 if BUILD_WITH_PAM
363 lib_LTLIBRARIES += mod_authn_pam.la
364 mod_authn_pam_la_SOURCES = mod_authn_pam.c
365 mod_authn_pam_la_LDFLAGS = $(common_module_ldflags)
366 mod_authn_pam_la_LIBADD = $(PAM_LIB) $(common_libadd)
367 endif
369 if BUILD_WITH_MYSQL
370 lib_LTLIBRARIES += mod_authn_mysql.la
371 mod_authn_mysql_la_SOURCES = mod_authn_mysql.c
372 mod_authn_mysql_la_LDFLAGS = $(common_module_ldflags)
373 mod_authn_mysql_la_LIBADD = $(CRYPT_LIB) $(MYSQL_LIBS) $(common_libadd)
374 mod_authn_mysql_la_CPPFLAGS = $(MYSQL_CFLAGS)
375 endif
377 if BUILD_WITH_SASL
378 lib_LTLIBRARIES += mod_authn_sasl.la
379 mod_authn_sasl_la_SOURCES = mod_authn_sasl.c
380 mod_authn_sasl_la_LDFLAGS = $(common_module_ldflags)
381 mod_authn_sasl_la_LIBADD = $(SASL_LIBS) $(common_libadd)
382 mod_authn_sasl_la_CPPFLAGS = $(SASL_CFLAGS)
383 endif
385 if BUILD_WITH_OPENSSL
386 lib_LTLIBRARIES += mod_openssl.la
387 mod_openssl_la_SOURCES = mod_openssl.c
388 mod_openssl_la_LDFLAGS = $(common_module_ldflags)
389 mod_openssl_la_LIBADD = $(SSL_LIB) $(common_libadd)
390 endif
392 lib_LTLIBRARIES += mod_rewrite.la
393 mod_rewrite_la_SOURCES = mod_rewrite.c
394 mod_rewrite_la_LDFLAGS = $(common_module_ldflags)
395 mod_rewrite_la_LIBADD = $(PCRE_LIB) $(common_libadd)
397 lib_LTLIBRARIES += mod_redirect.la
398 mod_redirect_la_SOURCES = mod_redirect.c
399 mod_redirect_la_LDFLAGS = $(common_module_ldflags)
400 mod_redirect_la_LIBADD = $(PCRE_LIB) $(common_libadd)
402 lib_LTLIBRARIES += mod_status.la
403 mod_status_la_SOURCES = mod_status.c
404 mod_status_la_LDFLAGS = $(common_module_ldflags)
405 mod_status_la_LIBADD = $(common_libadd)
407 lib_LTLIBRARIES += mod_accesslog.la
408 mod_accesslog_la_SOURCES = mod_accesslog.c
409 mod_accesslog_la_LDFLAGS = $(common_module_ldflags)
410 mod_accesslog_la_LIBADD = $(common_libadd)
412 lib_LTLIBRARIES += mod_uploadprogress.la
413 mod_uploadprogress_la_SOURCES = mod_uploadprogress.c
414 mod_uploadprogress_la_LDFLAGS = $(common_module_ldflags)
415 mod_uploadprogress_la_LIBADD = $(common_libadd)
417 lib_LTLIBRARIES += mod_wstunnel.la
418 mod_wstunnel_la_SOURCES = mod_wstunnel.c
419 mod_wstunnel_la_LDFLAGS = $(common_module_ldflags)
420 mod_wstunnel_la_LIBADD = $(common_libadd) $(CRYPTO_LIB)
423 hdr = base64.h buffer.h burl.h network.h log.h http_kv.h keyvalue.h \
424         response.h request.h fastcgi.h chunk.h \
425         first.h settings.h http_chunk.h \
426         algo_sha1.h md5.h http_auth.h http_header.h http_vhostdb.h stream.h \
427         fdevent.h gw_backend.h connections.h base.h base_decls.h stat_cache.h \
428         plugin.h \
429         etag.h joblist.h array.h vector.h crc32.h \
430         fdevent_impl.h network_write.h configfile.h \
431         mod_ssi.h mod_ssi_expr.h inet_ntop_cache.h \
432         configparser.h mod_ssi_exprparser.h \
433         rand.h \
434         sys-crypto.h sys-endian.h sys-mmap.h sys-socket.h sys-strings.h \
435         mod_cml.h mod_cml_funcs.h \
436         safe_memclear.h sock_addr.h splaytree.h status_counter.h \
437         mod_magnet_cache.h
440 DEFS= @DEFS@ -DHAVE_VERSIONSTAMP_H -DLIBRARY_DIR="\"$(libdir)\"" -DSBIN_DIR="\"$(sbindir)\""
443 if LIGHTTPD_STATIC
445 ## static lighttpd server (used in conjunction with -DLIGHTTPD_STATIC)
446 ## (order is not important)
447 lighttpd_SOURCES = \
448   $(src) \
449   mod_access.c \
450   mod_accesslog.c \
451   mod_alias.c \
452   mod_auth.c \
453   mod_authn_file.c \
454   mod_cgi.c \
455   mod_compress.c \
456   mod_deflate.c \
457   mod_dirlisting.c \
458   mod_evasive.c \
459   mod_expire.c \
460   mod_extforward.c \
461   mod_fastcgi.c \
462   mod_flv_streaming.c \
463   mod_indexfile.c \
464   mod_proxy.c \
465   mod_redirect.c \
466   mod_rewrite.c \
467   mod_rrdtool.c \
468   mod_scgi.c \
469   mod_secdownload.c \
470   mod_setenv.c \
471   mod_simple_vhost.c \
472   mod_ssi_exprparser.c mod_ssi_expr.c mod_ssi.c \
473   mod_staticfile.c \
474   mod_status.c \
475   mod_uploadprogress.c \
476   mod_userdir.c \
477   mod_usertrack.c \
478   mod_vhostdb.c \
479   mod_webdav.c
480 lighttpd_CPPFLAGS = \
481   -DLIGHTTPD_STATIC \
482   $(XML_CFLAGS) $(SQLITE_CFLAGS) \
483   $(FAM_CFLAGS) $(LIBEV_CFLAGS) $(LIBUNWIND_CFLAGS)
484 lighttpd_LDADD = \
485   $(common_libadd) \
486   $(CRYPT_LIB) $(CRYPTO_LIB) \
487   $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) $(ELFTC_LIB) \
488   $(PCRE_LIB) $(Z_LIB) $(BZ_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) \
489   $(FAM_LIBS) $(LIBEV_LIBS) $(LIBUNWIND_LIBS)
490 lighttpd_LDFLAGS = -export-dynamic
492 if BUILD_WITH_GEOIP
493 lighttpd_SOURCES += mod_geoip.c
494 lighttpd_LDADD += $(GEOIP_LIB)
495 endif
496 if BUILD_WITH_MAXMINDDB
497 lighttpd_SOURCES += mod_maxminddb.c
498 lighttpd_LDADD += $(MAXMINDDB_LIB)
499 endif
500 if BUILD_WITH_LUA
501 lighttpd_SOURCES += mod_cml.c mod_cml_lua.c mod_cml_funcs.c \
502                     mod_magnet.c mod_magnet_cache.c
503 lighttpd_CPPFLAGS += $(LUA_CFLAGS)
504 lighttpd_LDADD += $(LUA_LIBS) -lm
505 endif
506 if BUILD_WITH_KRB5
507 lighttpd_SOURCES += mod_authn_gssapi.c
508 lighttpd_LDADD += $(KRB5_LIB)
509 endif
510 if BUILD_WITH_LDAP
511 lighttpd_SOURCES += mod_authn_ldap.c mod_vhostdb_ldap.c
512 lighttpd_LDADD += $(LDAP_LIB) $(LBER_LIB)
513 endif
514 if BUILD_WITH_PAM
515 lighttpd_SOURCES += mod_authn_pam.c
516 lighttpd_LDADD += $(PAM_LIB)
517 endif
518 if BUILD_WITH_MYSQL
519 lighttpd_SOURCES += mod_authn_mysql.c mod_mysql_vhost.c mod_vhostdb_mysql.c
520 lighttpd_CPPFLAGS += $(MYSQL_CFLAGS)
521 lighttpd_LDADD += $(MYSQL_LIBS)
522 endif
523 if BUILD_WITH_PGSQL
524 lighttpd_SOURCES += mod_vhostdb_pgsql.c
525 lighttpd_CPPFLAGS += $(PGSQL_INCLUDE)
526 lighttpd_LDADD += $(PGSQL_LIBS)
527 endif
528 if BUILD_WITH_DBI
529 lighttpd_SOURCES += mod_vhostdb_dbi.c
530 lighttpd_CPPFLAGS += $(DBI_CFLAGS)
531 lighttpd_LDADD += $(DBI_LIBS)
532 endif
533 if BUILD_WITH_OPENSSL
534 lighttpd_SOURCES += mod_openssl.c
535 lighttpd_LDADD += $(SSL_LIB)
536 endif
537 if BUILD_WITH_MEMCACHED
538 lighttpd_CPPFLAGS += $(MEMCACHED_CFLAGS)
539 lighttpd_LDADD += $(MEMCACHED_LIB)
540 endif
541 if BUILD_WITH_GDBM
542 lighttpd_LDADD += $(GDBM_LIB)
543 endif
544 if BUILD_MOD_TRIGGER_B4_DL
545 lighttpd_SOURCES += mod_trigger_b4_dl.c
546 endif
548 else
550 ## default lighttpd server
551 lighttpd_SOURCES = $(src)
552 lighttpd_CPPFLAGS = $(FAM_CFLAGS) $(LIBEV_CFLAGS)
553 lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(CRYPTO_LIB) $(FAM_LIBS) $(LIBEV_LIBS) $(LIBUNWIND_LIBS)
554 lighttpd_LDFLAGS = -export-dynamic
556 endif
558 t_test_array_SOURCES = t/test_array.c array.c data_array.c data_integer.c data_string.c buffer.c
559 t_test_array_LDADD = $(LIBUNWIND_LIBS)
561 t_test_buffer_SOURCES = t/test_buffer.c buffer.c
562 t_test_buffer_LDADD = $(LIBUNWIND_LIBS)
564 t_test_base64_SOURCES = t/test_base64.c base64.c buffer.c
565 t_test_base64_LDADD = $(LIBUNWIND_LIBS)
567 t_test_burl_SOURCES = t/test_burl.c burl.c buffer.c base64.c
568 t_test_burl_LDADD = $(LIBUNWIND_LIBS)
570 t_test_configfile_SOURCES = t/test_configfile.c buffer.c array.c data_config.c data_integer.c data_string.c http_header.c http_kv.c vector.c log.c sock_addr.c
571 t_test_configfile_LDADD = $(PCRE_LIB) $(LIBUNWIND_LIBS)
573 t_test_keyvalue_SOURCES = t/test_keyvalue.c burl.c buffer.c base64.c array.c data_integer.c data_string.c log.c
574 t_test_keyvalue_LDADD = $(PCRE_LIB) $(LIBUNWIND_LIBS)
576 t_test_mod_access_SOURCES = t/test_mod_access.c configfile-glue.c buffer.c array.c data_config.c data_integer.c data_string.c http_header.c http_kv.c vector.c log.c sock_addr.c
577 t_test_mod_access_LDADD = $(PCRE_LIB) $(LIBUNWIND_LIBS)
579 t_test_mod_evhost_SOURCES = t/test_mod_evhost.c configfile-glue.c buffer.c array.c data_config.c data_integer.c data_string.c http_header.c http_kv.c vector.c log.c sock_addr.c
580 t_test_mod_evhost_LDADD = $(PCRE_LIB) $(LIBUNWIND_LIBS)
582 t_test_mod_simple_vhost_SOURCES = t/test_mod_simple_vhost.c configfile-glue.c buffer.c array.c data_config.c data_integer.c data_string.c http_header.c http_kv.c vector.c log.c sock_addr.c
583 t_test_mod_simple_vhost_LDADD = $(PCRE_LIB) $(LIBUNWIND_LIBS)
585 t_test_request_SOURCES = t/test_request.c request.c buffer.c array.c data_integer.c data_string.c http_header.c http_kv.c log.c sock_addr.c
586 t_test_request_LDADD = $(LIBUNWIND_LIBS)
588 noinst_HEADERS   = $(hdr)
589 EXTRA_DIST = \
590         mod_skeleton.c \
591         configparser.y \
592         mod_ssi_exprparser.y \
593         lemon.c \
594         lempar.c \
595         SConscript \
596         CMakeLists.txt config.h.cmake \
597         meson.build