~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to build/macosx/build-inc.sh

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2009-03-31 00:37:15 UTC
  • mfrom: (1.1.7 upstream) (9.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090331003715-i5yisvcfv7mgz3eh
Tags: 2.1.dfsg-1
* New major upstream release (closes: #495937).
* Add desktop files (closes: #501181).

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    echo "Missing base dir!"
22
22
    exit 1
23
23
  fi
 
24
  # normalize base dir
 
25
  BASE_DIR="`cd \"$BASE_DIR\" && pwd`"
24
26
 
25
27
  # check arguments
26
28
  if [ "$ARCH" = "ppc" ]; then
153
155
  # setup SDK paths
154
156
  local PPC_SDK=/Developer/SDKs/MacOSX10.3.9.sdk
155
157
  local I386_SDK=/Developer/SDKs/MacOSX10.4u.sdk
156
 
 
 
158
  local PPC_SDK_VERSION=10.3
 
159
  local I386_SDK_VERSION=10.4
 
160
  
157
161
  # choose SDK
158
162
  if [ "$ARCH" = "ppc" ]; then
159
163
    SDK="$PPC_SDK"
 
164
    SDK_VERSION="$PPC_SDK_VERSION"
160
165
  else
161
166
    SDK="$I386_SDK"
 
167
    SDK_VERSION="$I386_SDK_VERSION"
162
168
  fi
163
169
    
164
170
  # set common flags
167
173
  export PATH="$INSTALL_DIR/bin:$PATH"
168
174
 
169
175
  # do cross-compile?
170
 
  if [ "`uname -p`" != "$ARCH" ]; then
171
 
    #EXTRA_OPT="--host=$ARCH-apple-darwin`uname -r`"
172
 
    export CC="gcc -arch $ARCH -isysroot $SDK"
173
 
    export CXX="g++ -arch $ARCH -isysroot $SDK"
174
 
    export LD="gcc -arch $ARCH -isysroot $SDK"
175
 
  else
176
 
    export CC="gcc"
177
 
    export CXX="g++"
178
 
    export LD="gcc"
 
176
  #if [ "`uname -p`" != "$ARCH" ]; then
 
177
  #  EXTRA_OPT="--host=$ARCH-apple-darwin`uname -r`"
 
178
  #fi
 
179
  
 
180
  # use X11 from SDK
 
181
  if [ "$USE_X11" = "1" ]; then 
 
182
    EXTRA_OPT="--x-includes=$SDK/usr/X11R6/include --x-libraries=$SDK/usr/X11R6/lib"
179
183
  fi
 
184
  
 
185
  export COMPILE_TAG="-arch $ARCH -isysroot $SDK -mmacosx-version-min=$SDK_VERSION"
 
186
  export CC="gcc $COMPILE_TAG"
 
187
  export CXX="g++ $COMPILE_TAG"
 
188
  export LD="gcc $COMPILE_TAG"
180
189
}