comparison auto/lib/zlib/make @ 5360:3d2d3e1cf427

Win32: MinGW GCC compatibility. Several warnings silenced, notably (ngx_socket_t) -1 is now checked on socket operations instead of -1, as ngx_socket_t is unsigned on win32 and gcc complains on comparison. With this patch, it's now possible to compile nginx using mingw gcc, with options we normally compile on win32.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 Sep 2013 20:48:28 +0400
parents d620f497c50f
children 78f8ac479735
comparison
equal deleted inserted replaced
5359:2fda9065d0f4 5360:3d2d3e1cf427
22 ngx_makefile=makefile.bcc 22 ngx_makefile=makefile.bcc
23 ngx_opt="-DCPU_OPT=\"$CPU_OPT\"" 23 ngx_opt="-DCPU_OPT=\"$CPU_OPT\""
24 ngx_zlib=`echo \-DZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"` 24 ngx_zlib=`echo \-DZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"`
25 ;; 25 ;;
26 26
27 *)
28 ngx_makefile=
29 ;;
30
27 esac 31 esac
28 32
29 33
30 done=NO 34 done=NO
31 35
32 36
33 case "$NGX_PLATFORM" in 37 case "$NGX_PLATFORM" in
34 38
35 win32) 39 win32)
36 cat << END >> $NGX_MAKEFILE 40
41 if [ -n "$ngx_makefile" ]; then
42 cat << END >> $NGX_MAKEFILE
37 43
38 `echo "$ZLIB/zlib.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"` 44 `echo "$ZLIB/zlib.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
39 \$(MAKE) -f auto/lib/zlib/$ngx_makefile $ngx_opt $ngx_zlib 45 \$(MAKE) -f auto/lib/zlib/$ngx_makefile $ngx_opt $ngx_zlib
40 46
41 END 47 END
48
49 else
50
51 cat << END >> $NGX_MAKEFILE
52
53 $ZLIB/libz.a: $NGX_MAKEFILE
54 cd $ZLIB \\
55 && \$(MAKE) distclean \\
56 && \$(MAKE) -f win32/Makefile.gcc \\
57 CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
58 libz.a
59
60 END
61
62 fi
42 63
43 done=YES 64 done=YES
44 ;; 65 ;;
45 66
46 # FreeBSD: i386 67 # FreeBSD: i386