66# The MIT License apply.
77#
88
9- #
10- # Choose your weapons:
11- # Set 'USE_CYTHON=1' to build and install the 'nghttp2.pyd' Python extension.
12- #
139THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
1410
15- USE_CYTHON := 0
16- #USE_CYTHON := 1
17-
1811_VERSION := $(shell grep AC_INIT ../configure.ac | cut -d'[' -f3 | sed -e 's/-DEV//g' -e 's/], //g')
1912_VERSION := $(subst ., ,$(_VERSION))
2013VER_MAJOR := $(word 1,$(_VERSION))
@@ -102,7 +95,7 @@ NGHTTP2_OBJ_D := $(addprefix $(OBJ_DIR)/d_, $(notdir $(NGHTTP2_SRC:.c=.obj)))
10295 clean_nghttp2_pyd_0 clean_nghttp2_pyd_1
10396
10497
105- all: intro includes/nghttp2/nghttp2ver.h $(OBJ_DIR) $(TARGETS) build_nghttp2_pyd_$(USE_CYTHON)
98+ all: intro includes/nghttp2/nghttp2ver.h $(OBJ_DIR) $(TARGETS)
10699 @echo 'Welcome to NgHTTP2 (release + debug).'
107100 @echo 'Do a "make -f Makefile.MSVC install" at own risk!'
108101
@@ -121,7 +114,7 @@ $(OBJ_DIR):
121114
122115install: includes/nghttp2/nghttp2.h includes/nghttp2/nghttp2ver.h \
123116 $(TARGETS) \
124- copy_headers_and_libs install_nghttp2_pyd_$(USE_CYTHON)
117+ copy_headers_and_libs
125118
126119#
127120# This MUST be done before using the 'install_nghttp2_pyd_1' rule.
@@ -160,31 +153,6 @@ $(DLL_D): $(NGHTTP2_OBJ_D) $(OBJ_DIR)/d_nghttp2.res
160153WIN_OBJDIR:=$(shell cygpath -w $(abspath $(OBJ_DIR)))
161154WIN_OBJDIR:=$(subst \,/,$(WIN_OBJDIR))
162155
163- ../python/setup.py: ../python/setup.py.in $(THIS_MAKEFILE)
164- cd ../python ; \
165- echo '# $(GENERATED). DO NOT EDIT.' > setup.py ; \
166- sed -e 's/@top_srcdir@/../' \
167- -e 's%@top_builddir@%$(WIN_OBJDIR)%' \
168- -e 's/@PACKAGE_VERSION@/$(VERSION)/' setup.py.in >> setup.py ;
169-
170- build_nghttp2_pyd_0: ;
171-
172- build_nghttp2_pyd_1: $(addprefix ../python/, setup.py nghttp2.pyx)
173- cd ../python ; \
174- python setup.py build_ext -i -f bdist_wininst
175-
176- install_nghttp2_pyd_0: ;
177-
178- install_nghttp2_pyd_1: $(addprefix ../python/, setup.py nghttp2.pyx)
179- cd ../python ; \
180- pip install .
181-
182- clean_nghttp2_pyd_0: ;
183-
184- clean_nghttp2_pyd_1:
185- cd ../python ; \
186- rm -fR build dist
187-
188156$(OBJ_DIR)/r_%.obj: %.c $(THIS_MAKEFILE)
189157 $(CC) $(CFLAGS_R) $(CFLAGS) -Fo$@ -c $<
190158 @echo
@@ -262,7 +230,7 @@ clean:
262230 rm -f $(OBJ_DIR)/* includes/nghttp2/nghttp2ver.h
263231 @echo
264232
265- vclean realclean: clean clean_nghttp2_pyd_$(USE_CYTHON)
233+ vclean realclean: clean
266234 - rm -rf $(OBJ_DIR)
267235 - rm -f .depend.MSVC
268236
0 commit comments