1 2VER = $(shell grep 'define NGINX_VERSION' src/core/nginx.h \ 3 | sed -e 's/^.*"\(.*\)".*/\1/') 4NGINX = nginx-$(VER) 5TEMP = tmp 6 7CC = cl 8OBJS = objs.msvc8 9OPENSSL = openssl-1.0.2k 10ZLIB = zlib-1.2.11 11PCRE = pcre-8.40 12 13 14release: export 15 16 mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX) 17 18 # delete incomplete sources 19 rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c 20 rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c 21 rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.* 22 rm -r $(TEMP)/$(NGINX)/src/os/win32 23 24 mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX) 25 mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX) 26 mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX) 27 mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX) 28 29 $(MAKE) -f docs/GNUmakefile changes 30 31 rm -r $(TEMP)/$(NGINX)/docs 32 rm -r $(TEMP)/$(NGINX)/misc 33 34 tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX) 35 36 37export: 38 rm -rf $(TEMP) 39 hg archive -X '.hg*' $(TEMP)/$(NGINX) 40 41 42RELEASE: 43 hg ci -m nginx-$(VER)-RELEASE 44 hg tag -m "release-$(VER) tag" release-$(VER) 45 46 $(MAKE) -f misc/GNUmakefile release 47 48 49win32: 50 ./auto/configure \ 51 --with-cc=$(CC) \ 52 --builddir=$(OBJS) \ 53 --with-debug \ 54 --prefix= \ 55 --conf-path=conf/nginx.conf \ 56 --pid-path=logs/nginx.pid \ 57 --http-log-path=logs/access.log \ 58 --error-log-path=logs/error.log \ 59 --sbin-path=nginx.exe \ 60 --http-client-body-temp-path=temp/client_body_temp \ 61 --http-proxy-temp-path=temp/proxy_temp \ 62 --http-fastcgi-temp-path=temp/fastcgi_temp \ 63 --http-scgi-temp-path=temp/scgi_temp \ 64 --http-uwsgi-temp-path=temp/uwsgi_temp \ 65 --with-cc-opt=-DFD_SETSIZE=1024 \ 66 --with-pcre=$(OBJS)/lib/$(PCRE) \ 67 --with-zlib=$(OBJS)/lib/$(ZLIB) \ 68 --with-select_module \ 69 --with-http_realip_module \ 70 --with-http_addition_module \ 71 --with-http_sub_module \ 72 --with-http_dav_module \ 73 --with-http_stub_status_module \ 74 --with-http_flv_module \ 75 --with-http_mp4_module \ 76 --with-http_gunzip_module \ 77 --with-http_gzip_static_module \ 78 --with-http_auth_request_module \ 79 --with-http_random_index_module \ 80 --with-http_secure_link_module \ 81 --with-http_slice_module \ 82 --with-mail \ 83 --with-stream \ 84 --with-openssl=$(OBJS)/lib/$(OPENSSL) \ 85 --with-openssl-opt=no-asm \ 86 --with-http_ssl_module \ 87 --with-mail_ssl_module \ 88 --with-stream_ssl_module 89 90 91zip: export 92 rm -f $(NGINX).zip 93 94 mkdir -p $(TEMP)/$(NGINX)/docs.new 95 mkdir -p $(TEMP)/$(NGINX)/logs 96 mkdir -p $(TEMP)/$(NGINX)/temp 97 98 sed -i '' -e "s/$$/`printf '\r'`/" $(TEMP)/$(NGINX)/conf/* 99 100 mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)/docs.new 101 mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)/docs.new 102 mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX) 103 104 rm -r $(TEMP)/$(NGINX)/docs 105 mv $(TEMP)/$(NGINX)/docs.new $(TEMP)/$(NGINX)/docs 106 107 cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX) 108 109 $(MAKE) -f docs/GNUmakefile changes 110 mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/ 111 112 cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \ 113 $(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE 114 115 cp -p $(OBJS)/lib/$(PCRE)/LICENCE \ 116 $(TEMP)/$(NGINX)/docs/PCRE.LICENCE 117 118 sed -ne '/^ (C) 1995-20/,/^ jloup@gzip\.org/p' \ 119 $(OBJS)/lib/$(ZLIB)/README \ 120 > $(TEMP)/$(NGINX)/docs/zlib.LICENSE 121 122 touch -r $(OBJS)/lib/$(ZLIB)/README \ 123 $(TEMP)/$(NGINX)/docs/zlib.LICENSE 124 125 rm -r $(TEMP)/$(NGINX)/auto 126 rm -r $(TEMP)/$(NGINX)/misc 127 rm -r $(TEMP)/$(NGINX)/src 128 129 cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX) 130 131 132icons: src/os/win32/nginx.ico 133 134# 48x48, 32x32 and 16x16 icons 135 136src/os/win32/nginx.ico: src/os/win32/nginx_icon48.xpm \ 137 src/os/win32/nginx_icon32.xpm \ 138 src/os/win32/nginx_icon16.xpm 139 140 test -d $(TEMP) || mkdir $(TEMP) 141 142 xpmtoppm --alphaout=$(TEMP)/nginx48.pbm \ 143 src/os/win32/nginx_icon48.xpm > $(TEMP)/nginx48.ppm 144 145 xpmtoppm --alphaout=$(TEMP)/nginx32.pbm \ 146 src/os/win32/nginx_icon32.xpm > $(TEMP)/nginx32.ppm 147 148 xpmtoppm --alphaout=$(TEMP)/nginx16.pbm \ 149 src/os/win32/nginx_icon16.xpm > $(TEMP)/nginx16.ppm 150 151 ppmtowinicon -output src/os/win32/nginx.ico -andpgms \ 152 $(TEMP)/nginx48.ppm $(TEMP)/nginx48.pbm \ 153 $(TEMP)/nginx32.ppm $(TEMP)/nginx32.pbm \ 154 $(TEMP)/nginx16.ppm $(TEMP)/nginx16.pbm 155