Skip to content

Commit 5d2166f

Browse files
committed
Fixes #135 - Convert Makefile to xcodeproject. Demo in its own folder now with its own Makefile.
1 parent 6ce22c2 commit 5d2166f

File tree

11 files changed

+101
-180
lines changed

11 files changed

+101
-180
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
demo
2-
demo.app
3-
ios-deploy
4-
ios-deploy.dSYM
1+
build/*
52
/.DS_Store
63
*~

Makefile

Lines changed: 0 additions & 35 deletions
This file was deleted.

demo/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
demo
2+
demo.app
3+
demo.dSYM
4+
/.DS_Store
5+
*~

demo/Entitlements.plist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>get-task-allow</key>
6+
<true/>
7+
</dict>
8+
</plist>

demo/Info.plist

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleName</key>
6+
<string>demo</string>
7+
<key>CFBundleSupportedPlatforms</key>
8+
<array>
9+
<string>iPhoneOS</string>
10+
</array>
11+
<key>CFBundleExecutable</key>
12+
<string>demo</string>
13+
<key>CFBundleVersion</key>
14+
<string>1.0</string>
15+
<key>CFBundleIdentifier</key>
16+
<string>demo</string>
17+
<key>CFBundleResourceSpecification</key>
18+
<string>ResourceRules.plist</string>
19+
<key>LSRequiresIPhoneOS</key>
20+
<true/>
21+
<key>CFBundleDisplayName</key>
22+
<string>demo</string>
23+
</dict>
24+
</plist>

demo/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
IOS_SDK_VERSION = 9.0
2+
3+
IOS_CC = gcc -ObjC
4+
IOS_SDK = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK_VERSION).sdk
5+
6+
all: clean demo.app
7+
8+
demo.app: demo Info.plist
9+
mkdir -p demo.app
10+
cp demo demo.app/
11+
cp Info.plist ResourceRules.plist demo.app/
12+
codesign -f -s "iPhone Developer" --entitlements Entitlements.plist demo.app
13+
14+
demo: demo.c
15+
$(IOS_CC) -g -arch armv7 -isysroot $(IOS_SDK) -framework CoreFoundation -o demo demo.c
16+
17+
debug: all ios-deploy
18+
@../build/Release/ios-deploy --debug --bundle demo.app
19+
20+
clean:
21+
@rm -rf *.app demo demo.dSYM
22+
23+
ios-deploy:
24+
@xcodebuild -project ../ios-deploy.xcodeproj

demo/ResourceRules.plist

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>rules</key>
6+
<dict>
7+
<key>.*</key>
8+
<true/>
9+
<key>Info.plist</key>
10+
<dict>
11+
<key>omit</key>
12+
<true/>
13+
<key>weight</key>
14+
<real>10</real>
15+
</dict>
16+
<key>ResourceRules.plist</key>
17+
<dict>
18+
<key>omit</key>
19+
<true/>
20+
<key>weight</key>
21+
<real>100</real>
22+
</dict>
23+
</dict>
24+
</dict>
25+
</plist>

demo/demo.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include <stdio.h>
2+
3+
int main(int argc, const char* argv[]) {
4+
int i;
5+
for (i = 0; i < argc; i++) {
6+
printf("argv[%d] = %s\n", i, argv[i]);
7+
}
8+
return 0;
9+
}

ios-deploy-demo/main.m

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)