Mercurial > hg > nginx-quic
annotate auto/make @ 6633:d82b3c344e7e
Events: the "accept_mutex" directive is turned off by default.
Now it is believed that the accept mutex brings more harm than benefits.
Especially in various benchmarks it often results in situation where only
one worker grabs all connections.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Fri, 15 Jul 2016 15:18:57 +0300 |
parents | 05c894a598ea |
children | 0d2956dfc4e6 |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
417
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
417
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
417
diff
changeset
|
4 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
2827 | 6 echo "creating $NGX_MAKEFILE" |
7 | |
469 | 8 mkdir -p $NGX_OBJS/src/core $NGX_OBJS/src/event $NGX_OBJS/src/event/modules \ |
9 $NGX_OBJS/src/os/unix $NGX_OBJS/src/os/win32 \ | |
6246
257b51c37c5a
The HTTP/2 implementation (RFC 7240, 7241).
Valentin Bartenev <vbart@nginx.com>
parents:
6164
diff
changeset
|
10 $NGX_OBJS/src/http $NGX_OBJS/src/http/v2 $NGX_OBJS/src/http/modules \ |
6065 | 11 $NGX_OBJS/src/http/modules/perl \ |
1949 | 12 $NGX_OBJS/src/mail \ |
6115 | 13 $NGX_OBJS/src/stream \ |
1949 | 14 $NGX_OBJS/src/misc |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
16 |
455 | 17 ngx_objs_dir=$NGX_OBJS$ngx_regex_dirsep |
18 ngx_use_pch=`echo $NGX_USE_PCH | sed -e "s/\//$ngx_regex_dirsep/g"` | |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
19 |
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
20 |
467 | 21 cat << END > $NGX_MAKEFILE |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
22 |
455 | 23 CC = $CC |
24 CFLAGS = $CFLAGS | |
25 CPP = $CPP | |
26 LINK = $LINK | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
27 |
455 | 28 END |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
29 |
2825
bb05c0834c8c
remove BMAKE (build make): a cc compiler should use own make
Igor Sysoev <igor@sysoev.ru>
parents:
1949
diff
changeset
|
30 |
681 | 31 if test -n "$NGX_PERL_CFLAGS"; then |
32 echo NGX_PERL_CFLAGS = $NGX_PERL_CFLAGS >> $NGX_MAKEFILE | |
33 echo NGX_PM_CFLAGS = $NGX_PM_CFLAGS >> $NGX_MAKEFILE | |
34 fi | |
35 | |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
36 |
489 | 37 # ALL_INCS, required by the addons and by OpenWatcom C precompiled headers |
455 | 38 |
6118
1bdfceda86a9
Fixed building --with-stream when precompiled headers are used.
Sergey Kandaurov <pluknet@nginx.com>
parents:
6115
diff
changeset
|
39 ngx_incs=`echo $CORE_INCS $NGX_OBJS $HTTP_INCS $MAIL_INCS $STREAM_INCS\ |
455 | 40 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ |
41 -e "s/\//$ngx_regex_dirsep/g"` | |
42 | |
43 cat << END >> $NGX_MAKEFILE | |
44 | |
45 ALL_INCS = $ngx_include_opt$ngx_incs | |
46 | |
47 END | |
48 | |
49 | |
50 ngx_all_srcs="$CORE_SRCS" | |
51 | |
52 | |
6164
4e5dda15f18f
Fixed misspellings of the word "dependencies".
Ruslan Ermilov <ru@nginx.com>
parents:
6118
diff
changeset
|
53 # the core dependencies and include paths |
455 | 54 |
467 | 55 ngx_deps=`echo $CORE_DEPS $NGX_AUTO_CONFIG_H $NGX_PCH \ |
455 | 56 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ |
57 -e "s/\//$ngx_regex_dirsep/g"` | |
58 | |
469 | 59 ngx_incs=`echo $CORE_INCS $NGX_OBJS \ |
455 | 60 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ |
61 -e "s/\//$ngx_regex_dirsep/g"` | |
62 | |
63 cat << END >> $NGX_MAKEFILE | |
64 | |
65 CORE_DEPS = $ngx_deps | |
66 | |
67 | |
68 CORE_INCS = $ngx_include_opt$ngx_incs | |
69 | |
70 END | |
71 | |
72 | |
6164
4e5dda15f18f
Fixed misspellings of the word "dependencies".
Ruslan Ermilov <ru@nginx.com>
parents:
6118
diff
changeset
|
73 # the http dependencies and include paths |
455 | 74 |
75 if [ $HTTP = YES ]; then | |
76 | |
77 ngx_all_srcs="$ngx_all_srcs $HTTP_SRCS" | |
78 | |
79 ngx_deps=`echo $HTTP_DEPS \ | |
80 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ | |
81 -e "s/\//$ngx_regex_dirsep/g"` | |
82 | |
83 ngx_incs=`echo $HTTP_INCS \ | |
84 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ | |
85 -e "s/\//$ngx_regex_dirsep/g"` | |
86 | |
87 cat << END >> $NGX_MAKEFILE | |
88 | |
89 HTTP_DEPS = $ngx_deps | |
90 | |
91 | |
92 HTTP_INCS = $ngx_include_opt$ngx_incs | |
93 | |
94 END | |
95 | |
96 fi | |
97 | |
98 | |
6164
4e5dda15f18f
Fixed misspellings of the word "dependencies".
Ruslan Ermilov <ru@nginx.com>
parents:
6118
diff
changeset
|
99 # the mail dependencies and include paths |
455 | 100 |
6383 | 101 if [ $MAIL != NO ]; then |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
102 |
6383 | 103 if [ $MAIL = YES ]; then |
104 ngx_all_srcs="$ngx_all_srcs $MAIL_SRCS" | |
105 fi | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
106 |
1136 | 107 ngx_deps=`echo $MAIL_DEPS \ |
455 | 108 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ |
109 -e "s/\//$ngx_regex_dirsep/g"` | |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
110 |
1136 | 111 ngx_incs=`echo $MAIL_INCS \ |
455 | 112 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ |
113 -e "s/\//$ngx_regex_dirsep/g"` | |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
114 |
455 | 115 cat << END >> $NGX_MAKEFILE |
116 | |
1136 | 117 MAIL_DEPS = $ngx_deps |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
118 |
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
119 |
1136 | 120 MAIL_INCS = $ngx_include_opt$ngx_incs |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
121 |
455 | 122 END |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
123 |
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
124 fi |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
125 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
126 |
6164
4e5dda15f18f
Fixed misspellings of the word "dependencies".
Ruslan Ermilov <ru@nginx.com>
parents:
6118
diff
changeset
|
127 # the stream dependencies and include paths |
6115 | 128 |
6383 | 129 if [ $STREAM != NO ]; then |
6115 | 130 |
6383 | 131 if [ $STREAM = YES ]; then |
132 ngx_all_srcs="$ngx_all_srcs $STREAM_SRCS" | |
133 fi | |
6115 | 134 |
135 ngx_deps=`echo $STREAM_DEPS \ | |
136 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ | |
137 -e "s/\//$ngx_regex_dirsep/g"` | |
138 | |
139 ngx_incs=`echo $STREAM_INCS \ | |
140 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ | |
141 -e "s/\//$ngx_regex_dirsep/g"` | |
142 | |
143 cat << END >> $NGX_MAKEFILE | |
144 | |
145 STREAM_DEPS = $ngx_deps | |
146 | |
147 | |
148 STREAM_INCS = $ngx_include_opt$ngx_incs | |
149 | |
150 END | |
151 | |
152 fi | |
153 | |
154 | |
6382
392959224560
Dynamic modules: auto/module script.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6246
diff
changeset
|
155 ngx_all_srcs="$ngx_all_srcs $MISC_SRCS" |
1949 | 156 |
157 | |
489 | 158 if test -n "$NGX_ADDON_SRCS"; then |
159 | |
160 cat << END >> $NGX_MAKEFILE | |
161 | |
541 | 162 ADDON_DEPS = \$(CORE_DEPS) $NGX_ADDON_DEPS |
489 | 163 |
164 END | |
165 | |
166 fi | |
167 | |
168 | |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
169 # nginx |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
170 |
455 | 171 ngx_all_srcs=`echo $ngx_all_srcs | sed -e "s/\//$ngx_regex_dirsep/g"` |
489 | 172 |
173 for ngx_src in $NGX_ADDON_SRCS | |
174 do | |
175 ngx_obj="addon/`basename \`dirname $ngx_src\``" | |
176 | |
177 test -d $NGX_OBJS/$ngx_obj || mkdir -p $NGX_OBJS/$ngx_obj | |
178 | |
179 ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \ | |
180 | sed -e "s/\//$ngx_regex_dirsep/g"` | |
181 | |
182 ngx_all_srcs="$ngx_all_srcs $ngx_obj" | |
183 done | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
267
diff
changeset
|
184 |
455 | 185 ngx_all_objs=`echo $ngx_all_srcs \ |
665 | 186 | sed -e "s#\([^ ]*\.\)cpp#$NGX_OBJS\/\1$ngx_objext#g" \ |
187 -e "s#\([^ ]*\.\)cc#$NGX_OBJS\/\1$ngx_objext#g" \ | |
188 -e "s#\([^ ]*\.\)c#$NGX_OBJS\/\1$ngx_objext#g" \ | |
189 -e "s#\([^ ]*\.\)S#$NGX_OBJS\/\1$ngx_objext#g"` | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
190 |
489 | 191 ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"` |
192 | |
455 | 193 ngx_modules_obj=`echo $ngx_modules_c | sed -e "s/\(.*\.\)c/\1$ngx_objext/"` |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
267
diff
changeset
|
194 |
461 | 195 |
196 if test -n "$NGX_RES"; then | |
197 ngx_res=$NGX_RES | |
198 else | |
199 ngx_res="$NGX_RC $NGX_ICONS" | |
200 ngx_rcc=`echo $NGX_RCC | sed -e "s/\//$ngx_regex_dirsep/g"` | |
201 fi | |
202 | |
203 ngx_deps=`echo $ngx_all_objs $ngx_modules_obj $ngx_res $LINK_DEPS \ | |
455 | 204 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ |
205 -e "s/\//$ngx_regex_dirsep/g"` | |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
206 |
455 | 207 ngx_objs=`echo $ngx_all_objs $ngx_modules_obj \ |
573 | 208 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_long_regex_cont\1/g" \ |
455 | 209 -e "s/\//$ngx_regex_dirsep/g"` |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
210 |
6383 | 211 ngx_libs= |
667 | 212 if test -n "$NGX_LD_OPT$CORE_LIBS"; then |
213 ngx_libs=`echo $NGX_LD_OPT $CORE_LIBS \ | |
214 | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"` | |
215 fi | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
267
diff
changeset
|
216 |
455 | 217 ngx_link=${CORE_LINK:+`echo $CORE_LINK \ |
573 | 218 | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`} |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
219 |
6383 | 220 ngx_main_link=${MAIN_LINK:+`echo $MAIN_LINK \ |
221 | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`} | |
222 | |
461 | 223 |
455 | 224 cat << END >> $NGX_MAKEFILE |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
225 |
6408
cfc3cfa434ec
Configure: added "build" target.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
226 build: binary modules manpage |
cfc3cfa434ec
Configure: added "build" target.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
227 |
6424 | 228 binary: $NGX_OBJS${ngx_dirsep}nginx$ngx_binext |
6408
cfc3cfa434ec
Configure: added "build" target.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6383
diff
changeset
|
229 |
6424 | 230 $NGX_OBJS${ngx_dirsep}nginx$ngx_binext: $ngx_deps$ngx_spacer |
231 \$(LINK) $ngx_long_start$ngx_binout$NGX_OBJS${ngx_dirsep}nginx$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_main_link | |
461 | 232 $ngx_rcc |
6424 | 233 $ngx_long_end |
6383 | 234 |
235 modules: | |
455 | 236 END |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
237 |
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
238 |
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
239 # ngx_modules.c |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
240 |
455 | 241 if test -n "$NGX_PCH"; then |
242 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" | |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
243 else |
455 | 244 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS)" |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
245 fi |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
246 |
455 | 247 cat << END >> $NGX_MAKEFILE |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
248 |
455 | 249 $ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c |
561 | 250 $ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c$NGX_AUX |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
251 |
455 | 252 END |
253 | |
254 | |
255 # the core sources | |
256 | |
257 for ngx_src in $CORE_SRCS | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
258 do |
455 | 259 ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` |
260 ngx_obj=`echo $ngx_src \ | |
665 | 261 | sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \ |
262 -e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
263 -e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
264 -e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"` | |
455 | 265 |
266 cat << END >> $NGX_MAKEFILE | |
267 | |
268 $ngx_obj: \$(CORE_DEPS)$ngx_cont$ngx_src | |
561 | 269 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX |
455 | 270 |
271 END | |
272 | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
273 done |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
274 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
275 |
455 | 276 # the http sources |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
277 |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
278 if [ $HTTP = YES ]; then |
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
279 |
455 | 280 if test -n "$NGX_PCH"; then |
281 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" | |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
282 else |
455 | 283 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(HTTP_INCS)" |
6419 | 284 ngx_perl_cc="\$(CC) $ngx_compile_opt \$(NGX_PERL_CFLAGS)" |
681 | 285 ngx_perl_cc="$ngx_perl_cc \$(CORE_INCS) \$(HTTP_INCS)" |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
286 fi |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
287 |
681 | 288 for ngx_source in $HTTP_SRCS |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
289 do |
681 | 290 ngx_src=`echo $ngx_source | sed -e "s/\//$ngx_regex_dirsep/g"` |
455 | 291 ngx_obj=`echo $ngx_src \ |
665 | 292 | sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \ |
293 -e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
294 -e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
295 -e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"` | |
455 | 296 |
681 | 297 if [ $ngx_source = src/http/modules/perl/ngx_http_perl_module.c ]; then |
298 | |
299 cat << END >> $NGX_MAKEFILE | |
300 | |
301 $ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src | |
302 $ngx_perl_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX | |
303 | |
304 END | |
305 else | |
306 | |
307 cat << END >> $NGX_MAKEFILE | |
455 | 308 |
309 $ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src | |
561 | 310 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX |
455 | 311 |
312 END | |
681 | 313 |
314 fi | |
455 | 315 done |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
316 |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
317 fi |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
318 |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
319 |
1136 | 320 # the mail sources |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
321 |
1136 | 322 if [ $MAIL = YES ]; then |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
323 |
455 | 324 if test -n "$NGX_PCH"; then |
325 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" | |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
326 else |
1136 | 327 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(MAIL_INCS)" |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
328 fi |
280
7c7183b3ea8b
nginx-0.0.2-2004-03-05-11:34:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
329 |
1136 | 330 for ngx_src in $MAIL_SRCS |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
331 do |
455 | 332 ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` |
333 ngx_obj=`echo $ngx_src \ | |
665 | 334 | sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \ |
335 -e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
336 -e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
337 -e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"` | |
455 | 338 |
339 cat << END >> $NGX_MAKEFILE | |
340 | |
1136 | 341 $ngx_obj: \$(CORE_DEPS) \$(MAIL_DEPS)$ngx_cont$ngx_src |
561 | 342 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX |
455 | 343 |
344 END | |
489 | 345 done |
455 | 346 |
489 | 347 fi |
348 | |
349 | |
6115 | 350 # the stream sources |
351 | |
352 if [ $STREAM = YES ]; then | |
353 | |
354 if test -n "$NGX_PCH"; then | |
355 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" | |
356 else | |
357 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(STREAM_INCS)" | |
358 fi | |
359 | |
360 for ngx_src in $STREAM_SRCS | |
361 do | |
362 ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` | |
363 ngx_obj=`echo $ngx_src \ | |
364 | sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
365 -e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
366 -e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
367 -e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"` | |
368 | |
369 cat << END >> $NGX_MAKEFILE | |
370 | |
371 $ngx_obj: \$(CORE_DEPS) \$(STREAM_DEPS)$ngx_cont$ngx_src | |
372 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX | |
373 | |
374 END | |
375 done | |
376 | |
377 fi | |
378 | |
379 | |
1949 | 380 # the misc sources |
381 | |
6382
392959224560
Dynamic modules: auto/module script.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6246
diff
changeset
|
382 if test -n "$MISC_SRCS"; then |
1949 | 383 |
384 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" | |
385 | |
6382
392959224560
Dynamic modules: auto/module script.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6246
diff
changeset
|
386 for ngx_src in $MISC_SRCS |
1949 | 387 do |
388 ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` | |
389 ngx_obj=`echo $ngx_src \ | |
390 | sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
391 -e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
392 -e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
393 -e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"` | |
394 | |
395 cat << END >> $NGX_MAKEFILE | |
396 | |
397 $ngx_obj: \$(CORE_DEPS) $ngx_cont$ngx_src | |
398 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX | |
399 | |
400 END | |
401 done | |
402 | |
403 fi | |
404 | |
405 | |
489 | 406 # the addons sources |
407 | |
408 if test -n "$NGX_ADDON_SRCS"; then | |
409 | |
410 ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" | |
411 | |
412 for ngx_src in $NGX_ADDON_SRCS | |
413 do | |
414 ngx_obj="addon/`basename \`dirname $ngx_src\``" | |
415 | |
416 ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \ | |
417 | sed -e "s/\//$ngx_regex_dirsep/g"` | |
418 | |
419 ngx_obj=`echo $ngx_obj \ | |
665 | 420 | sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \ |
421 -e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
422 -e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
423 -e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"` | |
489 | 424 |
425 ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` | |
426 | |
427 cat << END >> $NGX_MAKEFILE | |
428 | |
429 $ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src | |
561 | 430 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX |
489 | 431 |
432 END | |
455 | 433 done |
417
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
434 |
0526206251f6
nginx-0.0.10-2004-09-07-19:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
297
diff
changeset
|
435 fi |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
436 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
437 |
593 | 438 # the addons config.make |
439 | |
6416
35487ea55cb6
Dynamic modules: make sure to call config.make for dynamic addons.
Ruslan Ermilov <ru@nginx.com>
parents:
6408
diff
changeset
|
440 if test -n "$NGX_ADDONS$DYNAMIC_ADDONS"; then |
593 | 441 |
6416
35487ea55cb6
Dynamic modules: make sure to call config.make for dynamic addons.
Ruslan Ermilov <ru@nginx.com>
parents:
6408
diff
changeset
|
442 for ngx_addon_dir in $NGX_ADDONS $DYNAMIC_ADDONS |
593 | 443 do |
444 if test -f $ngx_addon_dir/config.make; then | |
445 . $ngx_addon_dir/config.make | |
446 fi | |
447 done | |
448 fi | |
449 | |
450 | |
461 | 451 # Win32 resource file |
452 | |
453 if test -n "$NGX_RES"; then | |
454 | |
455 ngx_res=`echo "$NGX_RES: $NGX_RC $NGX_ICONS" \ | |
456 | sed -e "s/\//$ngx_regex_dirsep/g"` | |
457 ngx_rcc=`echo $NGX_RCC | sed -e "s/\//$ngx_regex_dirsep/g"` | |
458 | |
459 cat << END >> $NGX_MAKEFILE | |
460 | |
461 $ngx_res | |
462 $ngx_rcc | |
463 | |
464 END | |
465 | |
466 fi | |
467 | |
468 | |
455 | 469 # the precompiled headers |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
470 |
455 | 471 if test -n "$NGX_PCH"; then |
469 | 472 echo "#include <ngx_config.h>" > $NGX_OBJS/ngx_pch.c |
455 | 473 |
469 | 474 ngx_pch="src/core/ngx_config.h $OS_CONFIG $NGX_OBJS/ngx_auto_config.h" |
455 | 475 ngx_pch=`echo "$NGX_PCH: $ngx_pch" | sed -e "s/\//$ngx_regex_dirsep/g"` |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
476 |
455 | 477 ngx_src="\$(CC) \$(CFLAGS) $NGX_BUILD_PCH $ngx_compile_opt \$(ALL_INCS)" |
469 | 478 ngx_src="$ngx_src $ngx_objout$NGX_OBJS/ngx_pch.obj $NGX_OBJS/ngx_pch.c" |
455 | 479 ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` |
480 | |
481 cat << END >> $NGX_MAKEFILE | |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
482 |
455 | 483 $ngx_pch |
484 $ngx_src | |
485 | |
486 END | |
487 | |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
488 fi |
6383 | 489 |
490 | |
491 # dynamic modules | |
492 | |
493 if test -n "$NGX_PCH"; then | |
494 ngx_cc="\$(CC) $ngx_compile_opt $ngx_pic_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" | |
495 else | |
496 ngx_cc="\$(CC) $ngx_compile_opt $ngx_pic_opt \$(CFLAGS) \$(ALL_INCS)" | |
6419 | 497 ngx_perl_cc="\$(CC) $ngx_compile_opt $ngx_pic_opt \$(NGX_PERL_CFLAGS)" |
498 ngx_perl_cc="$ngx_perl_cc \$(ALL_INCS)" | |
6383 | 499 fi |
500 | |
501 ngx_obj_deps="\$(CORE_DEPS)" | |
502 if [ $HTTP != NO ]; then | |
503 ngx_obj_deps="$ngx_obj_deps \$(HTTP_DEPS)" | |
504 fi | |
505 if [ $MAIL != NO ]; then | |
506 ngx_obj_deps="$ngx_obj_deps \$(MAIL_DEPS)" | |
507 fi | |
508 if [ $STREAM != NO ]; then | |
509 ngx_obj_deps="$ngx_obj_deps \$(STREAM_DEPS)" | |
510 fi | |
511 | |
512 for ngx_module in $DYNAMIC_MODULES | |
513 do | |
514 eval ngx_module_srcs="\$${ngx_module}_SRCS" | |
515 eval eval ngx_module_libs="\\\"\$${ngx_module}_LIBS\\\"" | |
516 | |
517 eval ngx_module_modules="\$${ngx_module}_MODULES" | |
518 eval ngx_module_order="\$${ngx_module}_ORDER" | |
519 | |
520 ngx_modules_c=$NGX_OBJS/${ngx_module}_modules.c | |
521 | |
522 cat << END > $ngx_modules_c | |
523 | |
524 #include <ngx_config.h> | |
525 #include <ngx_core.h> | |
526 | |
527 END | |
528 | |
529 for mod in $ngx_module_modules | |
530 do | |
531 echo "extern ngx_module_t $mod;" >> $ngx_modules_c | |
532 done | |
533 | |
534 echo >> $ngx_modules_c | |
535 echo 'ngx_module_t *ngx_modules[] = {' >> $ngx_modules_c | |
536 | |
537 for mod in $ngx_module_modules | |
538 do | |
539 echo " &$mod," >> $ngx_modules_c | |
540 done | |
541 | |
542 cat << END >> $ngx_modules_c | |
543 NULL | |
544 }; | |
545 | |
546 END | |
547 | |
548 echo 'char *ngx_module_names[] = {' >> $ngx_modules_c | |
549 | |
550 for mod in $ngx_module_modules | |
551 do | |
552 echo " \"$mod\"," >> $ngx_modules_c | |
553 done | |
554 | |
555 cat << END >> $ngx_modules_c | |
556 NULL | |
557 }; | |
558 | |
559 END | |
560 | |
561 echo 'char *ngx_module_order[] = {' >> $ngx_modules_c | |
562 | |
563 for mod in $ngx_module_order | |
564 do | |
565 echo " \"$mod\"," >> $ngx_modules_c | |
566 done | |
567 | |
568 cat << END >> $ngx_modules_c | |
569 NULL | |
570 }; | |
571 | |
572 END | |
573 | |
574 ngx_modules_c=`echo $ngx_modules_c | sed -e "s/\//$ngx_regex_dirsep/g"` | |
575 | |
576 ngx_modules_obj=`echo $ngx_modules_c \ | |
577 | sed -e "s/\(.*\.\)c/\1$ngx_objext/"` | |
578 | |
579 ngx_module_objs= | |
580 for ngx_src in $ngx_module_srcs | |
581 do | |
582 case "$ngx_src" in | |
583 src/*) | |
584 ngx_obj=$ngx_src | |
585 ;; | |
586 *) | |
587 ngx_obj="addon/`basename \`dirname $ngx_src\``" | |
588 mkdir -p $NGX_OBJS/$ngx_obj | |
589 ngx_obj="$ngx_obj/`basename $ngx_src`" | |
590 ;; | |
591 esac | |
592 | |
593 ngx_module_objs="$ngx_module_objs $ngx_obj" | |
594 done | |
595 | |
596 ngx_module_objs=`echo $ngx_module_objs \ | |
597 | sed -e "s#\([^ ]*\.\)cpp#$NGX_OBJS\/\1$ngx_objext#g" \ | |
598 -e "s#\([^ ]*\.\)cc#$NGX_OBJS\/\1$ngx_objext#g" \ | |
599 -e "s#\([^ ]*\.\)c#$NGX_OBJS\/\1$ngx_objext#g" \ | |
600 -e "s#\([^ ]*\.\)S#$NGX_OBJS\/\1$ngx_objext#g"` | |
601 | |
602 ngx_deps=`echo $ngx_module_objs $ngx_modules_obj $LINK_DEPS \ | |
603 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ | |
604 -e "s/\//$ngx_regex_dirsep/g"` | |
605 | |
606 ngx_objs=`echo $ngx_module_objs $ngx_modules_obj \ | |
607 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_long_regex_cont\1/g" \ | |
608 -e "s/\//$ngx_regex_dirsep/g"` | |
609 | |
6424 | 610 ngx_obj=$NGX_OBJS$ngx_dirsep$ngx_module$ngx_modext |
6383 | 611 |
612 if [ "$NGX_PLATFORM" = win32 ]; then | |
613 ngx_module_libs="$CORE_LIBS $ngx_module_libs" | |
614 fi | |
615 | |
616 ngx_libs= | |
617 if test -n "$NGX_LD_OPT$ngx_module_libs"; then | |
618 ngx_libs=`echo $NGX_LD_OPT $ngx_module_libs \ | |
619 | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"` | |
620 fi | |
621 | |
622 ngx_link=${CORE_LINK:+`echo $CORE_LINK \ | |
623 | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`} | |
624 | |
625 ngx_module_link=${MODULE_LINK:+`echo $MODULE_LINK \ | |
626 | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`} | |
627 | |
628 | |
629 cat << END >> $NGX_MAKEFILE | |
630 | |
631 modules: $ngx_obj | |
632 | |
633 $ngx_obj: $ngx_deps$ngx_spacer | |
634 \$(LINK) $ngx_long_start$ngx_binout$ngx_obj$ngx_long_cont$ngx_objs$ngx_libs$ngx_link$ngx_module_link | |
635 $ngx_long_end | |
636 | |
637 $ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c | |
638 $ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c$NGX_AUX | |
639 | |
640 END | |
641 | |
6419 | 642 for ngx_source in $ngx_module_srcs |
6383 | 643 do |
6419 | 644 case "$ngx_source" in |
6383 | 645 src/*) |
6419 | 646 ngx_obj=`echo $ngx_source | sed -e "s/\//$ngx_regex_dirsep/g"` |
6383 | 647 ;; |
648 *) | |
6419 | 649 ngx_obj="addon/`basename \`dirname $ngx_source\``" |
650 ngx_obj=`echo $ngx_obj/\`basename $ngx_source\` \ | |
6383 | 651 | sed -e "s/\//$ngx_regex_dirsep/g"` |
652 ;; | |
653 esac | |
654 | |
655 ngx_obj=`echo $ngx_obj \ | |
656 | sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
657 -e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
658 -e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \ | |
659 -e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"` | |
660 | |
6419 | 661 ngx_src=`echo $ngx_source | sed -e "s/\//$ngx_regex_dirsep/g"` |
662 | |
663 if [ $ngx_source = src/http/modules/perl/ngx_http_perl_module.c ]; then | |
664 | |
665 cat << END >> $NGX_MAKEFILE | |
6383 | 666 |
6419 | 667 $ngx_obj: $ngx_obj_deps$ngx_cont$ngx_src |
668 $ngx_perl_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX | |
669 | |
670 END | |
671 else | |
672 | |
673 cat << END >> $NGX_MAKEFILE | |
6383 | 674 |
675 $ngx_obj: $ngx_obj_deps$ngx_cont$ngx_src | |
676 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX | |
677 | |
678 END | |
679 | |
6419 | 680 fi |
6383 | 681 done |
682 done |