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