]> git.saurik.com Git - cycript.git/blame - Darwin.mk
Added Microsoft Ajax Minifier to local test output.
[cycript.git] / Darwin.mk
CommitLineData
4de0686f
JF
1# XXX: objective-c exists on non-Darwin
2
9185d5ef 3dll := dylib
b166b11b 4flags += -DCY_EXECUTE
dfa452c2
JF
5link += -lobjc -framework CoreFoundation
6console += -framework Foundation
9185d5ef 7library += -install_name /usr/lib/libcycript.$(dll)
7c6c5b0a
JF
8library += -framework Foundation
9library += -framework JavaScriptCore
10# XXX: do I just need WebCore?
11library += -framework WebKit
12library += -liconv
1e7ce557 13
b166b11b
JF
14flags += -DCY_ATTACH
15code += Handler.o
16inject += Mach/Inject.o
17Mach/Inject.o: Trampoline.t.hpp Baton.hpp
18
19%.t.hpp: %.t.cpp
7c6c5b0a 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
b166b11b 21
9cad30fa 22include Execute.mk
cbaa5f0f 23include ObjectiveC.mk