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