GNUmakefile 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. VER = $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
  2. | sed -e 's/^.*"\(.*\)".*/\1/')
  3. NGINX = nginx-$(VER)
  4. TEMP = tmp
  5. CC = cl
  6. OBJS = objs.msvc8
  7. OPENSSL = openssl-1.1.1t
  8. ZLIB = zlib-1.2.13
  9. PCRE = pcre2-10.39
  10. release: export
  11. mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
  12. mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
  13. mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
  14. mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
  15. mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
  16. $(MAKE) -f docs/GNUmakefile changes
  17. rm -r $(TEMP)/$(NGINX)/docs
  18. rm -r $(TEMP)/$(NGINX)/misc
  19. tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
  20. export:
  21. rm -rf $(TEMP)
  22. hg archive -X '.hg*' $(TEMP)/$(NGINX)
  23. RELEASE:
  24. hg ci -m nginx-$(VER)-RELEASE
  25. hg tag -m "release-$(VER) tag" release-$(VER)
  26. $(MAKE) -f misc/GNUmakefile release
  27. win32:
  28. ./auto/configure \
  29. --with-cc=$(CC) \
  30. --builddir=$(OBJS) \
  31. --with-debug \
  32. --prefix= \
  33. --conf-path=conf/nginx.conf \
  34. --pid-path=logs/nginx.pid \
  35. --http-log-path=logs/access.log \
  36. --error-log-path=logs/error.log \
  37. --sbin-path=nginx.exe \
  38. --http-client-body-temp-path=temp/client_body_temp \
  39. --http-proxy-temp-path=temp/proxy_temp \
  40. --http-fastcgi-temp-path=temp/fastcgi_temp \
  41. --http-scgi-temp-path=temp/scgi_temp \
  42. --http-uwsgi-temp-path=temp/uwsgi_temp \
  43. --with-cc-opt=-DFD_SETSIZE=1024 \
  44. --with-pcre=$(OBJS)/lib/$(PCRE) \
  45. --with-zlib=$(OBJS)/lib/$(ZLIB) \
  46. --with-http_v2_module \
  47. --with-http_realip_module \
  48. --with-http_addition_module \
  49. --with-http_sub_module \
  50. --with-http_dav_module \
  51. --with-http_stub_status_module \
  52. --with-http_flv_module \
  53. --with-http_mp4_module \
  54. --with-http_gunzip_module \
  55. --with-http_gzip_static_module \
  56. --with-http_auth_request_module \
  57. --with-http_random_index_module \
  58. --with-http_secure_link_module \
  59. --with-http_slice_module \
  60. --with-mail \
  61. --with-stream \
  62. --with-openssl=$(OBJS)/lib/$(OPENSSL) \
  63. --with-openssl-opt="no-asm no-tests -D_WIN32_WINNT=0x0501" \
  64. --with-http_ssl_module \
  65. --with-mail_ssl_module \
  66. --with-stream_ssl_module
  67. zip: export
  68. rm -f $(NGINX).zip
  69. mkdir -p $(TEMP)/$(NGINX)/docs.new
  70. mkdir -p $(TEMP)/$(NGINX)/logs
  71. mkdir -p $(TEMP)/$(NGINX)/temp
  72. sed -i '' -e "s/$$/`printf '\r'`/" $(TEMP)/$(NGINX)/conf/*
  73. mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)/docs.new
  74. mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)/docs.new
  75. mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
  76. rm -r $(TEMP)/$(NGINX)/docs
  77. mv $(TEMP)/$(NGINX)/docs.new $(TEMP)/$(NGINX)/docs
  78. cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX)
  79. $(MAKE) -f docs/GNUmakefile changes
  80. mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/
  81. cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \
  82. $(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE
  83. cp -p $(OBJS)/lib/$(PCRE)/LICENCE \
  84. $(TEMP)/$(NGINX)/docs/PCRE.LICENCE
  85. sed -ne '/^ (C) 1995-20/,/^ jloup@gzip\.org/p' \
  86. $(OBJS)/lib/$(ZLIB)/README \
  87. > $(TEMP)/$(NGINX)/docs/zlib.LICENSE
  88. touch -r $(OBJS)/lib/$(ZLIB)/README \
  89. $(TEMP)/$(NGINX)/docs/zlib.LICENSE
  90. rm -r $(TEMP)/$(NGINX)/auto
  91. rm -r $(TEMP)/$(NGINX)/misc
  92. rm -r $(TEMP)/$(NGINX)/src
  93. cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX)
  94. icons: src/os/win32/nginx.ico
  95. # 48x48, 32x32 and 16x16 icons
  96. src/os/win32/nginx.ico: src/os/win32/nginx_icon48.xpm \
  97. src/os/win32/nginx_icon32.xpm \
  98. src/os/win32/nginx_icon16.xpm
  99. test -d $(TEMP) || mkdir $(TEMP)
  100. xpmtoppm --alphaout=$(TEMP)/nginx48.pbm \
  101. src/os/win32/nginx_icon48.xpm > $(TEMP)/nginx48.ppm
  102. xpmtoppm --alphaout=$(TEMP)/nginx32.pbm \
  103. src/os/win32/nginx_icon32.xpm > $(TEMP)/nginx32.ppm
  104. xpmtoppm --alphaout=$(TEMP)/nginx16.pbm \
  105. src/os/win32/nginx_icon16.xpm > $(TEMP)/nginx16.ppm
  106. ppmtowinicon -output src/os/win32/nginx.ico -andpgms \
  107. $(TEMP)/nginx48.ppm $(TEMP)/nginx48.pbm \
  108. $(TEMP)/nginx32.ppm $(TEMP)/nginx32.pbm \
  109. $(TEMP)/nginx16.ppm $(TEMP)/nginx16.pbm