5 AUTOMAKE_OPTIONS = subdir-objects
9 ACLOCAL_AMFLAGS = -I m4
11 # XXX: do I really need -fno-common?
12 AM_CPPFLAGS = -Werror -fno-common -I$(srcdir)/include -DYYDEBUG=1
14 lib_LTLIBRARIES = libcycript.la
15 libcycript_la_SOURCES = Highlight.cpp Network.cpp Output.cpp Parser.cpp Replace.cpp
16 libcycript_la_LDFLAGS = -no-undefined $(LTLIBAPR) $(LTLIBICONV) -ldl
18 libcycript_la_SOURCES += Cycript.tab.cc
19 libcycript_la_SOURCES += lex.cy.cpp
21 bin_PROGRAMS = cycript
22 cycript_SOURCES = Console.cpp Display.cpp
23 cycript_LDFLAGS = $(LTLIBAPR) -ldl
24 cycript_LDADD = libcycript.la
27 entitle = $(ldid) -Scycript.xml
29 filters = $(CY_FILTERS)
32 libcycript_la_SOURCES += sig/ffi_type.cpp sig/parse.cpp sig/copy.cpp
33 libcycript_la_SOURCES += Bridge.cpp Execute.cpp JavaScriptCore.cpp Library.cpp
35 AM_CPPFLAGS += -DCY_EXECUTE
40 CLEANFILES += Bridge.gperf
41 Bridge.gperf: Bridge.def Bridge.sh
42 $(srcdir)/Bridge.sh $< >$@
44 CLEANFILES += Bridge.hpp
45 Bridge.hpp: Bridge.gperf
46 $(GPERF) $< | $(SED) -e 's/defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/0/' >$@
51 libcycript_la_SOURCES += ObjectiveC/Output.mm ObjectiveC/Replace.cpp ObjectiveC/Library.mm
53 ObjectiveC/Library.lo: Struct.hpp
55 # XXX: this is not architecture-specific... isn't this just totally wrong?!
56 # XXX: clang doesn't support this feature... that makes me really very sad.
57 CLEANFILES += Struct.hpp
59 $$($(OBJCXX) -print-prog-name=cc1obj) -print-objc-runtime-info </dev/null >$@
63 libcycript_la_SOURCES += Handler.mm
64 cycript_SOURCES += Mach/Inject.cpp
66 AM_CPPFLAGS += -DCY_ATTACH -DCY_LIBRARY='"$(libdir)/libcycript.$(SO)"'
68 Mach/Inject.$(OBJEXT): Trampoline.t.hpp
70 CLEANFILES += Trampoline.t.lo
71 Trampoline.t.lo: Trampoline.t.cpp Trampoline.hpp Baton.hpp Standard.hpp
72 $(LTCXXCOMPILE) $(CY_ARCH) -c -o $@ $< -fno-stack-protector -fno-exceptions -O0
74 CLEANFILES += libTrampoline.t.la
75 libTrampoline.t.la: Trampoline.t.lo
76 $(CXXLINK) $(CY_ARCH) -rpath $(libdir) $^
78 CLEANFILES += Trampoline.t.hpp
79 Trampoline.t.hpp: libTrampoline.t.la trampoline.sh
80 $(srcdir)/trampoline.sh $@ .libs/libTrampoline.t.dylib Trampoline $(SED) $(LIPO) $(NM) $(OTOOL)
83 CLEANFILES += Cycript.yy
84 Cycript.yy: Cycript.yy.in
85 $(srcdir)/Filter.sh <$< >$@ $(filters)
87 CLEANFILES += Cycript.l
88 Cycript.l: Cycript.l.in
89 $(srcdir)/Filter.sh <$< >$@ $(filters)
91 CLEANFILES += lex.cy.cpp
93 $(FLEX) -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/' >$@
95 Highlight.lo: Cycript.tab.hh
97 CLEANFILES += Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh Cycript.output
98 Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh Cycript.output: Cycript.yy
99 $(BISON) -v --report=state $<
100 ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep 'shift, and go to state [0-9]*$$'
101 ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep -v '$$default' | grep 'reduce using rule [0-9]* ([^)]*)$$'