]> git.sesse.net Git - vlc/blob - contrib/src/upnp/rules.mak
intf: WebVTT extensions detection
[vlc] / contrib / src / upnp / rules.mak
1 # UPNP
2 UPNP_VERSION := 1.6.18
3 UPNP_URL := $(SF)/pupnp/libupnp-$(UPNP_VERSION).tar.bz2
4
5 ifdef BUILD_NETWORK
6 PKGS += upnp
7 endif
8
9 $(TARBALLS)/libupnp-$(UPNP_VERSION).tar.bz2:
10         $(call download,$(UPNP_URL))
11
12 .sum-upnp: libupnp-$(UPNP_VERSION).tar.bz2
13
14 ifdef HAVE_WIN32
15 DEPS_upnp += pthreads $(DEPS_pthreads)
16 LIBUPNP_ECFLAGS = -DPTW32_STATIC_LIB
17 endif
18
19 upnp: libupnp-$(UPNP_VERSION).tar.bz2 .sum-upnp
20         $(UNPACK)
21 ifdef HAVE_WIN32
22         $(APPLY) $(SRC)/upnp/libupnp-configure.patch
23         $(APPLY) $(SRC)/upnp/libupnp-win32.patch
24         $(APPLY) $(SRC)/upnp/libupnp-win64.patch
25 endif
26         $(APPLY) $(SRC)/upnp/libupnp-ipv6.patch
27         $(APPLY) $(SRC)/upnp/miniserver.patch
28         $(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub build-aux/
29         $(MOVE)
30
31 .upnp: upnp
32 ifdef HAVE_WIN32
33         $(RECONF)
34 endif
35         cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -DUPNP_STATIC_LIB $(LIBUPNP_ECFLAGS)" ./configure --disable-samples --without-documentation --enable-ipv6 $(HOSTCONF)
36         cd $< && $(MAKE) install
37         touch $@