1AM_CFLAGS = $(FAM_CFLAGS) 2 3noinst_PROGRAMS=proc_open lemon # simple-fcgi #graphic evalo bench ajp ssl error_test adserver gen-license 4sbin_PROGRAMS=lighttpd lighttpd-angel 5LEMON=$(top_builddir)/src/lemon$(EXEEXT) 6 7lemon_SOURCES=lemon.c 8 9lighttpd_angel_SOURCES=lighttpd-angel.c 10 11.PHONY: versionstamp parsers 12 13versionstamp: 14 @test -f versionstamp.h || touch versionstamp.h; \ 15 REVISION=""; \ 16 if test -d "$(top_srcdir)/.svn" -a -x "`which svnversion`"; then \ 17 REVISION="$$(LANG= LC_ALL=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)"; \ 18 if test "$$REVISION" = "exported"; then \ 19 REVISION=""; \ 20 fi; \ 21 fi; \ 22 if test -z "$$REVISION" -a -d "$(top_srcdir)/.git" -a -x "`which git`"; then \ 23 REVISION="$$(cd "$(top_srcdir)"; LANG= LC_ALL=C git describe --always 2>/dev/null || echo)"; \ 24 fi; \ 25 if test -n "$$REVISION"; then \ 26 echo "#define REPO_VERSION \"-devel-$$REVISION\"" > versionstamp.h.tmp; \ 27 else \ 28 echo "#define REPO_VERSION \"\"" > versionstamp.h.tmp; \ 29 fi; \ 30 if ! diff versionstamp.h.tmp versionstamp.h >/dev/null 2>/dev/null; then \ 31 mv versionstamp.h.tmp versionstamp.h; \ 32 else \ 33 rm versionstamp.h.tmp; \ 34 fi 35 36if CROSS_COMPILING 37configparser.c configparser.h: 38mod_ssi_exprparser.c mod_ssi_exprparser.h: 39 40parsers: 41else 42configparser.h: configparser.c 43configparser.c: $(srcdir)/configparser.y $(srcdir)/lempar.c lemon$(EXEEXT) 44 rm -f configparser.h 45 $(LEMON) -q $(srcdir)/configparser.y $(srcdir)/lempar.c 46 47mod_ssi_exprparser.h: mod_ssi_exprparser.c 48mod_ssi_exprparser.c: $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c lemon$(EXEEXT) 49 rm -f mod_ssi_exprparser.h 50 $(LEMON) -q $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c 51 52parsers: configparser.c mod_ssi_exprparser.c 53endif 54 55BUILT_SOURCES = parsers versionstamp 56MAINTAINERCLEANFILES = configparser.c configparser.h mod_ssi_exprparser.c mod_ssi_exprparser.h 57CLEANFILES = versionstamp.h versionstamp.h.tmp 58 59common_src=buffer.c log.c \ 60 keyvalue.c chunk.c \ 61 http_chunk.c stream.c fdevent.c \ 62 stat_cache.c plugin.c joblist.c etag.c array.c \ 63 data_string.c data_count.c data_array.c \ 64 data_integer.c md5.c data_fastcgi.c \ 65 fdevent_select.c fdevent_libev.c \ 66 fdevent_poll.c fdevent_linux_sysepoll.c \ 67 fdevent_solaris_devpoll.c fdevent_solaris_port.c \ 68 fdevent_freebsd_kqueue.c fdevent_libmtcp.c \ 69 data_config.c bitset.c \ 70 inet_ntop_cache.c crc32.c \ 71 connections-glue.c \ 72 configfile-glue.c \ 73 http-header-glue.c \ 74 network_write.c network_linux_sendfile.c \ 75 network_freebsd_sendfile.c network_writev.c \ 76 network_solaris_sendfilev.c network_openssl.c \ 77 splaytree.c status_counter.c network_mtcp_writev.c 78 79src = server.c response.c connections.c network.c \ 80 configfile.c configparser.c request.c proc_open.c 81 82lib_LTLIBRARIES = 83 84if NO_RDYNAMIC 85# if the linker doesn't allow referencing symbols of the binary 86# we have to put everything into a shared-lib and link it into 87# everything 88lib_LTLIBRARIES += liblightcomp.la 89liblightcomp_la_SOURCES=$(common_src) 90liblightcomp_la_CFLAGS=$(AM_CFLAGS) $(LIBEV_CFLAGS) $(LIBMTCP_CFLAGS) 91liblightcomp_la_LDFLAGS = -avoid-version -no-undefined 92liblightcomp_la_LIBADD = $(PCRE_LIB) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS) 93common_libadd = liblightcomp.la 94else 95src += $(common_src) 96common_libadd = 97endif 98 99lib_LTLIBRARIES += mod_flv_streaming.la 100mod_flv_streaming_la_SOURCES = mod_flv_streaming.c 101mod_flv_streaming_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 102mod_flv_streaming_la_LIBADD = $(common_libadd) 103 104lib_LTLIBRARIES += mod_evasive.la 105mod_evasive_la_SOURCES = mod_evasive.c 106mod_evasive_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 107mod_evasive_la_LIBADD = $(common_libadd) 108 109lib_LTLIBRARIES += mod_webdav.la 110mod_webdav_la_SOURCES = mod_webdav.c 111mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS) 112mod_webdav_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 113mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) 114 115lib_LTLIBRARIES += mod_magnet.la 116mod_magnet_la_SOURCES = mod_magnet.c mod_magnet_cache.c 117mod_magnet_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS) 118mod_magnet_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 119mod_magnet_la_LIBADD = $(common_libadd) $(LUA_LIBS) -lm 120 121lib_LTLIBRARIES += mod_cml.la 122mod_cml_la_SOURCES = mod_cml.c mod_cml_lua.c mod_cml_funcs.c 123mod_cml_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS) 124mod_cml_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 125mod_cml_la_LIBADD = $(MEMCACHE_LIB) $(common_libadd) $(LUA_LIBS) -lm 126 127lib_LTLIBRARIES += mod_trigger_b4_dl.la 128mod_trigger_b4_dl_la_SOURCES = mod_trigger_b4_dl.c 129mod_trigger_b4_dl_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 130mod_trigger_b4_dl_la_LIBADD = $(GDBM_LIB) $(MEMCACHE_LIB) $(PCRE_LIB) $(common_libadd) 131 132lib_LTLIBRARIES += mod_mysql_vhost.la 133mod_mysql_vhost_la_SOURCES = mod_mysql_vhost.c 134mod_mysql_vhost_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 135mod_mysql_vhost_la_LIBADD = $(MYSQL_LIBS) $(common_libadd) 136mod_mysql_vhost_la_CPPFLAGS = $(MYSQL_INCLUDE) 137 138lib_LTLIBRARIES += mod_cgi.la 139mod_cgi_la_SOURCES = mod_cgi.c 140mod_cgi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 141mod_cgi_la_LIBADD = $(common_libadd) 142 143lib_LTLIBRARIES += mod_scgi.la 144mod_scgi_la_SOURCES = mod_scgi.c 145mod_scgi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 146mod_scgi_la_LIBADD = $(common_libadd) 147 148lib_LTLIBRARIES += mod_staticfile.la 149mod_staticfile_la_SOURCES = mod_staticfile.c 150mod_staticfile_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 151mod_staticfile_la_LIBADD = $(common_libadd) 152 153lib_LTLIBRARIES += mod_dirlisting.la 154mod_dirlisting_la_SOURCES = mod_dirlisting.c 155mod_dirlisting_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 156mod_dirlisting_la_LIBADD = $(common_libadd) $(PCRE_LIB) 157 158lib_LTLIBRARIES += mod_indexfile.la 159mod_indexfile_la_SOURCES = mod_indexfile.c 160mod_indexfile_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 161mod_indexfile_la_LIBADD = $(common_libadd) 162 163lib_LTLIBRARIES += mod_setenv.la 164mod_setenv_la_SOURCES = mod_setenv.c 165mod_setenv_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 166mod_setenv_la_LIBADD = $(common_libadd) 167 168lib_LTLIBRARIES += mod_alias.la 169mod_alias_la_SOURCES = mod_alias.c 170mod_alias_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 171mod_alias_la_LIBADD = $(common_libadd) 172 173lib_LTLIBRARIES += mod_userdir.la 174mod_userdir_la_SOURCES = mod_userdir.c 175mod_userdir_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 176mod_userdir_la_LIBADD = $(common_libadd) 177 178lib_LTLIBRARIES += mod_rrdtool.la 179mod_rrdtool_la_SOURCES = mod_rrdtool.c 180mod_rrdtool_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 181mod_rrdtool_la_LIBADD = $(common_libadd) 182 183lib_LTLIBRARIES += mod_usertrack.la 184mod_usertrack_la_SOURCES = mod_usertrack.c 185mod_usertrack_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 186mod_usertrack_la_LIBADD = $(common_libadd) 187 188lib_LTLIBRARIES += mod_proxy.la 189mod_proxy_la_SOURCES = mod_proxy.c 190mod_proxy_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 191mod_proxy_la_LIBADD = $(common_libadd) 192 193lib_LTLIBRARIES += mod_ssi.la 194mod_ssi_la_SOURCES = mod_ssi_exprparser.c mod_ssi_expr.c mod_ssi.c 195mod_ssi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 196mod_ssi_la_LIBADD = $(common_libadd) $(PCRE_LIB) 197 198lib_LTLIBRARIES += mod_secdownload.la 199mod_secdownload_la_SOURCES = mod_secure_download.c 200mod_secdownload_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 201mod_secdownload_la_LIBADD = $(common_libadd) 202 203#lib_LTLIBRARIES += mod_httptls.la 204#mod_httptls_la_SOURCES = mod_httptls.c 205#mod_httptls_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 206#mod_httptls_la_LIBADD = $(common_libadd) 207 208lib_LTLIBRARIES += mod_expire.la 209mod_expire_la_SOURCES = mod_expire.c 210mod_expire_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 211mod_expire_la_LIBADD = $(common_libadd) 212 213lib_LTLIBRARIES += mod_evhost.la 214mod_evhost_la_SOURCES = mod_evhost.c 215mod_evhost_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 216mod_evhost_la_LIBADD = $(common_libadd) 217 218lib_LTLIBRARIES += mod_simple_vhost.la 219mod_simple_vhost_la_SOURCES = mod_simple_vhost.c 220mod_simple_vhost_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 221mod_simple_vhost_la_LIBADD = $(common_libadd) 222 223lib_LTLIBRARIES += mod_fastcgi.la 224mod_fastcgi_la_SOURCES = mod_fastcgi.c 225mod_fastcgi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 226mod_fastcgi_la_LIBADD = $(common_libadd) 227 228lib_LTLIBRARIES += mod_extforward.la 229mod_extforward_la_SOURCES = mod_extforward.c 230mod_extforward_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 231mod_extforward_la_LIBADD = $(common_libadd) 232 233lib_LTLIBRARIES += mod_access.la 234mod_access_la_SOURCES = mod_access.c 235mod_access_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 236mod_access_la_LIBADD = $(common_libadd) 237 238lib_LTLIBRARIES += mod_compress.la 239mod_compress_la_SOURCES = mod_compress.c 240mod_compress_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 241mod_compress_la_LIBADD = $(Z_LIB) $(BZ_LIB) $(common_libadd) 242 243lib_LTLIBRARIES += mod_auth.la 244mod_auth_la_SOURCES = mod_auth.c http_auth.c 245mod_auth_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 246mod_auth_la_LIBADD = $(CRYPT_LIB) $(LDAP_LIB) $(LBER_LIB) $(common_libadd) 247 248lib_LTLIBRARIES += mod_rewrite.la 249mod_rewrite_la_SOURCES = mod_rewrite.c 250mod_rewrite_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 251mod_rewrite_la_LIBADD = $(PCRE_LIB) $(common_libadd) 252 253lib_LTLIBRARIES += mod_redirect.la 254mod_redirect_la_SOURCES = mod_redirect.c 255mod_redirect_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 256mod_redirect_la_LIBADD = $(PCRE_LIB) $(common_libadd) 257 258lib_LTLIBRARIES += mod_status.la 259mod_status_la_SOURCES = mod_status.c 260mod_status_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 261mod_status_la_LIBADD = $(common_libadd) 262 263lib_LTLIBRARIES += mod_accesslog.la 264mod_accesslog_la_SOURCES = mod_accesslog.c 265mod_accesslog_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined 266mod_accesslog_la_LIBADD = $(common_libadd) 267 268 269hdr = server.h buffer.h network.h log.h keyvalue.h \ 270 response.h request.h fastcgi.h chunk.h \ 271 settings.h http_chunk.h \ 272 md5.h http_auth.h stream.h \ 273 fdevent.h connections.h base.h stat_cache.h \ 274 plugin.h mod_auth.h \ 275 etag.h joblist.h array.h crc32.h \ 276 network_backends.h configfile.h bitset.h \ 277 mod_ssi.h mod_ssi_expr.h inet_ntop_cache.h \ 278 configparser.h mod_ssi_exprparser.h \ 279 sys-mmap.h sys-socket.h mod_cml.h mod_cml_funcs.h \ 280 splaytree.h proc_open.h status_counter.h \ 281 mod_magnet_cache.h \ 282 version.h 283 284DEFS= @DEFS@ -DHAVE_VERSION_H -DLIBRARY_DIR="\"$(libdir)\"" -DSBIN_DIR="\"$(sbindir)\"" 285 286lighttpd_SOURCES = $(src) 287lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS) $(LIBMTCP_LIBS) $(LIBPSIO_LIBS) $(LIBDPDK_LIBS) 288lighttpd_LDFLAGS = -export-dynamic 289lighttpd_CCPFLAGS = $(FAM_CFLAGS) $(LIBEV_CFLAGS) $(LIBMTCP_CFLAGS) 290 291proc_open_SOURCES = proc_open.c buffer.c 292proc_open_CPPFLAGS= -DDEBUG_PROC_OPEN 293 294#gen_license_SOURCES = license.c md5.c buffer.c gen_license.c 295 296#ssl_SOURCES = ssl.c 297 298 299#adserver_SOURCES = buffer.c iframe.c 300#adserver_LDADD = -lfcgi -lmysqlclient 301 302#error_test_SOURCES = error_test.c 303 304#evalo_SOURCES = buffer.c eval.c 305#bench_SOURCES = buffer.c bench.c 306#ajp_SOURCES = ajp.c 307 308noinst_HEADERS = $(hdr) 309EXTRA_DIST = mod_skeleton.c configparser.y mod_ssi_exprparser.y lempar.c SConscript 310 311