1 | CC=arm-apple-darwin9-gcc |
---|
2 | LD = $(CC) |
---|
3 | |
---|
4 | SRC=Classes/ |
---|
5 | |
---|
6 | CFLAGS= -std=c99 |
---|
7 | |
---|
8 | LDFLAGS= -lobjc \ |
---|
9 | -bind_at_load \ |
---|
10 | -framework Foundation \ |
---|
11 | -framework CoreFoundation \ |
---|
12 | -framework UIKit \ |
---|
13 | -framework CoreGraphics \ |
---|
14 | -framework MediaPlayer \ |
---|
15 | -framework QuartzCore \ |
---|
16 | -w |
---|
17 | |
---|
18 | all: main |
---|
19 | |
---|
20 | main: main.o AllMyDataAppDelegate.o AllMyDataPrefs.o BrowserViewController.o EmailFacade.o FileViewController.o FileViewLoader.o FileViewTableCell.o HTTPFacade.o ImageViewController.o LoginViewController.o MainViewController.o MoviePlayerController.o NSDictionary+BSJSONAdditions.o NSScanner+BSJSONAdditions.o RegisterViewController.o RootViewController.o UploadFileController.o |
---|
21 | $(LD) $(LDFLAGS) -o $@ $^ |
---|
22 | |
---|
23 | bundle: main |
---|
24 | @mkdir -p AllMyData.app |
---|
25 | @cp main AllMyData.app/AllMyData_ |
---|
26 | @cp *.png AllMyData.app |
---|
27 | @cp *.xib AllMyData.app |
---|
28 | @cp Info.plist AllMyData.app |
---|
29 | @sed -i -e 's/$${PRODUCT_NAME}/AllMyData/g' AllMyData.app/Info.plist |
---|
30 | @cp -r Settings.bundle/*.lproj AllMyData.app |
---|
31 | @cp AllMyData AllMyData.app/AllMyData |
---|
32 | |
---|
33 | main.o: main.m AllMyData_Prefix.pch.gch |
---|
34 | $(CC) -include AllMyData_Prefix.pch -c $(CFLAGS) $(CPPFLAGS) $< -o $@ |
---|
35 | |
---|
36 | %.o: $(SRC)%.m AllMyData_Prefix.pch.gch |
---|
37 | $(CC) -include AllMyData_Prefix.pch -c $(CFLAGS) $(CPPFLAGS) $< -o $@ |
---|
38 | |
---|
39 | AllMyData_Prefix.pch.gch: AllMyData_Prefix.pch |
---|
40 | $(CC) -x objective-c-header $(CFLAGS) AllMyData_Prefix.pch |
---|
41 | |
---|
42 | deploy: clean bundle |
---|
43 | @ssh -i ~/.ssh/id_rsa_iphone root@$(IP) "cd /Applications/AllMyData.app && rm -R * || echo 'not found' " |
---|
44 | @scp -i ~/.ssh/id_rsa_iphone -rp AllMyData.app root@$(IP):/Applications |
---|
45 | @ssh -i ~/.ssh/id_rsa_iphone root@$(IP) "cd /Applications/AllMyData.app ; ldid -S AllMyData_; respring" |
---|
46 | |
---|
47 | clean: |
---|
48 | @rm -f *.o |
---|
49 | @rm -f main |
---|
50 | @rm -Rf AllMyData.app |
---|
51 | |
---|
52 | |
---|