]> git.saurik.com Git - cycript.git/blame - Darwin.mk
Add -fno-stack-protector to Trampoline.
[cycript.git] / Darwin.mk
CommitLineData
9185d5ef 1dll := dylib
dfa452c2
JF
2link += -lobjc -framework CoreFoundation
3console += -framework Foundation
9185d5ef 4library += -install_name /usr/lib/libcycript.$(dll)
7c6c5b0a
JF
5library += -framework Foundation
6library += -framework JavaScriptCore
7# XXX: do I just need WebCore?
8library += -framework WebKit
9library += -liconv
0ddd648c 10flags += -I/usr/include/ffi
71f832e5 11apr_config := /usr/bin/apr-1-config
1e7ce557 12
53b59114
JF
13ifeq ($(uname_p),i386)
14flags += -m32
15endif
16
c4b2057d
JF
17flags += -DCY_ATTACH
18code += Handler.o
19inject += Mach/Inject.o
20Mach/Inject.o: Trampoline.t.hpp Baton.hpp
21
22%.t.hpp: %.t.cpp
6f382d8d 23 $(target)gcc -c -fno-stack-protector -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
64058139
JF
24
25clean::
26 rm -f Trampoline.t.hpp
c4b2057d 27
9cad30fa 28include Execute.mk
cbaa5f0f 29include ObjectiveC.mk