Fixes #135 - Convert Makefile to xcodeproject. Demo in its own folder now with its own Makefile.
This commit is contained in:
5
demo/.gitignore
vendored
Normal file
5
demo/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
demo
|
||||
demo.app
|
||||
demo.dSYM
|
||||
/.DS_Store
|
||||
*~
|
||||
8
demo/Entitlements.plist
Normal file
8
demo/Entitlements.plist
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>get-task-allow</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
24
demo/Info.plist
Normal file
24
demo/Info.plist
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>demo</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>demo</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>demo</string>
|
||||
<key>CFBundleResourceSpecification</key>
|
||||
<string>ResourceRules.plist</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>demo</string>
|
||||
</dict>
|
||||
</plist>
|
||||
24
demo/Makefile
Normal file
24
demo/Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
IOS_SDK_VERSION = 9.0
|
||||
|
||||
IOS_CC = gcc -ObjC
|
||||
IOS_SDK = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK_VERSION).sdk
|
||||
|
||||
all: clean demo.app
|
||||
|
||||
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
|
||||
$(IOS_CC) -g -arch armv7 -isysroot $(IOS_SDK) -framework CoreFoundation -o demo demo.c
|
||||
|
||||
debug: all ios-deploy
|
||||
@../build/Release/ios-deploy --debug --bundle demo.app
|
||||
|
||||
clean:
|
||||
@rm -rf *.app demo demo.dSYM
|
||||
|
||||
ios-deploy:
|
||||
@xcodebuild -project ../ios-deploy.xcodeproj
|
||||
25
demo/ResourceRules.plist
Normal file
25
demo/ResourceRules.plist
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>.*</key>
|
||||
<true/>
|
||||
<key>Info.plist</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>ResourceRules.plist</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>100</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
9
demo/demo.c
Normal file
9
demo/demo.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
int i;
|
||||
for (i = 0; i < argc; i++) {
|
||||
printf("argv[%d] = %s\n", i, argv[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user