X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/b166b11b8612a2428d7b86bd3dd27207a3f60dab..807a88be3ae9177f620a91e9aacf4aa59aacddaa:/Darwin.mk diff --git a/Darwin.mk b/Darwin.mk index a1773fd..af4bdc1 100644 --- a/Darwin.mk +++ b/Darwin.mk @@ -5,9 +5,11 @@ flags += -DCY_EXECUTE link += -lobjc -framework CoreFoundation console += -framework Foundation library += -install_name /usr/lib/libcycript.$(dll) -library += -framework Foundation -framework CFNetwork -library += -framework JavaScriptCore -framework WebCore -library += -lsubstrate -liconv +library += -framework Foundation +library += -framework JavaScriptCore +# XXX: do I just need WebCore? +library += -framework WebKit +library += -liconv flags += -DCY_ATTACH code += Handler.o @@ -15,6 +17,6 @@ inject += Mach/Inject.o Mach/Inject.o: Trampoline.t.hpp Baton.hpp %.t.hpp: %.t.cpp - $(target)gcc -c -o $*.t.o $< && { $(target)otool -l $*.t.o | sed -e '/^ *segname __TEXT$$/ { x; s/^ *sectname //; p; }; /^ *sectname / x; d;' | while read -r sect; do otool -s __TEXT "$$sect" Trampoline.t.o; done | sed -e '/:$$/ d; / section$$/ d; s/^[^ \t]*[ \t]*//;s/ $$//;s/ /\n/g' | sed -e 's/\(..\)\(..\)\(..\)\(..\)/0\x\4,0\x\3,0\x\2,0\x\1/' | tr '\n' ',' | sed -e '$$ s/,$$//; s/^/static const char $*_[] = {/;s/$$/};\n/' && echo && echo "/*" && $(target)otool -vVt $*.t.o && echo "*/"; } >$@ && rm -f $*.t.o + $(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 include ObjectiveC.mk