CC=arm-apple-darwin9-gcc LD = $(CC) SRC=Classes/ CFLAGS= -std=c99 LDFLAGS= -lobjc \ -bind_at_load \ -framework Foundation \ -framework CoreFoundation \ -framework UIKit \ -framework CoreGraphics \ -framework MediaPlayer \ -framework QuartzCore \ -w all: main 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 $(LD) $(LDFLAGS) -o $@ $^ bundle: main @mkdir -p AllMyData.app @cp main AllMyData.app/AllMyData_ @cp *.png AllMyData.app @cp *.xib AllMyData.app @cp Info.plist AllMyData.app @sed -i -e 's/$${PRODUCT_NAME}/AllMyData/g' AllMyData.app/Info.plist @cp -r Settings.bundle/*.lproj AllMyData.app @cp AllMyData AllMyData.app/AllMyData main.o: main.m AllMyData_Prefix.pch.gch $(CC) -include AllMyData_Prefix.pch -c $(CFLAGS) $(CPPFLAGS) $< -o $@ %.o: $(SRC)%.m AllMyData_Prefix.pch.gch $(CC) -include AllMyData_Prefix.pch -c $(CFLAGS) $(CPPFLAGS) $< -o $@ AllMyData_Prefix.pch.gch: AllMyData_Prefix.pch $(CC) -x objective-c-header $(CFLAGS) AllMyData_Prefix.pch deploy: clean bundle @ssh -i ~/.ssh/id_rsa_iphone root@$(IP) "cd /Applications/AllMyData.app && rm -R * || echo 'not found' " @scp -i ~/.ssh/id_rsa_iphone -rp AllMyData.app root@$(IP):/Applications @ssh -i ~/.ssh/id_rsa_iphone root@$(IP) "cd /Applications/AllMyData.app ; ldid -S AllMyData_; respring" clean: @rm -f *.o @rm -f main @rm -Rf AllMyData.app