]> git.saurik.com Git - cycript.git/blobdiff - Darwin.mk
Fixed a bug with trailing backslashes in trampoline comments.
[cycript.git] / Darwin.mk
index bbb669113dc095cb35eae6d3018b78db761eb986..1289855210fd36fed9806c175b188056ea4478f4 100644 (file)
--- a/Darwin.mk
+++ b/Darwin.mk
@@ -1,12 +1,27 @@
-# XXX: objective-c exists on non-Darwin
-
 dll := dylib
-flags += -DCY_ATTACH -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
+console += -framework JavaScriptCore
+# XXX: do I just need WebCore?
+console += -framework WebKit
+library += -undefined dynamic_lookup
+library += -liconv
+flags += -I/usr/include/ffi
+apr_config := /usr/bin/apr-1-config
+flags += -arch i386 -arch x86_64 #-arch armv6
+
+flags += -DCY_ATTACH
+code += Handler.o
+inject += Mach/Inject.o
+Mach/Inject.o: Trampoline.t.hpp Baton.hpp
+
+%.t.hpp: %.t.cpp trampoline.sh Baton.hpp Trampoline.hpp Darwin.mk
+       ./trampoline.sh $@ $*.t.dylib $* sed $(target){otool,lipo,nm,gcc} $(flags) -dynamiclib -g0 -fno-stack-protector -fno-exceptions -Iinclude $< -o $*.t.dylib
+
+clean::
+       rm -f Trampoline.t.hpp
 
+include Execute.mk
 include ObjectiveC.mk