source: gs2-extensions/gnome-lib/trunk/src/packages/CASCADE-MAKE/LIBBZ2.sh@ 26620

Last change on this file since 26620 was 26620, checked in by davidb, 11 years ago

Cross-compilation support added (mingw under Linux)

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/bash
2
3package=bzip2
4version=-1.0.6
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXTGNOME ../.. $*
9
10prefix=$GEXTGNOME_INSTALLED
11
12if [ "x$CROSSCONFIGURE_ARGS" != "x" ] ; then
13 export CPP="$crossHost-cpp"
14 export CC="$crossHost-gcc"
15 export CXX="$crossHost-g++"
16 export LD="$crossHost-ld"
17 export AR="$crossHost-ar"
18 export RANLIB="$crossHost-ranlib"
19fi
20
21
22fixmake=0
23
24if [ "x$CROSSCONFIGURE_ARGS" != "x" ] ; then
25
26 if [ $force_untar = "1" ] ; then
27 fixmake=1
28 elif [ $auto_config = "1" ] && [ ! -d $package$version ] ; then
29 fixmake=1
30 fi
31fi
32
33
34opt_run_untar $force_untar $auto_untar $package $version
35
36if [ $fixmake = "1" ] ; then
37
38 cat $package$version/Makefile \
39 | sed "s/^CC=gcc/CC=$crossHost-gcc/" \
40 | sed "s/^AR=ar/AR=$crossHost-ar/" \
41 | sed "s/^RANLIB=ranlib/RANLIB=$crossHost-ranlib/" \
42 > $package$version/Makefile.cross
43 /bin/mv $package$version/Makefile.cross $package$version/Makefile
44fi
45
46
47#custom opt_run_make 'compile'
48if [ $compile = 1 ] ; then
49 (cd $package$version ; make CFLAGS="$CFLAGS -fPIC")
50fi
51
52#custom opt_run_make 'install'
53if [ $install = 1 ] ; then
54 (cd $package$version ; make install PREFIX=$prefix)
55fi
56
57opt_run_make $clean $package $version "clean"
58opt_run_make $distclean $package $version "distclean"
59
60opt_run_tarclean $tarclean $package $version
Note: See TracBrowser for help on using the repository browser.