2014-04-03 20:45:57 +02:00
|
|
|
IOS_SDK_VERSION = 7.1
|
|
|
|
|
2013-12-10 02:59:19 +01:00
|
|
|
IOS_CC = gcc -ObjC
|
2013-07-27 09:27:11 +02:00
|
|
|
DEVICE_SUPPORT = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/DeviceSupport
|
2014-04-03 20:45:57 +02:00
|
|
|
IOS_SDK = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK_VERSION).sdk
|
2011-09-16 16:06:56 +02:00
|
|
|
|
2013-05-11 03:02:27 +02:00
|
|
|
all: clean ios-deploy
|
2011-09-16 16:06:56 +02:00
|
|
|
|
|
|
|
demo.app: demo Info.plist
|
|
|
|
mkdir -p demo.app
|
|
|
|
cp demo demo.app/
|
|
|
|
cp Info.plist ResourceRules.plist demo.app/
|
|
|
|
codesign -f -s "iPhone Developer" --entitlements Entitlements.plist demo.app
|
|
|
|
|
|
|
|
demo: demo.c
|
2013-12-10 02:59:19 +01:00
|
|
|
$(IOS_CC) -g -arch armv7 -isysroot $(IOS_SDK) -framework CoreFoundation -o demo demo.c
|
2011-09-16 16:06:56 +02:00
|
|
|
|
2013-07-30 00:52:34 +02:00
|
|
|
ios-deploy: clean ios-deploy.c
|
2013-12-10 02:59:19 +01:00
|
|
|
$(IOS_CC) -g -o ios-deploy -framework Foundation -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks ios-deploy.c
|
2011-09-16 16:06:56 +02:00
|
|
|
|
2013-07-27 09:27:11 +02:00
|
|
|
symlink:
|
|
|
|
cd $(DEVICE_SUPPORT); ln -sfn "`find . -type d -maxdepth 1 -exec basename {} \; | tail -1`" Latest
|
|
|
|
|
|
|
|
install: symlink ios-deploy
|
2013-05-11 02:34:19 +02:00
|
|
|
mkdir -p $(prefix)/bin
|
|
|
|
cp ios-deploy $(prefix)/bin
|
2011-09-16 16:06:56 +02:00
|
|
|
|
2013-07-30 00:52:34 +02:00
|
|
|
uninstall:
|
|
|
|
rm $(prefix)/bin/ios-deploy
|
|
|
|
|
2011-09-16 16:06:56 +02:00
|
|
|
debug: all
|
2013-04-30 21:07:52 +02:00
|
|
|
./ios-deploy --debug --bundle demo.app
|
2011-09-16 16:06:56 +02:00
|
|
|
|
|
|
|
clean:
|
2013-12-10 02:59:19 +01:00
|
|
|
rm -rf *.app demo ios-deploy
|