zpl: Fix memory leaks
[vlc/gmpfix.git] / contrib / src / mad / rules.mak
blobff2c428a04d8ae7064237256ff286ad246fe5771
1 # mad
3 MAD_VERSION := 0.15.1b
4 MAD_URL := $(CONTRIB_VIDEOLAN)/libmad-$(MAD_VERSION).tar.gz
6 ifdef GPL
7 PKGS += mad
8 endif
9 ifeq ($(call need_pkg,"mad"),)
10 PKGS_FOUND += mad
11 endif
13 $(TARBALLS)/libmad-$(MAD_VERSION).tar.gz:
14 $(call download,$(MAD_URL))
16 .sum-mad: libmad-$(MAD_VERSION).tar.gz
18 libmad: libmad-$(MAD_VERSION).tar.gz .sum-mad
19 $(UNPACK)
20 ifdef HAVE_DARWIN_OS
21 cd $@-$(MAD_VERSION) && sed \
22 -e 's%-march=i486%$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)%' \
23 -e 's%-dynamiclib%-dynamiclib -arch $(ARCH)%' \
24 -i.orig configure
25 endif
26 ifdef HAVE_IOS
27 $(APPLY) $(SRC)/mad/mad-ios-asm.patch
28 endif
29 $(APPLY) $(SRC)/mad/mad-noopt.patch
30 $(APPLY) $(SRC)/mad/Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff
31 $(APPLY) $(SRC)/mad/mad-mips-h-constraint-removal.patch
32 $(MOVE)
34 .mad: libmad
35 touch libmad/NEWS libmad/AUTHORS libmad/ChangeLog
36 $(RECONF)
37 ifdef HAVE_IOS
38 cd $< && $(HOSTVARS) CCAS="$(AS)" CFLAGS="$(CFLAGS) -O3" ./configure $(HOSTCONF) $(MAD_CONF)
39 else
40 cd $< && $(HOSTVARS) CFLAGS="$(CFLAGS) -O3" ./configure $(HOSTCONF) $(MAD_CONF)
41 endif
42 cd $< && $(MAKE) install
43 touch $@