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