]> git.sesse.net Git - vlc/blobdiff - extras/contrib/src/Makefile
Contribs: port libupnp to mingw and make it compile
[vlc] / extras / contrib / src / Makefile
index 04608aa81b37918005f6eda25d3ce4626001a52d..6d6fcd04b57757ad5ed97e352ee8bd675c71034a 100644 (file)
@@ -2407,9 +2407,18 @@ libupnp-$(UPNP_VERSION).tar.bz2:
 
 libupnp: libupnp-$(UPNP_VERSION).tar.bz2
        $(EXTRACT_BZ2)
+       patch -p0 < Patches/libupnp-mingw.patch
+ifdef HAVE_WIN32
+       patch -p0 < Patches/libupnp-configure.patch
+       cd $@; libtoolize&& autoreconf
+endif
+
+ifdef HAVE_WIN32
+LIBUPNP_ECFLAGS=-DPTW32_STATIC_LIB
+endif
 
 .libupnp: libupnp
-       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-samples --without-documentation --disable-webserver CFLAGS="$(CFLAGS) -O3" && make && make install)
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-samples --without-documentation --enable-static --disable-webserver CFLAGS="$(CFLAGS) -O3 -DUPNP_STATIC_LIB $(LIBUPNP_ECFLAGS)" && make && make install)
        touch $@
 
 CLEAN_FILE += .libupnp