]> git.saurik.com Git - cycript.git/blame - Darwin.mk
Use dlsym(), not struct Baton.
[cycript.git] / Darwin.mk
CommitLineData
61116d3f
JF
1prefix := /sw
2
9185d5ef 3dll := dylib
dfa452c2
JF
4link += -lobjc -framework CoreFoundation
5console += -framework Foundation
f74bdcf6 6library += -install_name $(prefix)/lib/libcycript.$(dll)
7c6c5b0a 7library += -framework Foundation
95a2c7e5 8console += -framework JavaScriptCore
7c6c5b0a 9# XXX: do I just need WebCore?
95a2c7e5
JF
10console += -framework WebKit
11library += -undefined dynamic_lookup
7c6c5b0a 12library += -liconv
0ddd648c 13flags += -I/usr/include/ffi
71f832e5 14apr_config := /usr/bin/apr-1-config
eed4f174 15flags += -arch i386 -arch x86_64 #-arch armv6
53b59114 16
8ddfe223
JF
17flags += -mmacosx-version-min=10.5
18
f74bdcf6 19flags += -DCY_ATTACH -DCY_LIBRARY='"$(prefix)/lib/libcycript.dylib"'
c4b2057d
JF
20code += Handler.o
21inject += Mach/Inject.o
22Mach/Inject.o: Trampoline.t.hpp Baton.hpp
23
eed4f174
JF
24%.t.hpp: %.t.cpp trampoline.sh Baton.hpp Trampoline.hpp Darwin.mk
25 ./trampoline.sh $@ $*.t.dylib $* sed $(target){otool,lipo,nm,gcc} $(flags) -dynamiclib -g0 -fno-stack-protector -fno-exceptions -Iinclude $< -o $*.t.dylib
64058139
JF
26
27clean::
28 rm -f Trampoline.t.hpp
c4b2057d 29
9cad30fa 30include Execute.mk
cbaa5f0f 31include ObjectiveC.mk