1
2# Copyright (C) Igor Sysoev
3# Copyright (C) NGINX, Inc.
4
5
6NXT_LIB_SRCS=" \
7    src/nxt_lib.c \
8    src/nxt_gmtime.c \
9    src/nxt_errno.c \
10    src/nxt_time.c \
11    src/nxt_malloc.c \
12    src/nxt_file.c \
13    src/nxt_mem_map.c \
14    src/nxt_socket.c \
15    src/nxt_socketpair.c \
16    src/nxt_socket_msg.c \
17    src/nxt_credential.c \
18    src/nxt_isolation.c \
19    src/nxt_process.c \
20    src/nxt_process_title.c \
21    src/nxt_signal.c \
22    src/nxt_port_socket.c \
23    src/nxt_port_memory.c \
24    src/nxt_port_rpc.c \
25    src/nxt_port.c \
26    src/nxt_dyld.c \
27    src/nxt_random.c \
28    src/nxt_queue.c \
29    src/nxt_rbtree.c \
30    src/nxt_mp.c \
31    src/nxt_mem_zone.c \
32    src/nxt_string.c \
33    src/nxt_utf8.c \
34    src/nxt_parse.c \
35    src/nxt_sprintf.c \
36    src/nxt_var.c \
37    src/nxt_file_name.c \
38    src/nxt_log.c \
39    src/nxt_djb_hash.c \
40    src/nxt_murmur_hash.c \
41    src/nxt_lvlhsh.c \
42    src/nxt_array.c \
43    src/nxt_vector.c \
44    src/nxt_list.c \
45    src/nxt_buf.c \
46    src/nxt_buf_pool.c \
47    src/nxt_recvbuf.c \
48    src/nxt_sendbuf.c \
49    src/nxt_thread.c \
50    src/nxt_thread_mutex.c \
51    src/nxt_thread_cond.c \
52    src/nxt_spinlock.c \
53    src/nxt_semaphore.c \
54    src/nxt_thread_pool.c \
55    src/nxt_thread_time.c \
56    src/nxt_time_parse.c \
57    src/nxt_work_queue.c \
58    src/nxt_service.c \
59    src/nxt_log_moderation.c \
60    src/nxt_event_engine.c \
61    src/nxt_timer.c \
62    src/nxt_fd_event.c \
63    src/nxt_conn.c \
64    src/nxt_conn_connect.c \
65    src/nxt_conn_accept.c \
66    src/nxt_conn_read.c \
67    src/nxt_conn_write.c \
68    src/nxt_conn_close.c \
69    src/nxt_event_conn_job_sendfile.c \
70    src/nxt_conn_proxy.c \
71    src/nxt_job.c \
72    src/nxt_job_resolve.c \
73    src/nxt_sockaddr.c \
74    src/nxt_listen_socket.c \
75    src/nxt_upstream.c \
76    src/nxt_upstream_round_robin.c \
77    src/nxt_http_parse.c \
78    src/nxt_app_log.c \
79    src/nxt_capability.c \
80    src/nxt_runtime.c \
81    src/nxt_conf.c \
82    src/nxt_conf_validation.c \
83    src/nxt_main_process.c \
84    src/nxt_signal_handlers.c \
85    src/nxt_controller.c \
86    src/nxt_router.c \
87    src/nxt_h1proto.c \
88    src/nxt_http_request.c \
89    src/nxt_http_response.c \
90    src/nxt_http_error.c \
91    src/nxt_http_route.c \
92    src/nxt_http_route_addr.c \
93    src/nxt_http_return.c \
94    src/nxt_http_static.c \
95    src/nxt_http_proxy.c \
96    src/nxt_http_chunk_parse.c \
97    src/nxt_http_variables.c \
98    src/nxt_application.c \
99    src/nxt_external.c \
100    src/nxt_port_hash.c \
101    src/nxt_sha1.c \
102    src/nxt_websocket.c \
103    src/nxt_websocket_accept.c \
104    src/nxt_http_websocket.c \
105    src/nxt_h1proto_websocket.c \
106"
107
108NXT_LIB_SRC0=" \
109    src/nxt_buf_filter.c \
110    src/nxt_job_file.c \
111    src/nxt_stream_module.c \
112    src/nxt_stream_source.c \
113    src/nxt_upstream_source.c \
114    src/nxt_http_source.c \
115    src/nxt_fastcgi_source.c \
116    src/nxt_fastcgi_record_parse.c \
117\
118    src/nxt_mem_pool_cleanup.h \
119    src/nxt_mem_pool_cleanup.c \
120"
121
122NXT_LIB_UNIT_SRCS="src/nxt_unit.c"
123
124
125NXT_LIB_TLS_DEPS="src/nxt_tls.h"
126NXT_LIB_TLS_SRCS="src/nxt_cert.c"
127NXT_LIB_OPENSSL_SRCS="src/nxt_openssl.c"
128NXT_LIB_GNUTLS_SRCS="src/nxt_gnutls.c"
129NXT_LIB_CYASSL_SRCS="src/nxt_cyassl.c"
130NXT_LIB_POLARSSL_SRCS="src/nxt_polarssl.c"
131
132NXT_LIB_PCRE_SRCS="src/nxt_pcre.c"
133NXT_LIB_PCRE2_SRCS="src/nxt_pcre2.c"
134
135NXT_LIB_EPOLL_SRCS="src/nxt_epoll_engine.c"
136NXT_LIB_KQUEUE_SRCS="src/nxt_kqueue_engine.c"
137NXT_LIB_EVENTPORT_SRCS="src/nxt_eventport_engine.c"
138NXT_LIB_DEVPOLL_SRCS="src/nxt_devpoll_engine.c"
139NXT_LIB_POLLSET_SRCS="src/nxt_pollset_engine.c"
140NXT_LIB_POLL_SRCS="src/nxt_poll_engine.c"
141NXT_LIB_SELECT_SRCS="src/nxt_select_engine.c"
142
143NXT_LIB_LINUX_SENDFILE_SRCS="src/nxt_linux_sendfile.c"
144NXT_LIB_FREEBSD_SENDFILE_SRCS="src/nxt_freebsd_sendfile.c"
145NXT_LIB_SOLARIS_SENDFILEV_SRCS="src/nxt_solaris_sendfilev.c"
146NXT_LIB_MACOSX_SENDFILE_SRCS="src/nxt_macosx_sendfile.c"
147NXT_LIB_AIX_SEND_FILE_SRCS="src/nxt_aix_send_file.c"
148NXT_LIB_HPUX_SENDFILE_SRCS="src/nxt_hpux_sendfile.c"
149NXT_LIB_CLONE_SRCS="src/nxt_clone.c"
150
151NXT_TEST_BUILD_DEPS="src/nxt_test_build.h"
152NXT_TEST_BUILD_SRCS="src/nxt_test_build.c"
153
154NXT_TEST_DEPS="src/test/nxt_tests.h \
155    src/test/nxt_rbtree1.h \
156"
157
158NXT_TEST_SRCS=" \
159    src/test/nxt_tests.c \
160    src/test/nxt_rbtree1.c \
161    src/test/nxt_rbtree_test.c \
162    src/test/nxt_term_parse_test.c \
163    src/test/nxt_msec_diff_test.c \
164    src/test/nxt_mp_test.c \
165    src/test/nxt_mem_zone_test.c \
166    src/test/nxt_lvlhsh_test.c \
167    src/test/nxt_gmtime_test.c \
168    src/test/nxt_sprintf_test.c \
169    src/test/nxt_malloc_test.c \
170    src/test/nxt_utf8_test.c \
171    src/test/nxt_rbtree1_test.c \
172    src/test/nxt_http_parse_test.c \
173    src/test/nxt_strverscmp_test.c \
174    src/test/nxt_base64_test.c \
175"
176
177
178if [ $NXT_HAVE_CLONE_NEWUSER = YES ]; then
179    NXT_TEST_SRCS="$NXT_TEST_SRCS src/test/nxt_clone_test.c"
180fi
181
182
183NXT_LIB_UTF8_FILE_NAME_TEST_SRCS=" \
184    src/test/nxt_utf8_file_name_test.c \
185"
186
187
188if [ $NXT_HAVE_ROOTFS = YES ]; then
189    NXT_LIB_SRCS="$NXT_LIB_SRCS src/nxt_fs.c"
190fi
191
192
193if [ $NXT_TLS = YES ]; then
194    nxt_have=NXT_TLS . auto/have
195    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_TLS_SRCS"
196fi
197
198
199if [ $NXT_OPENSSL = YES ]; then
200    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_OPENSSL_SRCS"
201fi
202
203
204if [ $NXT_GNUTLS = YES ]; then
205    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_GNUTLS_SRCS"
206fi
207
208
209if [ $NXT_CYASSL = YES ]; then
210    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_CYASSL_SRCS"
211fi
212
213
214if [ $NXT_POLARSSL = YES ]; then
215    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_POLARSSL_SRCS"
216fi
217
218
219if [ "$NXT_REGEX" = "YES" ]; then
220    if [ "$NXT_HAVE_PCRE2" = "YES" ]; then
221        NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_PCRE2_SRCS"
222    else
223        NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_PCRE_SRCS"
224    fi
225fi
226
227if [ "$NXT_HAVE_EPOLL" = "YES" -o "$NXT_TEST_BUILD_EPOLL" = "YES" ]; then
228    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_EPOLL_SRCS"
229fi
230
231
232if [ "$NXT_HAVE_KQUEUE" = "YES" ]; then
233    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_KQUEUE_SRCS"
234fi
235
236
237if [ "$NXT_HAVE_EVENTPORT" = "YES" -o "$NXT_TEST_BUILD_EVENTPORT" = "YES" ];
238then
239    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_EVENTPORT_SRCS"
240fi
241
242
243if [ "$NXT_HAVE_DEVPOLL" = "YES" -o "$NXT_TEST_BUILD_DEVPOLL" = "YES" ]; then
244    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_DEVPOLL_SRCS"
245fi
246
247
248if [ "$NXT_HAVE_POLLSET" = "YES" -o "$NXT_TEST_BUILD_POLLSET" = "YES" ]; then
249    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_POLLSET_SRCS"
250fi
251
252
253NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_POLL_SRCS"
254NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_SELECT_SRCS"
255
256
257if [ "$NXT_HAVE_LINUX_SENDFILE" = "YES" \
258     -o "$NXT_TEST_BUILD_LINUX_SENDFILE" = "YES" ]; then
259    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_LINUX_SENDFILE_SRCS"
260fi
261
262
263if [ "$NXT_HAVE_FREEBSD_SENDFILE" = "YES" \
264     -o "$NXT_TEST_BUILD_FREEBSD_SENDFILE" = "YES" ]; then
265    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_FREEBSD_SENDFILE_SRCS"
266fi
267
268
269if [ "$NXT_HAVE_SOLARIS_SENDFILEV" = "YES" \
270     -o "$NXT_TEST_BUILD_SOLARIS_SENDFILEV" = "YES" ];
271then
272    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_SOLARIS_SENDFILEV_SRCS"
273fi
274
275
276if [ "$NXT_HAVE_MACOSX_SENDFILE" = "YES" \
277     -o "$NXT_TEST_BUILD_MACOSX_SENDFILE" = "YES" ]; then
278    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_MACOSX_SENDFILE_SRCS"
279fi
280
281
282if [ "$NXT_HAVE_AIX_SEND_FILE" = "YES" \
283     -o "$NXT_TEST_BUILD_AIX_SEND_FILE" = "YES" ];
284then
285    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_AIX_SEND_FILE_SRCS"
286fi
287
288
289if [ "$NXT_HAVE_HPUX_SENDFILE" = "YES" \
290     -o "$NXT_TEST_BUILD_HPUX_SENDFILE" = "YES" ]; then
291    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_HPUX_SENDFILE_SRCS"
292fi
293
294
295if [ "$NXT_HAVE_CLONE" = "YES" ]; then
296    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_CLONE_SRCS"
297fi
298
299
300if [ "$NXT_TEST_BUILD" = "YES" ]; then
301    NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_TEST_BUILD_SRCS"
302fi
303
304
305if [ $NXT_TESTS = YES ]; then
306    nxt_have=NXT_TESTS . auto/have
307fi
308
309
310NXT_SRCS=" \
311    src/nxt_main.c \
312"
313