diff --git a/rules/dll.rb b/rules/dll.rb index ccd13ee9e..2a51ab0e9 100644 --- a/rules/dll.rb +++ b/rules/dll.rb @@ -26,7 +26,7 @@ def initialize(work, name, objects, whole_libs, libs, linkflags, linker) #puts "libflags: #{libflags}" if(whole_libs.size > 0) if(HOST == :darwin) - libflags += " #{whole_libs.join(' ')} -m32" + libflags += " #{whole_libs.join(' ')}" else libflags += " -Wl,--whole-archive #{whole_libs.join(' ')} -Wl,--no-whole-archive" end diff --git a/rules/gcc_flags.rb b/rules/gcc_flags.rb index a4ecd366b..80f286054 100644 --- a/rules/gcc_flags.rb +++ b/rules/gcc_flags.rb @@ -102,18 +102,18 @@ def define_cflags @HOST_FLAGS = " -DLINUX -fPIC" if(HOST_PLATFORM == :darwin) sdkNumber = (File.exist?("/Developer/SDKs/MacOSX10.5.sdk")) ? "5":"6" - sdkAdress = "/Developer/SDKs/MacOSX10.#{sdkNumber}.sdk" - @HOST_FLAGS += " -isysroot #{sdkAdress} -mmacosx-version-min=10.5 -m32 -DDARWIN" + sdkAdress = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" + @HOST_FLAGS = " -isysroot #{sdkAdress} -mmacosx-version-min=10.5 -DDARWIN" end @HOST_CPPFLAGS = "" elsif(HOST == :darwin) sdkAdress = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" if(!File.exist?(sdkAdress)) sdkNumber = (File.exist?("/Developer/SDKs/MacOSX10.5.sdk")) ? "5":"6" - sdkAdress = "/Developer/SDKs/MacOSX10.#{sdkNumber}.sdk" + sdkAdress = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" end - @HOST_FLAGS = " -isysroot #{sdkAdress} -mmacosx-version-min=10.5 -m32 -DDARWIN" - @HOST_CPPFLAGS = " -isysroot #{sdkAdress} -mmacosx-version-min=10.5 -m32 -fPIC" + @HOST_FLAGS = " -isysroot #{sdkAdress} -mmacosx-version-min=10.5 -DDARWIN" + @HOST_CPPFLAGS = " -isysroot #{sdkAdress} -mmacosx-version-min=10.5 -fPIC" else error "Unsupported host: #{HOST}" end diff --git a/rules/native_link.rb b/rules/native_link.rb index ccdf2ba32..a88b64c94 100644 --- a/rules/native_link.rb +++ b/rules/native_link.rb @@ -56,7 +56,7 @@ class NativeGccLinkWork < NativeGccWork def setup3(all_objects, have_cppfiles) if(HOST == :darwin) - @EXTRA_LINKFLAGS += " -m32 -L/sw/lib -L/opt/local/lib -framework Cocoa -framework IOBluetooth -framework Foundation" + @EXTRA_LINKFLAGS += " -L/sw/lib -L/opt/local/lib -framework Cocoa -framework IOBluetooth -framework Foundation" end if(PROFILING) @EXTRA_LINKFLAGS += " -pg" diff --git a/runtimes/cpp/platforms/iphone/buildLibraries.rb b/runtimes/cpp/platforms/iphone/buildLibraries.rb index 9fc228eb9..ddbe0bedb 100755 --- a/runtimes/cpp/platforms/iphone/buildLibraries.rb +++ b/runtimes/cpp/platforms/iphone/buildLibraries.rb @@ -37,10 +37,10 @@ end # build everything -sh "#{xcodebuild} -target MoSyncLib -configuration Debug -sdk iphoneos -project MoSync.xcodeproj" -sh "#{xcodebuild} -target MoSyncLib -configuration Release -sdk iphoneos -project MoSync.xcodeproj" -sh "#{xcodebuild} -target MoSyncLib -configuration Debug -sdk iphonesimulator -project MoSync.xcodeproj" -sh "#{xcodebuild} -target MoSyncLib -configuration Release -sdk iphonesimulator -project MoSync.xcodeproj" +sh "xcodebuild -target MoSyncLib -configuration Debug -sdk iphoneos -project MoSync.xcodeproj" +sh "xcodebuild -target MoSyncLib -configuration Release -sdk iphoneos -project MoSync.xcodeproj" +sh "xcodebuild -target MoSyncLib -configuration Debug -sdk iphonesimulator -project MoSync.xcodeproj" +sh "xcodebuild -target MoSyncLib -configuration Release -sdk iphonesimulator -project MoSync.xcodeproj"g #sh "/Developer/usr/bin/xcodebuild -target MoSyncLib -configuration Debug -sdk iphoneos3.2 -project MoSync.xcodeproj" #sh "/Developer/usr/bin/xcodebuild -target MoSyncLib -configuration Release -sdk iphoneos3.2 -project MoSync.xcodeproj" #sh "/Developer/usr/bin/xcodebuild -target MoSyncLib -configuration Debug -sdk iphonesimulator3.2 -project MoSync.xcodeproj"