]> git.saurik.com Git - cycript.git/blobdiff - makefile
Implemented dpkg dependency generation for Leopard and fixed null symbol dereferences.
[cycript.git] / makefile
index 2b8d45c72081f2a9b793d77df8df203991667060..69ec15e05940fcd9e2091f059f4b0cbe9e4f3a14 100644 (file)
--- a/makefile
+++ b/makefile
@@ -66,13 +66,18 @@ all: $(deb)
 
 extra:
 
-ifeq ($(depends)$(dll),.so)
+ifeq ($(depends)$(dll),dylib)
+control: control.in cycript libcycript.dylib
+       sed -e 's/&/'"$$(dpkg-query -S $$(otool -lah cycript *.dylib | grep dylib | grep -v ':$$' | sed -e 's/^ *name //;s/ (offset [0-9]*)$$//' | sort -u) 2>/dev/null | sed -e 's/:.*//; /^cycript$$/ d; s/$$/,/' | sort -u | tr '\n' ' ')"'/;s/, $$//;s/#/$(svn)/;s/%/$(arch)/' $< >$@
+else
+ifeq ($(depends)$(dll),so)
 control: control.in cycript libcycript.so
        sed -e 's/&/'"$$(dpkg-query -S $$(ldd cycript libcycript.so | sed -e '/:$$/ d; s/^[ \t]*\([^ ]* => \)\?\([^ ]*\) .*/\2/' | sort -u) 2>/dev/null | sed -e 's/:.*//; /^cycript$$/ d; s/$$/,/' | sort -u | tr '\n' ' ')"'/;s/, $$//;s/#/$(svn)/;s/%/$(arch)/' $< >$@
 else
 control: control.in
        sed -e 's/&/$(foreach depend,$(depends),$(depend),)/;s/,$$//;s/#/$(svn)/;s/%/$(arch)/' $< >$@
 endif
+endif
 
 $(deb): $(all) control
        rm -rf package