From: Jay Freeman (saurik) Date: Tue, 8 Dec 2009 21:48:31 +0000 (+0000) Subject: Changed an int to a size_t in my lexer, and removed the uname -m hack that Apple... X-Git-Tag: v0.9.432~124 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/c4b2057d5b9977196e3667348784138fde93008b?ds=sidebyside Changed an int to a size_t in my lexer, and removed the uname -m hack that Apple forced me to have and put it somewhere else so that Apple's other bug on the iPhone (the hw.machine thing) doesn't burn me. --- diff --git a/Darwin-i386.mk b/Darwin-i386.mk deleted file mode 100644 index aa233eb..0000000 --- a/Darwin-i386.mk +++ /dev/null @@ -1,7 +0,0 @@ -flags += -DCY_ATTACH -code += Handler.o -inject += Mach/Inject.o -Mach/Inject.o: Trampoline.t.hpp Baton.hpp - -%.t.hpp: %.t.cpp - $(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 diff --git a/Darwin.mk b/Darwin.mk index 34961a1..db1dc26 100644 --- a/Darwin.mk +++ b/Darwin.mk @@ -9,5 +9,15 @@ library += -framework WebKit library += -liconv flags += -I/usr/include/ffi +ifeq ($(uname_m),i386) +flags += -DCY_ATTACH +code += Handler.o +inject += Mach/Inject.o +Mach/Inject.o: Trampoline.t.hpp Baton.hpp + +%.t.hpp: %.t.cpp + $(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 +endif + include Execute.mk include ObjectiveC.mk diff --git a/makefile b/makefile index 7711fbd..190fbb4 100644 --- a/makefile +++ b/makefile @@ -50,7 +50,6 @@ uname_m ?= $(shell uname -m) -include $(uname_s).mk -include $(uname_s)-$(uname_p).mk --include $(uname_s)-$(uname_m).mk ifneq ($(shell pkg-config libffi --modversion 2>/dev/null),) flags += $(shell pkg-config --cflags libffi)