]> git.saurik.com Git - cycript.git/blob - Darwin.mk
Fixed a new Type_privateData NULL pool assert.
[cycript.git] / Darwin.mk
1 # XXX: objective-c exists on non-Darwin
2
3 dll := dylib
4 flags += -DCY_EXECUTE
5 link += -lobjc -framework CoreFoundation
6 console += -framework Foundation
7 library += -install_name /usr/lib/libcycript.$(dll)
8 library += -framework Foundation
9 library += -framework JavaScriptCore
10 # XXX: do I just need WebCore?
11 library += -framework WebKit
12 library += -liconv
13
14 flags += -DCY_ATTACH
15 code += Handler.o
16 inject += Mach/Inject.o
17 Mach/Inject.o: Trampoline.t.hpp Baton.hpp
18
19 %.t.hpp: %.t.cpp
20 $(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
21
22 include ObjectiveC.mk