]> git.sesse.net Git - vlc/blob - extras/contrib/Makefile
make the install dir configurable for win32
[vlc] / extras / contrib / Makefile
1 # ***************************************************************************
2 # Makefile : Build vlc-contrib files
3 # ***************************************************************************
4 # Copyright (C) 2003-2006 the VideoLAN team
5 # $Id$
6
7 # Authors: Christophe Massiot <massiot@via.ecp.fr>
8 #          Derk-Jan Hartman <hartman at videolan dot org>
9 #          Christophe Mutricy <xtophe at videolan dot org>
10
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or    
14 # (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 # ***************************************************************************
25
26 include ./config.mak
27
28 BUILDDIRS = bin doc etc include info lib man sbin share vlc-lib tmp gecko-sdk
29
30 all: FORCE
31 #       @echo "Do you mean to make src or make bin ?"
32         @echo "    'make bin' isn't functional at the moment,"
33         @echo "    running 'make src' instead..."
34         $(MAKE) src
35
36 src: FORCE
37         $(MAKE) -C src all
38
39 contrib-macosx.tar.bz2: FORCE
40         $(WGET) $(CONTRIB_URL)
41
42 bin: FORCE
43         @echo "make bin isn't in a functional state at this moment. Please use make src"
44
45 #The disabled make bin
46 #bin: contrib-macosx.tar.bz2
47 #       @if test -d tmp; then \
48 #               echo "Move away ./tmp, it's in the way" ; \
49 #               exit 1 ; \
50 #       fi
51 #       mkdir tmp
52 #       bunzip2 -c $< | (cd tmp; tar xf -)
53 #       ./change_prefix.sh tmp @@CONTRIB_PREFIX@@ $(PREFIX)
54 #       (cd tmp; tar cf - .) | tar xf -
55 #       rm -rf tmp
56 #       ranlib lib/*\.a
57
58 clean-src: FORCE
59         rm -rf $(BUILDDIRS)
60         $(MAKE) -C src clean-src
61
62 clean-bin: FORCE
63         rm -rf $(BUILDDIRS)
64         $(MAKE) -C src clean-dots
65
66 clean: FORCE
67 #       @echo "    Do you mean to clean-src or clean-bin ?"
68         @echo "    'make bin' isn't available at the moment"
69         @echo "    you probably wanna run 'make clean-src' then"
70         @echo "    you can still run 'make clean-bin' manually if needed"
71         $(MAKE) clean-src
72         rm -rf config.mak distro.mak
73
74 package-macosx: FORCE
75         @if test -d tmp; then \
76                 echo "Move away ./tmp, it's in the way" ; \
77                 exit 1 ; \
78         fi
79         mkdir tmp
80         tar cf - bin sbin include lib vlc-lib share/aclocal* share/autoconf* \
81                 share/automake* share/gettext* \
82                 | (cd tmp; tar xf -)
83         ./change_prefix.sh tmp $(PREFIX) @@CONTRIB_PREFIX@@
84         (cd tmp; tar cf - .) | bzip2 -c > contrib-macosx.tar.bz2
85         rm -rf tmp
86
87 DISTDIR = usr/win32
88
89 package-win32: FORCE
90         @if test -d tmp; then \
91                 echo "Move away ./tmp, it's in the way" ; \
92                 exit 1 ; \
93         fi
94         mkdir -p tmp/$(DISTDIR)
95         tar cf - --dereference bin sbin include lib share/aclocal*\
96                 share/autoconf* \
97                 share/automake* share/gettext* gecko-sdk\
98                 | (cd tmp/$(DISTDIR); tar xpf -)
99 #kludge for live.com
100         mkdir -p tmp/usr/win32/live.com
101         for i in groupsock liveMedia UsageEnvironment BasicUsageEnvironment; do \
102                 mkdir -p  tmp/$(DISTDIR)/live.com/$$i/include; \
103                 cp -r src/live/$$i/include tmp/$(DISTDIR)/live.com/$$i; \
104                 cp src/live/$$i/lib$${i}.a  tmp/$(DISTDIR)/live.com/$$i; \
105         done;
106         ./change_prefix.sh tmp $(PREFIX) /$(DISTDIR)
107 #       Klugy kludge    
108         (cd tmp/$(DISTDIR)/bin; rm -f *.exe; chmod a+x *)
109         (cd tmp; tar cf - $(DISTDIR)) | bzip2 -c > contrib-`date +%Y%m%d`-win32-bin-gcc-`$(CC) --version|head -n 1|cut -f 3 -d ' '`-only.tar.bz2
110         rm -rf tmp
111 FORCE:
112