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