# the IP address of your iPhone or iPod Touch DEVICE = 10.1.1.3 APPL = MyApp DOTH = MyApp.h OBJS = main.o MyApp.o TGZFILE = $(HOME)/backup/MyApp.tgz # ---------------------------------------------------------------------- SDK = /Developer/Platforms/iPhoneOS.platform/Developer ARCH = armv6 #SYSROOT = $(SDK)/SDKs/iPhoneOS2.1.sdk SYSROOT = $(SDK)/SDKs/iPhoneOS2.2.sdk CC = $(SDK)/usr/bin/arm-apple-darwin9-gcc-4.0.1 \ -arch $(ARCH) -isysroot $(SYSROOT) CFLAGS = -std=c99 -Werror -I$(SDK)/usr/include/gcc/darwin/4.0 LD = $(CC) LDFLAGS =\ -framework UIKit\ -framework CoreFoundation\ -framework Foundation\ -framework CoreGraphics\ -lobjc\ -bind_at_load # ---------------------------------------------------------------------- $(APPL): $(OBJS) $(LD) $(LDFLAGS) -o $@ $^ cp $(APPL) $(APPL).app @chmod 755 $(APPL).app/$(APPL) @touch $(APPL).app %.o: %.m $(DOTH) $(CC) $(CFLAGS) -c $< install: $(APPL) @ssh root@$(DEVICE) /bin/rm -f /Applications/$(APPL).app/$(APPL) scp -r $(APPL).app root@$(DEVICE):/Applications ssh root@$(DEVICE) /usr/bin/ldid -S /Applications/$(APPL).app/$(APPL) uninstall: ssh root@$(DEVICE) /bin/rm -rf /Applications/$(APPL).app clean: rm -f $(APPL) $(APPL).app/$(APPL) *.o f? backup: make clean tar zcvf $(TGZFILE) . @ls -l $(TGZFILE)