@@ -22,10 +22,9 @@ cat << END > $NGX_MAKEFILE
2222
2323CC = $CC
2424CFLAGS = $CFLAGS
25- CPP = g++
26- CXX = g++
27- CXXFLAGS = -std=c++11 -Wall
28- LINK = g++
25+ CPP = $CPP
26+ CPPFLAGS = -std=c++11 -Wall
27+ LINK = $LINK
2928
3029END
3130
@@ -315,7 +314,7 @@ $ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src
315314END
316315
317316 fi
318- done
317+ done
319318
320319fi
321320
@@ -345,7 +344,7 @@ $ngx_obj: \$(CORE_DEPS) \$(MAIL_DEPS)$ngx_cont$ngx_src
345344 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
346345
347346END
348- done
347+ done
349348
350349fi
351350
@@ -375,7 +374,7 @@ $ngx_obj: \$(CORE_DEPS) \$(STREAM_DEPS)$ngx_cont$ngx_src
375374 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
376375
377376END
378- done
377+ done
379378
380379fi
381380
@@ -401,7 +400,7 @@ $ngx_obj: \$(CORE_DEPS) $ngx_cont$ngx_src
401400 $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
402401
403402END
404- done
403+ done
405404
406405fi
407406
410409
411410if test -n "$NGX_ADDON_SRCS"; then
412411
413- ngx_cc="\$(CPP) $ngx_compile_opt -std=c++11 -g -O0 \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
414- ngx_cxx="\$(CXX) $ngx_compile_opt \$(CXXFLAGS) $ngx_use_pch ddons sources\$(ALL_INCS)"
415-
412+ ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
413+ ngx_cpp="\$(CPP) $ngx_compile_opt \$(CPPFLAGS) $ngx_use_pch \$(ALL_INCS)"
416414 for ngx_src in $NGX_ADDON_SRCS
417415 do
418416 ngx_obj="addon/`basename \`dirname $ngx_src\``"
@@ -431,7 +429,7 @@ if test -n "$NGX_ADDON_SRCS"; then
431429 ext=`echo ${ngx_src} | cut -d . -f 2`
432430 ngx_gcc=$ngx_cc
433431 if [ $ext = "cpp" ]; then
434- ngx_gcc=$ngc_cxx
432+ ngx_gcc=$ngx_cpp
435433 fi
436434
437435 cat << END >> $NGX_MAKEFILE
@@ -440,7 +438,7 @@ $ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src
440438 $ngx_gcc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
441439
442440END
443- done
441+ done
444442
445443fi
446444
511509for ngx_module in $DYNAMIC_MODULES
512510do
513511 eval ngx_module_srcs="\$${ngx_module}_SRCS"
512+ eval ngx_module_shrd="\$${ngx_module}_SHRD"
514513 eval eval ngx_module_libs="\\\"\$${ngx_module}_LIBS\\\""
515514
516515 eval ngx_module_modules="\$${ngx_module}_MODULES"
576575 | sed -e "s/\(.*\.\)c/\1$ngx_objext/"`
577576
578577 ngx_module_objs=
579- for ngx_src in $ngx_module_srcs
578+ for ngx_src in $ngx_module_srcs $ngx_module_shrd
580579 do
581580 case "$ngx_src" in
582581 src/*)
0 commit comments