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