-libs :=
-libs += .libs/cycript
-libs += .libs/libcycript.dylib
-libs += .libs/libcycript-any.dylib
-libs += .libs/libcycript-sys.dylib
-libs += .libs/libcycript-sim.dylib
-libs += .libs/libcycript.o
+version := $(shell git describe --always --tags --dirty="+" --match="v*" | sed -e 's@-\([^-]*\)-\([^-]*\)$$@+\1.\2@;s@^v@@;s@%@~@g')
+deb := cycript_$(version)_iphoneos-arm.deb
+
+cycript :=
+cycript += Cycript.lib/cycript
+cycript += Cycript.lib/cycript0.9
+cycript += Cycript.lib/libcycript.dylib
+cycript += Cycript.lib/libcycript-any.dylib
+cycript += Cycript.lib/libcycript-sys.dylib
+cycript += Cycript.lib/libcycript-sim.dylib
+
+framework :=
+framework += Cycript.framework/Cycript
+framework += Cycript.framework/Headers/Cycript.h
+
+links :=
+links += Cycript.lib/libsubstrate.dylib
+links += Cycript.lib/cycript0.9
+
+all: cycript $(cycript) $(framework)
+
+cycript.zip: all
+ rm -f $@
+ zip -r9y $@ cycript Cycript.lib Cycript.framework $(patsubst %,--exclude %,$(links))
+ zip -r9 $@ $(links)