Created
October 25, 2012 07:25
-
-
Save lmauri/3951153 to your computer and use it in GitHub Desktop.
Fix to ATMHud monotouch bindings to compile against ARM7 only runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using MonoTouch.ObjCRuntime; | |
[assembly: LinkWith ("libATMHudSDK.a", LinkTarget.Simulator | LinkTarget.ArmV7, ForceLoad = true, Frameworks="AudioToolbox QuartzCore CoreGraphics")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild | |
BTOUCH=/Developer/MonoTouch/usr/bin/btouch | |
PROJECT_ROOT=atmhud-sdk | |
PROJECT=$(PROJECT_ROOT)/atmhud-sdk.xcodeproj | |
TARGET=atmhud-sdk | |
all: ATMHud.dll | |
libATMHud-i386.a: | |
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator -configuration Release clean build | |
-mv $(PROJECT_ROOT)/build/Release-iphonesimulator/lib$(TARGET).a $@ | |
libATMHud-armv7.a: | |
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch armv7 -configuration Release clean build | |
-mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@ | |
libATMHudSDK.a: libATMHud-i386.a libATMHud-armv7.a | |
lipo -create -output $@ $^ | |
ATMHud.dll: atmhud.cs enums.cs AssemblyInfo.cs libATMHudSDK.a | |
$(BTOUCH) -e atmhud.cs enums.cs AssemblyInfo.cs --out=$@ --link-with=libATMHudSDK.a,libATMHudSDK.a | |
clean: | |
-rm -f *.a *.dll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment