X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/53b59114e6a1f2e04ed99db5a0cce3e0d8dfd0f3..15024d7e7c224d837592094932a2da18d17ee015:/Darwin.mk diff --git a/Darwin.mk b/Darwin.mk index 0a99576..c95a594 100644 --- a/Darwin.mk +++ b/Darwin.mk @@ -8,6 +8,7 @@ library += -framework JavaScriptCore library += -framework WebKit library += -liconv flags += -I/usr/include/ffi +apr_config := /usr/bin/apr-1-config ifeq ($(uname_p),i386) flags += -m32 @@ -19,7 +20,10 @@ inject += Mach/Inject.o Mach/Inject.o: Trampoline.t.hpp Baton.hpp %.t.hpp: %.t.cpp - $(target)gcc -c -fno-exceptions -Iinclude -o $*.t.o $< && { file=($$($(target)otool -l $*.t.o | sed -e 'x; /^1/ { x; /^ *filesize / { s/^.* //; p; }; /^ *fileoff / { s/^.* //; p; }; x; }; x; /^ *cmd LC_SEGMENT$$/ { s/.*/1/; x; }; d;')); od -t x1 -j $${file[0]} -N $${file[1]} $*.t.o | sed -e 's/^[^ ]*//' | tr $$'\n' ' ' | sed -e 's/ */ /g;s/^ *//;s/ $$//;s/ /,/g;s/\([^,][^,]\)/0x\1/g' | sed -e 's/^/static const char $*_[] = {/;s/$$/};/' && echo && echo "/*" && $(target)otool -vVt $*.t.o && echo "*/"; } >$@ && rm -f $*.t.o + $(target)gcc -c -fno-exceptions -Iinclude -o $*.t.o $< $(flags) && { file=($$($(target)otool -l $*.t.o | sed -e 'x; /^1/ { x; /^ *filesize / { s/^.* //; p; }; /^ *fileoff / { s/^.* //; p; }; x; }; x; /^ *cmd LC_SEGMENT$$/ { s/.*/1/; x; }; d;')); od -t x1 -j $${file[0]} -N $${file[1]} $*.t.o | sed -e 's/^[^ ]*//' | tr $$'\n' ' ' | sed -e 's/ */ /g;s/^ *//;s/ $$//;s/ /,/g;s/\([^,][^,]\)/0x\1/g' | sed -e 's/^/static const char $*_[] = {/;s/$$/};/' && echo && echo "/*" && $(target)otool -vVt $*.t.o && echo "*/"; } >$@ && rm -f $*.t.o + +clean:: + rm -f Trampoline.t.hpp include Execute.mk include ObjectiveC.mk