Mercurial > sdl-ios-xcode
annotate build-scripts/fatbuild.sh @ 4554:4deaba8b1b42 SDL-1.2
Fixed bug 1015
Don't set the WM_TRANSIENT_FOR property to an invalid value - delete it instead.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 18 Jul 2010 11:37:12 -0700 |
parents | fb1fc6c9289e |
children |
rev | line source |
---|---|
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 #!/bin/sh |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 # Build a fat binary on Mac OS X, thanks Ryan! |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
1741 | 5 # Number of CPUs (for make -j) |
6 NCPU=`sysctl -n hw.ncpu` | |
1744 | 7 NJOB=$NCPU |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
8 #NJOB=`expr $NCPU + 1` |
1741 | 9 |
10 # Generic, cross-platform CFLAGS you always want go here. | |
11 CFLAGS="-O3 -g -pipe" | |
12 | |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
13 # Locate Xcode SDK path |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
14 SDK_PATH=/Developer/SDKs |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
15 if [ ! -d $SDK_PATH ]; then |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
16 echo "Couldn't find SDK path" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
17 exit 1 |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
18 fi |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
19 |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
20 # See if we can use 10.2 or 10.3 runtime compatibility |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
21 if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
22 # PowerPC configure flags (10.2 runtime compatibility) |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
23 # We dynamically load X11, so using the system X11 headers is fine. |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
24 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \ |
1799
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
25 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" |
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
26 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
27 # PowerPC compiler flags |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
28 CC_PPC="gcc-3.3 -arch ppc" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
29 CXX_PPC="g++-3.3 -arch ppc" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
30 CFLAGS_PPC="" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
31 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \ |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
32 -nostdinc \ |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
33 -F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
34 -I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
35 -isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include" |
4116
1bc3d3b2cde1
Support both 10.2 and 10.3 PPC runtime SDK
Sam Lantinga <slouken@libsdl.org>
parents:
4104
diff
changeset
|
36 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
37 # PowerPC linker flags |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
38 LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
39 -L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
40 -F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
41 -Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk" |
4116
1bc3d3b2cde1
Support both 10.2 and 10.3 PPC runtime SDK
Sam Lantinga <slouken@libsdl.org>
parents:
4104
diff
changeset
|
42 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
43 else # 10.2 or 10.3 SDK |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
44 |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
45 # PowerPC configure flags (10.3 runtime compatibility) |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
46 # We dynamically load X11, so using the system X11 headers is fine. |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
47 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \ |
4116
1bc3d3b2cde1
Support both 10.2 and 10.3 PPC runtime SDK
Sam Lantinga <slouken@libsdl.org>
parents:
4104
diff
changeset
|
48 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
49 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
50 # PowerPC compiler flags |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
51 CC_PPC="gcc-4.0 -arch ppc" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
52 CXX_PPC="g++-4.0 -arch ppc" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
53 CFLAGS_PPC="" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
54 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \ |
4116
1bc3d3b2cde1
Support both 10.2 and 10.3 PPC runtime SDK
Sam Lantinga <slouken@libsdl.org>
parents:
4104
diff
changeset
|
55 -nostdinc \ |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
56 -F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
57 -I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
58 -isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include" |
4116
1bc3d3b2cde1
Support both 10.2 and 10.3 PPC runtime SDK
Sam Lantinga <slouken@libsdl.org>
parents:
4104
diff
changeset
|
59 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
60 # PowerPC linker flags |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
61 LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc -mmacosx-version-min=10.3 \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
62 -L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
63 -F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
64 -Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk" |
4116
1bc3d3b2cde1
Support both 10.2 and 10.3 PPC runtime SDK
Sam Lantinga <slouken@libsdl.org>
parents:
4104
diff
changeset
|
65 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
66 fi # 10.2 or 10.3 SDK |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
67 |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
68 # Intel configure flags (10.4 runtime compatibility) |
1799
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
69 # We dynamically load X11, so using the system X11 headers is fine. |
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
70 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \ |
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
71 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" |
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
72 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
73 # They changed this to "darwin10" in Xcode 3.2 (Snow Leopard). |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
74 GCCUSRPATH="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
75 if [ ! -d "$GCCUSRPATH" ]; then |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
76 GCCUSRPATH="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
77 fi |
4371
6f74b80cca1d
fatbuild.sh: work around directory name change in Xcode 3.2.
Ryan C. Gordon <icculus@icculus.org>
parents:
4148
diff
changeset
|
78 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
79 if [ ! -d "$GCCUSRPATH" ]; then |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
80 echo "Couldn't find any GCC usr path" |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
81 exit 1 |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
82 fi |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
83 |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
84 # Intel compiler flags |
1739
3a3e847aadb9
Trying to fix fatbuild.sh on intel
Sam Lantinga <slouken@libsdl.org>
parents:
1648
diff
changeset
|
85 CC_X86="gcc-4.0 -arch i386" |
1743 | 86 CXX_X86="g++-4.0 -arch i386" |
1739
3a3e847aadb9
Trying to fix fatbuild.sh on intel
Sam Lantinga <slouken@libsdl.org>
parents:
1648
diff
changeset
|
87 CFLAGS_X86="-mmacosx-version-min=10.4" |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
88 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \ |
1742
af4352da64d8
Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents:
1741
diff
changeset
|
89 -nostdinc \ |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
90 -F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
91 -I$GCCUSRPATH/include \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
92 -isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include" |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
93 |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
94 # Intel linker flags |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
95 LFLAGS_X86="-Wl,-headerpad_max_install_names -arch i386 -mmacosx-version-min=10.4 \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
96 -L$GCCUSRPATH \ |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
97 -Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk" |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
98 |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
99 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
100 # Find the configure script |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
101 # |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
102 srcdir=`dirname $0`/.. |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
103 auxdir=$srcdir/build-scripts |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
104 cd $srcdir |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
105 |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
106 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
107 # Figure out which phase to build: |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
108 # all, |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
109 # configure, configure-ppc, configure-x86, |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
110 # make, make-ppc, make-x86, merge |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
111 # install |
1741 | 112 # clean |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
113 if test x"$1" = x; then |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
114 phase=all |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
115 else |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 phase="$1" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
117 fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
118 case $phase in |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
119 all) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
120 configure_ppc="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
121 configure_x86="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 make_ppc="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 make_x86="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 merge="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
125 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
126 configure) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
127 configure_ppc="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
128 configure_x86="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
129 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
130 configure-ppc) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
131 configure_ppc="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
132 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
133 configure-x86) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
134 configure_x86="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
135 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
136 make) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
137 make_ppc="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
138 make_x86="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
139 merge="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
140 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
141 make-ppc) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
142 make_ppc="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
143 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
144 make-x86) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
145 make_x86="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
146 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
147 merge) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
148 merge="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
149 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
150 install) |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
151 install_bin="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
152 install_hdrs="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
153 install_lib="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
154 install_data="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
155 install_man="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
156 ;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
157 install-bin) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
158 install_bin="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
159 ;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
160 install-hdrs) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
161 install_hdrs="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
162 ;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
163 install-lib) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
164 install_lib="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
165 ;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
166 install-data) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
167 install_data="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
168 ;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
169 install-man) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
170 install_man="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
171 ;; |
1741 | 172 clean) |
173 clean_ppc="yes" | |
174 clean_x86="yes" | |
175 ;; | |
176 clean-ppc) | |
177 clean_ppc="yes" | |
178 ;; | |
179 clean-x86) | |
180 clean_x86="yes" | |
181 ;; | |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
182 *) |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
183 echo "Usage: $0 [all|configure[-ppc|-x86]|make[-ppc|-x86]|merge|install|clean]" |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
184 exit 1 |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
185 ;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
186 esac |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
187 case `uname -p` in |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
188 powerpc) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
189 native_path=ppc |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
190 ;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
191 *86) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
192 native_path=x86 |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
193 ;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
194 *) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
195 echo "Couldn't figure out native architecture path" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
196 exit 1 |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
197 ;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
198 esac |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
199 |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
200 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
201 # Create the build directories |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
202 # |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
203 for dir in build build/ppc build/x86; do |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
204 if test -d $dir; then |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
205 : |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
206 else |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
207 mkdir $dir || exit 1 |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
208 fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
209 done |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
210 |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
211 # |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
212 # Build the PowerPC binary |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
213 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
214 if test x$configure_ppc = xyes; then |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
215 (cd build/ppc && \ |
1799
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
216 sh ../../configure $CONFIG_PPC CC="$CC_PPC" CXX="$CXX_PPC" CFLAGS="$CFLAGS $CFLAGS_PPC" CPPFLAGS="$CPPFLAGS_PPC" LDFLAGS="$LFLAGS_PPC") || exit 2 |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
217 fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
218 if test x$make_ppc = xyes; then |
1742
af4352da64d8
Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents:
1741
diff
changeset
|
219 (cd build/ppc && ls include && make -j$NJOB) || exit 3 |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
220 fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
221 |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
222 # |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
223 # Build the Intel binary |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
224 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
225 if test x$configure_x86 = xyes; then |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
226 (cd build/x86 && \ |
1799
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
227 sh ../../configure $CONFIG_X86 CC="$CC_X86" CXX="$CXX_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2 |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
228 fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
229 if test x$make_x86 = xyes; then |
1742
af4352da64d8
Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents:
1741
diff
changeset
|
230 (cd build/x86 && make -j$NJOB) || exit 3 |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
231 fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
232 |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
233 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
234 # Combine into fat binary |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
235 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
236 if test x$merge = xyes; then |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
237 output=.libs |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
238 sh $auxdir/mkinstalldirs build/$output |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
239 cd build |
4397
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
240 target=`find . -mindepth 3 -type f -name '*.dylib' | head -1 | sed 's|.*/||'` |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
241 (lipo -create -o $output/$target `find . -mindepth 3 -type f -name "*.dylib"` && |
fb1fc6c9289e
Reverted accidental commit.
Ryan C. Gordon <icculus@icculus.org>
parents:
4396
diff
changeset
|
242 ln -sf $target $output/libSDL-1.2.0.dylib && |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
243 ln -sf $target $output/libSDL.dylib && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
244 lipo -create -o $output/libSDL.a */build/.libs/libSDL.a && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
245 cp $native_path/build/.libs/libSDL.la $output && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
246 cp $native_path/build/.libs/libSDL.lai $output && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
247 cp $native_path/build/libSDL.la . && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
248 lipo -create -o libSDLmain.a */build/libSDLmain.a && |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
249 echo "Build complete!" && |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
250 echo "Files can be found in the build directory.") || exit 4 |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
251 cd .. |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
252 fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
253 |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
254 # |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
255 # Install |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
256 # |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
257 do_install() |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
258 { |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
259 echo $* |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
260 $* || exit 5 |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
261 } |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
262 if test x$prefix = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
263 prefix=/usr/local |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
264 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
265 if test x$exec_prefix = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
266 exec_prefix=$prefix |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
267 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
268 if test x$bindir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
269 bindir=$exec_prefix/bin |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
270 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
271 if test x$libdir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
272 libdir=$exec_prefix/lib |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
273 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
274 if test x$includedir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
275 includedir=$prefix/include |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
276 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
277 if test x$datadir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
278 datadir=$prefix/share |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
279 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
280 if test x$mandir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
281 mandir=$prefix/man |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
282 fi |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
283 if test x$install_bin = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
284 do_install sh $auxdir/mkinstalldirs $bindir |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
285 do_install /usr/bin/install -c -m 755 build/$native_path/sdl-config $bindir/sdl-config |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
286 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
287 if test x$install_hdrs = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
288 do_install sh $auxdir/mkinstalldirs $includedir/SDL |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
289 for src in $srcdir/include/*.h; do \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
290 file=`echo $src | sed -e 's|^.*/||'`; \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
291 do_install /usr/bin/install -c -m 644 $src $includedir/SDL/$file; \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
292 done |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
293 do_install /usr/bin/install -c -m 644 $srcdir/include/SDL_config_macosx.h $includedir/SDL/SDL_config.h |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
294 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
295 if test x$install_lib = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
296 do_install sh $auxdir/mkinstalldirs $libdir |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
297 do_install sh build/$native_path/libtool --mode=install /usr/bin/install -c build/libSDL.la $libdir/libSDL.la |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
298 do_install /usr/bin/install -c -m 644 build/libSDLmain.a $libdir/libSDLmain.a |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
299 do_install ranlib $libdir/libSDLmain.a |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
300 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
301 if test x$install_data = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
302 do_install sh $auxdir/mkinstalldirs $datadir/aclocal |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
303 do_install /usr/bin/install -c -m 644 $srcdir/sdl.m4 $datadir/aclocal/sdl.m4 |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
304 fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
305 if test x$install_man = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
306 do_install sh $auxdir/mkinstalldirs $mandir/man3 |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
307 for src in $srcdir/docs/man3/*.3; do \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
308 file=`echo $src | sed -e 's|^.*/||'`; \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
309 do_install /usr/bin/install -c -m 644 $src $mandir/man3/$file; \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
310 done |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
311 fi |
1741 | 312 |
313 # | |
314 # Clean up | |
315 # | |
316 do_clean() | |
317 { | |
318 echo $* | |
319 $* || exit 6 | |
320 } | |
321 if test x$clean_x86 = xyes; then | |
322 do_clean rm -r build/x86 | |
323 fi | |
324 if test x$clean_ppc = xyes; then | |
325 do_clean rm -r build/ppc | |
326 fi | |
327 |