-MobileCydia: Version.h MobileCydia.mm UICaboodle/*.h UICaboodle/*.mm SDURLCache/SDURLCache.h SDURLCache/SDURLCache.m iPhonePrivate.h lookup3.o Cytore.hpp
- $(cycc) $(filter %.mm,$^) $(filter %.o,$^) $(foreach m,$(filter %.m,$^),-x objective-c++ $(m)) $(flags) $(link) $(uikit)
- ldid -Slaunch.xml $@ || { rm -f $@ && false; }
+images := $(shell find MobileCydia.app/ -type f -name '*.png')
+images := $(images:%=Images/%)
+
+lproj_deb := debs/cydia-lproj_$(version)_iphoneos-arm.deb
+
+all: MobileCydia
+
+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: %.mm $(header)
+ @mkdir -p $(dir $@)
+ @echo "[cycc] $<"
+ @$(cycc) -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)
+ @mkdir -p bins
+ @cp -a $@ bins/$@-$(version)
+ @echo "[strp] $@"
+ @strip -no_uuid $@
+ @echo "[sign] $@"
+ @ldid -T0 -Sentitlements.xml $@ || { rm -f $@ && false; }