]> git.saurik.com Git - cycript.git/blobdiff - makefile
Fixed a typo I made while coding on my iPhone, on an airplane.
[cycript.git] / makefile
index a77d33053408c40244db1aa6fcb61d7acb3df097..edf2668c024ba26bc7cfad38c2ab6c57cedde8f0 100644 (file)
--- a/makefile
+++ b/makefile
@@ -30,7 +30,7 @@ filters := C
 ldid := echo
 dll := so
 apr := $(shell apr-1-config --link-ld)
-library := $(apr) -lffi
+library := $(apr) -lffi -liconv
 console := $(apr) -lreadline
 depends :=
 
@@ -39,6 +39,12 @@ uname_p := $(shell uname -p)
 -include $(uname_s).mk
 -include $(uname_s)-$(uname_p).mk
 
+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
@@ -98,17 +104,18 @@ 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)