GNUmakefile 4.2 KB

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