summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: c4d275fc20223b0b17d72e486d1aa1b3cde97080 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
noinst_PROGRAMS=array chunk lemon # simple-fcgi #graphic evalo bench ajp ssl error_test adserver gen-license
sbin_PROGRAMS=lighttpd 
bin_PROGRAMS=spawn-fcgi
LEMON=$(top_builddir)/src/lemon

lemon_SOURCES=lemon.c

#simple_fcgi_SOURCES=simple-fcgi.c
#simple_fcgi_LDADD=-lfcgi

if CROSS_COMPILING
configparser.c configparser.h: 
mod_ssi_exprparser.c mod_ssi_exprparser.h: 
else
configparser.y: lemon
mod_ssi_exprparser.y: lemon

configparser.c configparser.h: configparser.y
	rm -f configparser.h
	$(LEMON) -q $(srcdir)/configparser.y $(srcdir)/lempar.c

mod_ssi_exprparser.c mod_ssi_exprparser.h: mod_ssi_exprparser.y 
	rm -f mod_ssi_exprparser.h
	$(LEMON) -q $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c
endif

config.c: configparser.h
mod_ssi_expr.c: mod_ssi_exprparser.h

common_src=buffer.c log.c \
      keyvalue.c response.c request.c chunk.c  \
      http_chunk.c stream.c fdevent.c connections.c \
      file_cache.c plugin.c joblist.c etag.c array.c \
      data_string.c data_count.c data_array.c \
      data_integer.c md5.c data_fastcgi.c \
      fdevent_select.c fdevent_linux_rtsig.c \
      fdevent_poll.c fdevent_linux_sysepoll.c \
      fdevent_solaris_devpoll.c fdevent_freebsd_kqueue.c \
      network_write.c network_linux_sendfile.c \
      network_freebsd_sendfile.c network_writev.c \
      network_solaris_sendfilev.c network_openssl.c \
      data_config.c bitset.c  configparser.c config.c \
      inet_ntop_cache.c network.c
      
src = server.c 

spawn_fcgi_SOURCES=spawn-fcgi.c

lib_LTLIBRARIES = 

if NO_RDYNAMIC
# if the linker doesn't allow referencing symbols of the binary
# we have to put everything into a shared-lib and link it into
# everything
lib_LTLIBRARIES += liblightcomp.la
liblightcomp_la_SOURCES=$(common_src)
liblightcomp_la_CFLAGS=$(AM_CFLAGS)
liblightcomp_la_LDFLAGS = -avoid-version -no-undefined
liblightcomp_la_LIBADD = $(PCRE_LIB) $(SSL_LIB)
common_libadd = liblightcomp.la
else
src += $(common_src)
common_libadd = 
endif

lib_LTLIBRARIES += mod_mysql_vhost.la
mod_mysql_vhost_la_SOURCES = mod_mysql_vhost.c
mod_mysql_vhost_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_mysql_vhost_la_LIBADD = $(MYSQL_LIBS) $(common_libadd)

lib_LTLIBRARIES += mod_cgi.la
mod_cgi_la_SOURCES = mod_cgi.c 
mod_cgi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_cgi_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_setenv.la
mod_setenv_la_SOURCES = mod_setenv.c 
mod_setenv_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_setenv_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_alias.la
mod_alias_la_SOURCES = mod_alias.c 
mod_alias_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_alias_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_userdir.la
mod_userdir_la_SOURCES = mod_userdir.c 
mod_userdir_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_userdir_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_rrdtool.la
mod_rrdtool_la_SOURCES = mod_rrdtool.c
mod_rrdtool_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_rrdtool_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_usertrack.la
mod_usertrack_la_SOURCES = mod_usertrack.c
mod_usertrack_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_usertrack_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_proxy.la
mod_proxy_la_SOURCES = mod_proxy.c
mod_proxy_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_proxy_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_ssi.la
mod_ssi_la_SOURCES = mod_ssi_exprparser.c mod_ssi_expr.c mod_ssi.c 
mod_ssi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_ssi_la_LIBADD = $(common_libadd) $(PCRE_LIB)

lib_LTLIBRARIES += mod_secdownload.la
mod_secdownload_la_SOURCES = mod_secure_download.c
mod_secdownload_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_secdownload_la_LIBADD = $(common_libadd)

#lib_LTLIBRARIES += mod_httptls.la
#mod_httptls_la_SOURCES = mod_httptls.c
#mod_httptls_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
#mod_httptls_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_expire.la
mod_expire_la_SOURCES = mod_expire.c
mod_expire_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_expire_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_evhost.la
mod_evhost_la_SOURCES = mod_evhost.c
mod_evhost_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_evhost_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_simple_vhost.la
mod_simple_vhost_la_SOURCES = mod_simple_vhost.c
mod_simple_vhost_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_simple_vhost_la_LIBADD = $(common_libadd)
		
lib_LTLIBRARIES += mod_fastcgi.la
mod_fastcgi_la_SOURCES = mod_fastcgi.c
mod_fastcgi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_fastcgi_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_access.la
mod_access_la_SOURCES = mod_access.c
mod_access_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_access_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_compress.la
mod_compress_la_SOURCES = mod_compress.c crc32.c
mod_compress_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_compress_la_LIBADD = $(Z_LIB) $(BZ_LIB) $(common_libadd)

lib_LTLIBRARIES += mod_auth.la
mod_auth_la_SOURCES = mod_auth.c http_auth_digest.c http_auth.c
mod_auth_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_auth_la_LIBADD = $(CRYPT_LIB) $(LDAP_LIB) $(LBER_LIB) $(common_libadd)

lib_LTLIBRARIES += mod_rewrite.la
mod_rewrite_la_SOURCES = mod_rewrite.c
mod_rewrite_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_rewrite_la_LIBADD = $(PCRE_LIB) $(common_libadd)

lib_LTLIBRARIES += mod_redirect.la
mod_redirect_la_SOURCES = mod_redirect.c
mod_redirect_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_redirect_la_LIBADD = $(PCRE_LIB) $(common_libadd)

lib_LTLIBRARIES += mod_status.la
mod_status_la_SOURCES = mod_status.c
mod_status_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_status_la_LIBADD = $(common_libadd)

lib_LTLIBRARIES += mod_accesslog.la
mod_accesslog_la_SOURCES = mod_accesslog.c
mod_accesslog_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_accesslog_la_LIBADD = $(common_libadd)


hdr = server.h buffer.h network.h log.h keyvalue.h \
      response.h request.h fastcgi.h chunk.h \
      settings.h http_chunk.h http_auth_digest.h \
      md5.h md5_global.h http_auth.h stream.h \
      fdevent.h connections.h base.h file_cache.h \
      plugin.h mod_auth.h \
      etag.h joblist.h array.h crc32.h \
      network_backends.h configfile.h bitset.h \
      mod_ssi.h mod_ssi_expr.h inet_ntop_cache.h \
      configparser.h mod_ssi_exprparser.h \
      sys-mmap.h sys-socket.h
      # license.h
      
#hdr += chat.h chat_misc.h chat_endec.h chat_user.h \
#       chat_channel.h

DEFS= @DEFS@ -DLIBRARY_DIR="\"$(libdir)\""

lighttpd_SOURCES = $(src)
lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(SSL_LIB)
lighttpd_LDFLAGS = -export-dynamic
lighttpd_CCPFLAGS = $(MYSQL_INCLUDES)

array_SOURCES = array.c buffer.c data_string.c data_count.c
array_CPPFLAGS= -DDEBUG_ARRAY

chunk_SOURCES = buffer.c chunk.c
chunk_CPPFLAGS= -DDEBUG_CHUNK

#gen_license_SOURCES = license.c md5.c buffer.c gen_license.c

#ssl_SOURCES = ssl.c


#adserver_SOURCES = buffer.c iframe.c
#adserver_LDADD = -lfcgi -lmysqlclient

#error_test_SOURCES = error_test.c

#evalo_SOURCES = buffer.c eval.c
#bench_SOURCES = buffer.c bench.c
#ajp_SOURCES = ajp.c

noinst_HEADERS   = $(hdr)
EXTRA_DIST = mod_skeleton.c configparser.y mod_ssi_exprparser.y lempar.c