author | Sam Lantinga <slouken@libsdl.org> |
Sun, 14 Aug 2011 17:21:21 -0400 | |
changeset 5611 | d20007078cd1 |
parent 5609 | 3619f9bc639a |
child 5961 | 3bd7ed5f3895 |
permissions | -rwxr-xr-x |
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` |
|
3524
5668e43c256b
Allow overriding the number of build jobs
Sam Lantinga <slouken@libsdl.org>
parents:
3282
diff
changeset
|
7 |
if test x$NJOB = x; then |
5668e43c256b
Allow overriding the number of build jobs
Sam Lantinga <slouken@libsdl.org>
parents:
3282
diff
changeset
|
8 |
NJOB=$NCPU |
5668e43c256b
Allow overriding the number of build jobs
Sam Lantinga <slouken@libsdl.org>
parents:
3282
diff
changeset
|
9 |
fi |
1741 | 10 |
|
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
11 |
# SDK path |
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
12 |
if test x$SDK_PATH = x; then |
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
13 |
SDK_PATH=/Developer/SDKs |
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
14 |
fi |
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
15 |
|
1741 | 16 |
# Generic, cross-platform CFLAGS you always want go here. |
17 |
CFLAGS="-O3 -g -pipe" |
|
18 |
||
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
19 |
# Intel 32-bit 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
|
20 |
# 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
|
21 |
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
|
22 |
--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
|
23 |
|
4926
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
24 |
# They changed this from "darwin9" to "darwin10" in Xcode 3.2 (Snow Leopard). |
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
25 |
GCCUSRPATH_X86=`ls -d $SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin*/4.0.1` |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
26 |
if [ ! -d "$GCCUSRPATH_X86" ]; then |
4926
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
27 |
echo "Couldn't find any GCC usr path for 32-bit x86" |
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
28 |
exit 1 |
3629
102be1cdd2bb
Merge r5179:5180 from branches/SDL-1.2: fatbuild.sh Xcode 3.2 fix.
Ryan C. Gordon <icculus@icculus.org>
parents:
3609
diff
changeset
|
29 |
fi |
4926
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
30 |
GCCUSRPATH_X64=`ls -d $SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin*/4.0.1` |
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
31 |
if [ ! -d "$GCCUSRPATH_X64" ]; then |
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
32 |
echo "Couldn't find any GCC usr path for 64-bit x86" |
3629
102be1cdd2bb
Merge r5179:5180 from branches/SDL-1.2: fatbuild.sh Xcode 3.2 fix.
Ryan C. Gordon <icculus@icculus.org>
parents:
3609
diff
changeset
|
33 |
exit 1 |
102be1cdd2bb
Merge r5179:5180 from branches/SDL-1.2: fatbuild.sh Xcode 3.2 fix.
Ryan C. Gordon <icculus@icculus.org>
parents:
3609
diff
changeset
|
34 |
fi |
102be1cdd2bb
Merge r5179:5180 from branches/SDL-1.2: fatbuild.sh Xcode 3.2 fix.
Ryan C. Gordon <icculus@icculus.org>
parents:
3609
diff
changeset
|
35 |
|
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
36 |
# Intel 32-bit compiler flags |
1739
3a3e847aadb9
Trying to fix fatbuild.sh on intel
Sam Lantinga <slouken@libsdl.org>
parents:
1648
diff
changeset
|
37 |
CC_X86="gcc-4.0 -arch i386" |
1743 | 38 |
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
|
39 |
CFLAGS_X86="-mmacosx-version-min=10.4" |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
40 |
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
|
41 |
-nostdinc \ |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
42 |
-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \ |
3629
102be1cdd2bb
Merge r5179:5180 from branches/SDL-1.2: fatbuild.sh Xcode 3.2 fix.
Ryan C. Gordon <icculus@icculus.org>
parents:
3609
diff
changeset
|
43 |
-I$GCCUSRPATH_X86/include \ |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
44 |
-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
|
45 |
|
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
46 |
# Intel 32-bit linker flags |
3609
72a1c4dda07c
Merged r3808:3809 from branches/SDL-1.2: install_name_tool fix for fatbuild.sh.
Ryan C. Gordon <icculus@icculus.org>
parents:
3524
diff
changeset
|
47 |
LFLAGS_X86="-arch i386 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.4 \ |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
48 |
-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \ |
3629
102be1cdd2bb
Merge r5179:5180 from branches/SDL-1.2: fatbuild.sh Xcode 3.2 fix.
Ryan C. Gordon <icculus@icculus.org>
parents:
3609
diff
changeset
|
49 |
-L$GCCUSRPATH_X86 \ |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
50 |
-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
|
51 |
|
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
52 |
# Intel 64-bit configure flags (10.5 runtime compatibility) |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
53 |
# We dynamically load X11, so using the system X11 headers is fine. |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
54 |
CONFIG_X64="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \ |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
55 |
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
56 |
|
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
57 |
# Intel 64-bit compiler flags |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
58 |
CC_X64="gcc-4.0 -arch x86_64" |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
59 |
CXX_X64="g++-4.0 -arch x86_64" |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
60 |
CFLAGS_X64="-mmacosx-version-min=10.5" |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
61 |
CPPFLAGS_X64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \ |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
62 |
-nostdinc \ |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
63 |
-F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \ |
4926
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
64 |
-I$GCCUSRPATH_X64/include \ |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
65 |
-isystem $SDK_PATH/MacOSX10.5.sdk/usr/include" |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
66 |
|
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
67 |
# Intel 64-bit linker flags |
3609
72a1c4dda07c
Merged r3808:3809 from branches/SDL-1.2: install_name_tool fix for fatbuild.sh.
Ryan C. Gordon <icculus@icculus.org>
parents:
3524
diff
changeset
|
68 |
LFLAGS_X64="-arch x86_64 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.5 \ |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
69 |
-F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \ |
4926
ab02a7242f08
Fixed the gcc include path when building on Mac OS X 10.5
Sam Lantinga <slouken@libsdl.org>
parents:
4924
diff
changeset
|
70 |
-L$GCCUSRPATH_X64/x86_64 \ |
4924
455c0dad84df
Allow the SDK path to be rebased
Sam Lantinga <slouken@libsdl.org>
parents:
3629
diff
changeset
|
71 |
-Wl,-syslibroot,$SDK_PATH/MacOSX10.5.sdk" |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
72 |
|
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
73 |
# |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 |
# 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
|
75 |
# |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
76 |
srcdir=`dirname $0`/.. |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
77 |
auxdir=$srcdir/build-scripts |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
78 |
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
|
79 |
|
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
80 |
# |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
81 |
# 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
|
82 |
# all, |
5611
d20007078cd1
Removed some extra ppc scaffolding
Sam Lantinga <slouken@libsdl.org>
parents:
5609
diff
changeset
|
83 |
# configure, configure-x86, configure-x64 |
d20007078cd1
Removed some extra ppc scaffolding
Sam Lantinga <slouken@libsdl.org>
parents:
5609
diff
changeset
|
84 |
# make, make-x86, make-x64, merge |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
85 |
# install |
1741 | 86 |
# clean |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
87 |
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
|
88 |
phase=all |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
89 |
else |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
90 |
phase="$1" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
91 |
fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
92 |
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
|
93 |
all) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
94 |
configure_x86="yes" |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
95 |
configure_x64="yes" |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
96 |
make_x86="yes" |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
97 |
make_x64="yes" |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
98 |
merge="yes" |
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 |
configure) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
101 |
configure_x86="yes" |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
102 |
configure_x64="yes" |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
103 |
;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
104 |
configure-x86) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
105 |
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
|
106 |
;; |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
107 |
configure-x64) |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
108 |
configure_x64="yes" |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
109 |
;; |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
110 |
make) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
111 |
make_x86="yes" |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
112 |
make_x64="yes" |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
113 |
merge="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
114 |
;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
115 |
make-x86) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 |
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
|
117 |
;; |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
118 |
make-x64) |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
119 |
make_x64="yes" |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
120 |
;; |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
121 |
merge) |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 |
merge="yes" |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 |
;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 |
install) |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
125 |
install_bin="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
126 |
install_hdrs="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
127 |
install_lib="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
128 |
install_data="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
129 |
install_man="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
130 |
;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
131 |
install-bin) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
132 |
install_bin="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
133 |
;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
134 |
install-hdrs) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
135 |
install_hdrs="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
136 |
;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
137 |
install-lib) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
138 |
install_lib="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
139 |
;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
140 |
install-data) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
141 |
install_data="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
142 |
;; |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
143 |
install-man) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
144 |
install_man="yes" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
145 |
;; |
1741 | 146 |
clean) |
147 |
clean_x86="yes" |
|
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
148 |
clean_x64="yes" |
1741 | 149 |
;; |
150 |
clean-x86) |
|
151 |
clean_x86="yes" |
|
152 |
;; |
|
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
153 |
clean-x64) |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
154 |
clean_x64="yes" |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
155 |
;; |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
156 |
*) |
5611
d20007078cd1
Removed some extra ppc scaffolding
Sam Lantinga <slouken@libsdl.org>
parents:
5609
diff
changeset
|
157 |
echo "Usage: $0 [all|configure[-x86|-x64]|make[-x86|-x64]|merge|install|clean[-x86|-x64]]" |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
158 |
exit 1 |
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 |
esac |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
161 |
case `uname -p` in |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
162 |
*86) |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
163 |
native_path=x86 |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
164 |
;; |
3249
2befcf0c5ce0
Fix build on native 64-bit architecture
Sam Lantinga <slouken@libsdl.org>
parents:
3248
diff
changeset
|
165 |
x86_64) |
2befcf0c5ce0
Fix build on native 64-bit architecture
Sam Lantinga <slouken@libsdl.org>
parents:
3248
diff
changeset
|
166 |
native_path=x64 |
2befcf0c5ce0
Fix build on native 64-bit architecture
Sam Lantinga <slouken@libsdl.org>
parents:
3248
diff
changeset
|
167 |
;; |
1648
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 |
echo "Couldn't figure out native architecture path" |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
170 |
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
|
171 |
;; |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
172 |
esac |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
173 |
|
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
174 |
# |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
175 |
# 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
|
176 |
# |
5611
d20007078cd1
Removed some extra ppc scaffolding
Sam Lantinga <slouken@libsdl.org>
parents:
5609
diff
changeset
|
177 |
for dir in build build/x86 build/x64; do |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
178 |
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
|
179 |
: |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
180 |
else |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
181 |
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
|
182 |
fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
183 |
done |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
184 |
|
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
185 |
# |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
186 |
# Build the Intel 32-bit binary |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
187 |
# |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
188 |
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
|
189 |
(cd build/x86 && \ |
1799
50e9cca3fe7b
Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents:
1744
diff
changeset
|
190 |
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
|
191 |
fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
192 |
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
|
193 |
(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
|
194 |
fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
195 |
|
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
196 |
# |
3248
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
197 |
# Build the Intel 32-bit binary |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
198 |
# |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
199 |
if test x$configure_x64 = xyes; then |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
200 |
(cd build/x64 && \ |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
201 |
sh ../../configure $CONFIG_X64 CC="$CC_X64" CXX="$CXX_X64" CFLAGS="$CFLAGS $CFLAGS_X64" CPPFLAGS="$CPPFLAGS_X64" LDFLAGS="$LFLAGS_X64") || exit 2 |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
202 |
fi |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
203 |
if test x$make_x64 = xyes; then |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
204 |
(cd build/x64 && make -j$NJOB) || exit 3 |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
205 |
fi |
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
206 |
|
cde30895105d
Added 64-bit architectures to the fat build script
Sam Lantinga <slouken@libsdl.org>
parents:
3245
diff
changeset
|
207 |
# |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
208 |
# 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
|
209 |
# |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
210 |
if test x$merge = xyes; then |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
211 |
output=.libs |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
212 |
sh $auxdir/mkinstalldirs build/$output |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
213 |
cd build |
3245
d984d5bb17e9
Updated fatbuild.sh to build for 10.4u SDK
Sam Lantinga <slouken@libsdl.org>
parents:
2282
diff
changeset
|
214 |
target=`find . -mindepth 4 -maxdepth 4 -type f -name '*.dylib' | head -1 | sed 's|.*/||'` |
d984d5bb17e9
Updated fatbuild.sh to build for 10.4u SDK
Sam Lantinga <slouken@libsdl.org>
parents:
2282
diff
changeset
|
215 |
(lipo -create -o $output/$target `find . -mindepth 4 -maxdepth 4 -type f -name "*.dylib"` && |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
216 |
ln -sf $target $output/libSDL.dylib && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
217 |
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
|
218 |
cp $native_path/build/.libs/libSDL.la $output && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
219 |
cp $native_path/build/.libs/libSDL.lai $output && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
220 |
cp $native_path/build/libSDL.la . && |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
221 |
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
|
222 |
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
|
223 |
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
|
224 |
cd .. |
1636
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
225 |
fi |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
226 |
|
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
227 |
# |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
228 |
# Install |
3d0dec74ad01
A script to build a fat version of the SDL library... completely untested!
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
229 |
# |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
230 |
do_install() |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
231 |
{ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
232 |
echo $* |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
233 |
$* || exit 5 |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
234 |
} |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
235 |
if test x$prefix = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
236 |
prefix=/usr/local |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
237 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
238 |
if test x$exec_prefix = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
239 |
exec_prefix=$prefix |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
240 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
241 |
if test x$bindir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
242 |
bindir=$exec_prefix/bin |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
243 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
244 |
if test x$libdir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
245 |
libdir=$exec_prefix/lib |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
246 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
247 |
if test x$includedir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
248 |
includedir=$prefix/include |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
249 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
250 |
if test x$datadir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
251 |
datadir=$prefix/share |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
252 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
253 |
if test x$mandir = x; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
254 |
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
|
255 |
fi |
1648
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
256 |
if test x$install_bin = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
257 |
do_install sh $auxdir/mkinstalldirs $bindir |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
258 |
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
|
259 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
260 |
if test x$install_hdrs = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
261 |
do_install sh $auxdir/mkinstalldirs $includedir/SDL |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
262 |
for src in $srcdir/include/*.h; do \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
263 |
file=`echo $src | sed -e 's|^.*/||'`; \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
264 |
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
|
265 |
done |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
266 |
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
|
267 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
268 |
if test x$install_lib = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
269 |
do_install sh $auxdir/mkinstalldirs $libdir |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
270 |
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
|
271 |
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
|
272 |
do_install ranlib $libdir/libSDLmain.a |
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$install_data = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
275 |
do_install sh $auxdir/mkinstalldirs $datadir/aclocal |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
276 |
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
|
277 |
fi |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
278 |
if test x$install_man = xyes; then |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
279 |
do_install sh $auxdir/mkinstalldirs $mandir/man3 |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
280 |
for src in $srcdir/docs/man3/*.3; do \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
281 |
file=`echo $src | sed -e 's|^.*/||'`; \ |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
282 |
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
|
283 |
done |
9f59d4c5aaea
Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents:
1646
diff
changeset
|
284 |
fi |
1741 | 285 |
|
286 |
# |
|
287 |
# Clean up |
|
288 |
# |
|
289 |
do_clean() |
|
290 |
{ |
|
291 |
echo $* |
|
292 |
$* || exit 6 |
|
293 |
} |
|
294 |
if test x$clean_x86 = xyes; then |
|
295 |
do_clean rm -r build/x86 |
|
296 |
fi |
|
5611
d20007078cd1
Removed some extra ppc scaffolding
Sam Lantinga <slouken@libsdl.org>
parents:
5609
diff
changeset
|
297 |
if test x$clean_x64 = xyes; then |
d20007078cd1
Removed some extra ppc scaffolding
Sam Lantinga <slouken@libsdl.org>
parents:
5609
diff
changeset
|
298 |
do_clean rm -r build/x64 |
1741 | 299 |
fi |