+clean:
+ rm -f MobileCydia postinst
+ rm -rf Objects/ Images/
+
+Objects/%.o: %.c $(header)
+ @mkdir -p $(dir $@)
+ @echo "[cycc] $<"
+ @$(cycc) -c -x c $<
+
+Objects/%.o: %.m $(header)
+ @mkdir -p $(dir $@)
+ @echo "[cycc] $<"
+ @$(cycc) -c $< $(flags)
+
+Objects/%.o: %.cpp $(header)
+ @mkdir -p $(dir $@)
+ @echo "[cycc] $<"
+ @$(cycc) -std=c++11 -c $< $(flags) $(xflags)
+
+Objects/%.o: %.mm $(header)
+ @mkdir -p $(dir $@)
+ @echo "[cycc] $<"
+ @$(cycc) -std=c++11 -c $< $(flags) $(xflags)
+
+Objects/Version.o: Version.h
+
+Images/%.png: %.png
+ @mkdir -p $(dir $@)
+ @echo "[pngc] $<"
+ @./pngcrush.sh $< $@
+
+sysroot: sysroot.sh
+ @echo "Your ./sysroot/ is either missing or out of date. Please read compiling.txt for help." 1>&2
+ @echo 1>&2
+ @exit 1
+
+MobileCydia: sysroot $(object) entitlements.xml
+ @echo "[link] $(object:Objects/%=%)"
+ @$(cycc) $(filter %.o,$^) $(flags) $(link) $(libs) $(uikit) -Wl,-sdk_version,8.0
+ @mkdir -p bins
+ @cp -a $@ bins/$@-$(version)
+ @echo "[strp] $@"
+ @strip $@
+ @echo "[uikt] $@"
+ @./uikit.sh $@
+ @echo "[sign] $@"
+ @ldid -T0 -Sentitlements.xml $@ || { rm -f $@ && false; }
+
+cfversion: cfversion.mm
+ $(cycc) $(filter %.mm,$^) $(flags) $(link) -framework CoreFoundation
+ @ldid -T0 -S $@
+
+setnsfpn: setnsfpn.cpp
+ $(cycc) $(filter %.cpp,$^) $(flags) $(link)
+ @ldid -T0 -S $@
+
+cydo: cydo.cpp
+ $(cycc) -std=c++11 $(filter %.cpp,$^) $(flags) $(link) -Wno-deprecated-writable-strings
+ @ldid -T0 -S $@
+
+postinst: postinst.mm CyteKit/stringWithUTF8Bytes.mm CyteKit/stringWithUTF8Bytes.h CyteKit/UCPlatform.h
+ $(cycc) -std=c++11 $(filter %.mm,$^) $(flags) $(link) -framework CoreFoundation -framework Foundation -framework UIKit
+ @ldid -T0 -S $@
+
+debs/cydia_$(version)_iphoneos-arm.deb: MobileCydia preinst postinst cfversion setnsfpn cydo $(images) $(shell find MobileCydia.app) cydia.control Library/firmware.sh Library/move.sh Library/startup