Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[3f9ab6]: mac / ExternalPrograms / scripts / panomatic.sh Maximize Restore History

Download this file

panomatic.sh    115 lines (88 with data), 2.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# ------------------
# panomatic
# ------------------
# $Id: enblend3.sh 1908 2007-02-05 14:59:45Z ippei $
# Copyright (c) 2007, Ippei Ukai
# Script skeleton Ippei Ukai
# panomatic config Harry van der Wolf
# prepare
# export REPOSITORYDIR="/PATH2HUGIN/mac/ExternalPrograms/repository" \
# ARCHS="ppc i386" \
# ppcTARGET="powerpc-apple-darwin7" \
# i386TARGET="i386-apple-darwin8" \
# ppcMACSDKDIR="/Developer/SDKs/MacOSX10.3.9.sdk" \
# i386MACSDKDIR="/Developer/SDKs/MacOSX10.4u.sdk" \
# ppcONLYARG="-mcpu=G3 -mtune=G4" \
# i386ONLYARG="-mfpmath=sse -msse2 -mtune=pentium-m -ftree-vectorize" \
# ppc64ONLYARG="-mcpu=G5 -mtune=G5 -ftree-vectorize" \
# OTHERARGs="";
# init
let NUMARCH="0"
for i in $ARCHS
do
NUMARCH=$(($NUMARCH + 1))
done
mkdir -p "$REPOSITORYDIR/bin";
mkdir -p "$REPOSITORYDIR/lib";
mkdir -p "$REPOSITORYDIR/include";
# compile
for ARCH in $ARCHS
do
mkdir -p "$REPOSITORYDIR/arch/$ARCH/bin";
mkdir -p "$REPOSITORYDIR/arch/$ARCH/lib";
mkdir -p "$REPOSITORYDIR/arch/$ARCH/include";
ARCHARGs=""
MACSDKDIR=""
OTHERARGs="-fast -ffast-math -mfpmath=sse -msse3"
# OTHERMAKEARGS="j4"
# i386ExtraARGS="-mfpmath=sse -msse3"
if [ $ARCH = "i386" -o $ARCH = "i686" ]
then
TARGET=$i386TARGET
MACSDKDIR=$i386MACSDKDIR
ARCHARGs="$i386ONLYARG"
elif [ $ARCH = "ppc" -o $ARCH = "ppc750" -o $ARCH = "ppc7400" ]
then
TARGET=$ppcTARGET
MACSDKDIR=$ppcMACSDKDIR
ARCHARGs="$ppcONLYARG"
elif [ $ARCH = "ppc64" -o $ARCH = "ppc970" ]
then
TARGET=$ppc64TARGET
MACSDKDIR=$ppc64MACSDKDIR
ARCHARGs="$ppc64ONLYARG"
elif [ $ARCH = "x86_64" ]
then
TARGET=$x64TARGET
MACSDKDIR=$x64MACSDKDIR
ARCHARGs="$x64ONLYARG"
fi
env CFLAGS="-isysroot $MACSDKDIR -arch $ARCH $OTHERARGs $ARCHARGs $OTHERARGs -O2 -dead_strip" \
CXXFLAGS="-isysroot $MACSDKDIR -arch $ARCH $OTHERARGs $ARCHARGs $OTHERARGs -dead_strip" \
CPPFLAGS="-I$REPOSITORYDIR/include -I$REPOSITORYDIR/include/OpenEXR" \
LDFLAGS="-L$REPOSITORYDIR/lib -dead_strip" \
NEXT_ROOT="$MACSDKDIR" \
./configure --prefix="$REPOSITORYDIR" --disable-dependency-tracking \
--host="$TARGET" --exec-prefix=$REPOSITORYDIR/arch/$ARCH \
;
make clean;
make $OTHERMAKEARGS all;
make install;
done
# merge execs
for program in bin/panomatic
do
if [ $NUMARCH -eq 1 ]
then
mv "$REPOSITORYDIR/arch/$ARCHS/$program" "$REPOSITORYDIR/$program";
strip "$REPOSITORYDIR/$program";
continue
fi
LIPOARGs=""
for ARCH in $ARCHS
do
LIPOARGs="$LIPOARGs $REPOSITORYDIR/arch/$ARCH/$program"
done
lipo $LIPOARGs -create -output "$REPOSITORYDIR/$program";
strip "$REPOSITORYDIR/$program";
done