rules.mak 703 Bytes
Newer Older
Konstantin Pavlov's avatar
Konstantin Pavlov committed
1
2
3
4
5
6
7
8
9
10
# UPNP
UPNP_VERSION := 1.6.13
UPNP_URL := $(SF)/pupnp/libupnp-$(UPNP_VERSION).tar.bz2

$(TARBALLS)/libupnp-$(UPNP_VERSION).tar.bz2:
	$(call download,$(UPNP_URL))

.sum-upnp: libupnp-$(UPNP_VERSION).tar.bz2

ifdef HAVE_WIN32
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
11
12
DEPS_upnp += pthreads $(DEPS_pthreads)
LIBUPNP_ECFLAGS = -DPTW32_STATIC_LIB
Konstantin Pavlov's avatar
Konstantin Pavlov committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
endif

upnp: libupnp-$(UPNP_VERSION).tar.bz2 .sum-upnp
	$(UNPACK)
ifdef HAVE_WIN32
	$(APPLY) $(SRC)/upnp/libupnp-configure.patch
	$(APPLY) $(SRC)/upnp/libupnp-win32.patch
endif
	$(MOVE)

.upnp: upnp
	cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -O3 -DUPNP_STATIC_LIB $(LIBUPNP_ECFLAGS)" ./configure --disable-samples --without-documentation --disable-webserver $(HOSTCONF)
	cd $< && $(MAKE) install
	touch $@