X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/eacba955d0c7337521a8985868f86d525b8cc99c..cb02f8aec13cb7ffea9631c401293e80447e6ae7:/makefile diff --git a/makefile b/makefile index a77d330..f85f998 100644 --- a/makefile +++ b/makefile @@ -27,10 +27,10 @@ code += Network.o Parser.o code += JavaScriptCore.o Library.o filters := C -ldid := echo +ldid := true dll := so apr := $(shell apr-1-config --link-ld) -library := $(apr) -lffi +library := $(apr) -lffi -liconv console := $(apr) -lreadline depends := @@ -39,9 +39,15 @@ uname_p := $(shell uname -p) -include $(uname_s).mk -include $(uname_s)-$(uname_p).mk -flags += -g3 -O0 -DYYDEBUG=1 -#flags += -g0 -O3 -flags += -Wall -Werror -Wno-parentheses +ifeq ($(filter ObjectiveC,$(filters)),) +ifneq ($(shell which gnustep-config 2>/dev/null),) +include GNUstep.mk +endif +endif + +#flags += -g3 -O0 -DYYDEBUG=1 +flags += -g0 -O3 +flags += -Wall -Werror -Wno-parentheses #-Wno-unused flags += -fPIC -fno-common flags += -I. -I$(shell apr-1-config --includedir) @@ -83,7 +89,10 @@ libcycript.plist: Bridge.def echo '})'; \ } >$@ -Cycript.y: Cycript.y.in +%.y: %.y.in + ./Filter.sh <$< >$@ $(filters) + +%.l: %.l.in ./Filter.sh <$< >$@ $(filters) Cycript.tab.cc Cycript.tab.hh location.hh position.hh: Cycript.y @@ -98,25 +107,26 @@ lex.cy.c: Cycript.l %.o: sig/%.cpp $(target)g++ $(flags) -c -o $@ $< -Cycript.tab.o: Cycript.tab.cc Cycript.tab.hh Parser.hpp Pooling.hpp +Cycript.tab.o: Cycript.tab.cc $(header) $(target)g++ $(flags) -c -o $@ $< -lex.cy.o: lex.cy.c Cycript.tab.hh Parser.hpp Pooling.hpp +lex.cy.o: lex.cy.c $(header) $(target)g++ $(flags) -c -o $@ $< %.o: %.cpp $(header) $(target)g++ $(flags) -c -o $@ $< +#objc := -x c++ %.o: %.mm $(header) - $(target)g++ $(flags) -c -o $@ $< $(objc) + $(target)g++ $(objc) $(flags) -c -o $@ $< libcycript.$(dll): $(code) $(target)g++ $(flags) -shared -dynamiclib -o $@ $(filter %.o,$^) $(library) $(link) - $(ldid) -S $@ + $(ldid) $@ cycript: Console.o libcycript.$(dll) $(target)g++ $(flags) -o $@ $(filter %.o,$^) -L. -lcycript $(console) $(link) - $(ldid) -S cycript + $(ldid) cycript package: $(deb)