nginx/misc/GNUmakefile

149 lines
3.9 KiB
Makefile
Raw Normal View History

2009-04-20 14:08:47 +08:00
VER = $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
| sed -e 's/^.*"\(.*\)".*/\1/')
2009-04-20 14:08:47 +08:00
NGINX = nginx-$(VER)
TEMP = tmp
CC = cl
2009-04-20 14:08:47 +08:00
OBJS = objs.msvc8
2024-10-01 23:23:45 +08:00
OPENSSL = openssl-3.0.15
ZLIB = zlib-1.3.1
PCRE = pcre2-10.39
release: export
mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
$(MAKE) -f docs/GNUmakefile changes
2006-09-18 20:26:31 +08:00
rm -r $(TEMP)/$(NGINX)/docs
rm -r $(TEMP)/$(NGINX)/misc
tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
2006-09-18 20:26:31 +08:00
export:
rm -rf $(TEMP)
2024-08-29 20:03:58 +08:00
git archive --prefix=$(TEMP)/$(NGINX)/ HEAD | tar -x -f - --exclude '.git*'
RELEASE:
2024-08-29 20:03:58 +08:00
git commit -m nginx-$(VER)-RELEASE
git tag -m "release-$(VER) tag" release-$(VER)
2013-04-25 21:41:45 +08:00
$(MAKE) -f misc/GNUmakefile release
win32:
./auto/configure \
--with-cc=$(CC) \
--builddir=$(OBJS) \
--with-debug \
--prefix= \
--conf-path=conf/nginx.conf \
--pid-path=logs/nginx.pid \
--http-log-path=logs/access.log \
--error-log-path=logs/error.log \
--sbin-path=nginx.exe \
--http-client-body-temp-path=temp/client_body_temp \
--http-proxy-temp-path=temp/proxy_temp \
--http-fastcgi-temp-path=temp/fastcgi_temp \
--http-scgi-temp-path=temp/scgi_temp \
--http-uwsgi-temp-path=temp/uwsgi_temp \
--with-cc-opt=-DFD_SETSIZE=1024 \
--with-pcre=$(OBJS)/lib/$(PCRE) \
--with-zlib=$(OBJS)/lib/$(ZLIB) \
2017-03-21 22:28:15 +08:00
--with-http_v2_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_stub_status_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
2013-08-22 00:46:10 +08:00
--with-http_auth_request_module \
--with-http_random_index_module \
--with-http_secure_link_module \
2015-12-08 01:08:13 +08:00
--with-http_slice_module \
--with-mail \
2015-04-27 23:51:18 +08:00
--with-stream \
--with-stream_realip_module \
--with-stream_ssl_preread_module \
--with-openssl=$(OBJS)/lib/$(OPENSSL) \
--with-openssl-opt="no-asm no-tests -D_WIN32_WINNT=0x0501" \
--with-http_ssl_module \
--with-mail_ssl_module \
--with-stream_ssl_module
2009-04-20 14:08:47 +08:00
zip: export
rm -f $(NGINX).zip
mkdir -p $(TEMP)/$(NGINX)/docs.new
2009-04-20 14:08:47 +08:00
mkdir -p $(TEMP)/$(NGINX)/logs
mkdir -p $(TEMP)/$(NGINX)/temp
sed -i '' -e "s/$$/`printf '\r'`/" $(TEMP)/$(NGINX)/conf/*
2009-04-20 14:08:47 +08:00
2024-08-29 20:03:58 +08:00
mv $(TEMP)/$(NGINX)/LICENSE $(TEMP)/$(NGINX)/docs.new
2024-09-01 13:42:09 +08:00
mv $(TEMP)/$(NGINX)/README.md $(TEMP)/$(NGINX)/docs.new
mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
2009-04-20 14:08:47 +08:00
rm -r $(TEMP)/$(NGINX)/docs
mv $(TEMP)/$(NGINX)/docs.new $(TEMP)/$(NGINX)/docs
2009-04-20 14:08:47 +08:00
cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX)
$(MAKE) -f docs/GNUmakefile changes
2009-04-20 14:08:47 +08:00
mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/
2023-08-15 23:10:50 +08:00
cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE.txt \
2009-04-20 14:08:47 +08:00
$(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE
cp -p $(OBJS)/lib/$(PCRE)/LICENCE \
$(TEMP)/$(NGINX)/docs/PCRE.LICENCE
2009-04-20 14:08:47 +08:00
sed -ne '/^ (C) 1995-20/,/^ jloup@gzip\.org/p' \
2009-04-20 14:08:47 +08:00
$(OBJS)/lib/$(ZLIB)/README \
> $(TEMP)/$(NGINX)/docs/zlib.LICENSE
touch -r $(OBJS)/lib/$(ZLIB)/README \
$(TEMP)/$(NGINX)/docs/zlib.LICENSE
rm -r $(TEMP)/$(NGINX)/auto
rm -r $(TEMP)/$(NGINX)/misc
rm -r $(TEMP)/$(NGINX)/src
2009-04-20 14:08:47 +08:00
cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX)
icons: src/os/win32/nginx.ico
2009-04-21 23:44:39 +08:00
# 48x48, 32x32 and 16x16 icons
2009-04-21 23:44:39 +08:00
src/os/win32/nginx.ico: src/os/win32/nginx_icon48.xpm \
src/os/win32/nginx_icon32.xpm \
src/os/win32/nginx_icon16.xpm
test -d $(TEMP) || mkdir $(TEMP)
2009-04-21 23:44:39 +08:00
xpmtoppm --alphaout=$(TEMP)/nginx48.pbm \
src/os/win32/nginx_icon48.xpm > $(TEMP)/nginx48.ppm
xpmtoppm --alphaout=$(TEMP)/nginx32.pbm \
src/os/win32/nginx_icon32.xpm > $(TEMP)/nginx32.ppm
xpmtoppm --alphaout=$(TEMP)/nginx16.pbm \
src/os/win32/nginx_icon16.xpm > $(TEMP)/nginx16.ppm
ppmtowinicon -output src/os/win32/nginx.ico -andpgms \
2009-04-21 23:44:39 +08:00
$(TEMP)/nginx48.ppm $(TEMP)/nginx48.pbm \
$(TEMP)/nginx32.ppm $(TEMP)/nginx32.pbm \
$(TEMP)/nginx16.ppm $(TEMP)/nginx16.pbm