make (191:19a1691be341) make (216:07257705cd64)
1
2# Copyright (C) Igor Sysoev
3# Copyright (C) Valentin V. Bartenev
4# Copyright (C) NGINX, Inc.
5
6
7$echo "creating $NXT_MAKEFILE"
8

--- 6 unchanged lines hidden (view full) ---

15CC = $CC
16
17CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS
18
19NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT
20NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT
21NXT_MODULE_LINK = $NXT_MODULE_LINK $NXT_LD_OPT
22
1
2# Copyright (C) Igor Sysoev
3# Copyright (C) Valentin V. Bartenev
4# Copyright (C) NGINX, Inc.
5
6
7$echo "creating $NXT_MAKEFILE"
8

--- 6 unchanged lines hidden (view full) ---

15CC = $CC
16
17CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS
18
19NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT
20NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT
21NXT_MODULE_LINK = $NXT_MODULE_LINK $NXT_LD_OPT
22
23.PHONY: $NXT_BIN
24$NXT_BIN: $NXT_BUILD_DIR/$NXT_BIN
25
26all: $NXT_BIN
27
23END
24
25
26# The include paths list.
27
28$echo -n "NXT_LIB_INCS =" >> $NXT_MAKEFILE
29
30for nxt_inc in src $NXT_BUILD_DIR

--- 133 unchanged lines hidden (view full) ---

164done
165
166$echo >> $NXT_MAKEFILE
167$echo >> $NXT_MAKEFILE
168
169
170# Object files list.
171
28END
29
30
31# The include paths list.
32
33$echo -n "NXT_LIB_INCS =" >> $NXT_MAKEFILE
34
35for nxt_inc in src $NXT_BUILD_DIR

--- 133 unchanged lines hidden (view full) ---

169done
170
171$echo >> $NXT_MAKEFILE
172$echo >> $NXT_MAKEFILE
173
174
175# Object files list.
176
172nxt_modules_obj=`$echo $NXT_MODULES_SRC | sed -e "s/\.c$/\.o/"`
173
174$echo "NXT_OBJS = \\" >> $NXT_MAKEFILE
175
177$echo "NXT_OBJS = \\" >> $NXT_MAKEFILE
178
176for nxt_src in $NXT_MAKE_SRCS $NXT_MODULES_SRCS
179for nxt_src in $NXT_MAKE_SRCS
177do
178 nxt_obj=`$echo $nxt_src | sed -e "s/\.c$/\.o/"`
179 $echo " $NXT_BUILD_DIR/$nxt_obj \\" >> $NXT_MAKEFILE
180done
181
180do
181 nxt_obj=`$echo $nxt_src | sed -e "s/\.c$/\.o/"`
182 $echo " $NXT_BUILD_DIR/$nxt_obj \\" >> $NXT_MAKEFILE
183done
184
182$echo " $nxt_modules_obj" >> $NXT_MAKEFILE
183$echo >> $NXT_MAKEFILE
184
185
186# nginext executable.
187
185$echo >> $NXT_MAKEFILE
186
187
188# nginext executable.
189
188NXT_BIN=nginext
189
190cat << END >> $NXT_MAKEFILE
191
192$NXT_BUILD_DIR/$NXT_BIN: $NXT_BUILD_DIR/$NXT_LIB_STATIC \\
193 \$(NXT_OBJS)
194 \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/$NXT_BIN \$(CFLAGS) \\
195 \$(NXT_OBJS) $NXT_BUILD_DIR/$NXT_LIB_STATIC \\
196 $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
197

--- 12 unchanged lines hidden (view full) ---

210 $NXT_LIB_AUX_CFLAGS \\
211 -o $NXT_BUILD_DIR/$nxt_obj \\
212 $nxt_src
213END
214
215done
216
217
190cat << END >> $NXT_MAKEFILE
191
192$NXT_BUILD_DIR/$NXT_BIN: $NXT_BUILD_DIR/$NXT_LIB_STATIC \\
193 \$(NXT_OBJS)
194 \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/$NXT_BIN \$(CFLAGS) \\
195 \$(NXT_OBJS) $NXT_BUILD_DIR/$NXT_LIB_STATIC \\
196 $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
197

--- 12 unchanged lines hidden (view full) ---

210 $NXT_LIB_AUX_CFLAGS \\
211 -o $NXT_BUILD_DIR/$nxt_obj \\
212 $nxt_src
213END
214
215done
216
217
218# nxt_modules.c.
219
220cat << END >> $NXT_MAKEFILE
221
222$nxt_modules_obj: $NXT_MODULES_SRC \$(NXT_DEPS)
223 \$(CC) -c \$(CFLAGS) \$(NXT_INCS) \\
224 $NXT_LIB_AUX_CFLAGS \\
225 -o $nxt_modules_obj \\
226 $NXT_MODULES_SRC
227END
228
229
230if [ $NXT_PYTHON_MODULE != NO ]; then
231 . auto/modules/python/make
232fi
233
234if [ $NXT_PHP_MODULE != NO ]; then
235 . auto/modules/php/make
236fi
237
238if [ $NXT_GO_MODULE != NO ]; then
239 . auto/modules/go/make
240fi
241
242
243# Makefile.
244# *.dSYM is MacOSX Clang debug information.
245
246cat << END > Makefile
247
218# Makefile.
219# *.dSYM is MacOSX Clang debug information.
220
221cat << END > Makefile
222
248.PHONY: $NXT_BIN lib_test
249
250all: $NXT_BIN
251
252include $NXT_MAKEFILE
253
223include $NXT_MAKEFILE
224
225.PHONY: lib_test
226lib_test: $NXT_BUILD_DIR/lib_unit_test $NXT_BUILD_DIR/utf8_file_name_test
254
227
255lib_test: $NXT_BUILD_DIR/lib_unit_test $NXT_BUILD_DIR/utf8_file_name_test
256
257clean:
228clean:
258 rm -rf $NXT_BUILD_DIR *.dSYM Makefile
229 rm -rf $NXT_BUILD_DIR *.dSYM Makefile
259
230
260$NXT_BIN: $NXT_BUILD_DIR/$NXT_BIN
261
262END
231END