]> git.saurik.com Git - cycript.git/blame - Makefile.am
Remove XXX as cur_term is not part of readline.
[cycript.git] / Makefile.am
CommitLineData
a243b558
JF
1SHELL = @_BASH@
2
3.DELETE_ON_ERROR:
4
5AUTOMAKE_OPTIONS = subdir-objects
6CLEANFILES =
7SUBDIRS =
8
9ACLOCAL_AMFLAGS = -I m4
10
11# XXX: do I really need -fno-common?
12AM_CPPFLAGS = -Werror -fno-common -I$(srcdir)/include -DYYDEBUG=1
13
14lib_LTLIBRARIES = libcycript.la
15libcycript_la_SOURCES = Highlight.cpp Network.cpp Output.cpp Parser.cpp Replace.cpp
812bb90b 16libcycript_la_LDFLAGS = -no-undefined $(LTLIBAPR) $(LTLIBICONV) -ldl
a243b558
JF
17
18libcycript_la_SOURCES += Cycript.tab.cc
19libcycript_la_SOURCES += lex.cy.cpp
20
21bin_PROGRAMS = cycript
22cycript_SOURCES = Console.cpp Display.cpp
6f9aea2b 23cycript_LDFLAGS = $(LTLIBAPR) $(LTLIBREADLINE) $(LTLIBTERMCAP) -ldl
a243b558
JF
24cycript_LDADD = libcycript.la
25
26ldid = true
27entitle = $(ldid) -Scycript.xml
28
9228a43a 29filters = $(CY_FILTERS)
a243b558
JF
30
31if CY_EXECUTE
32libcycript_la_SOURCES += sig/ffi_type.cpp sig/parse.cpp sig/copy.cpp
33libcycript_la_SOURCES += Bridge.cpp Execute.cpp JavaScriptCore.cpp Library.cpp
34
35AM_CPPFLAGS += -DCY_EXECUTE
36filters += C
37
38Bridge.lo: Bridge.hpp
39
40CLEANFILES += Bridge.gperf
41Bridge.gperf: Bridge.def Bridge.sh
42 $(srcdir)/Bridge.sh $< >$@
43
44CLEANFILES += Bridge.hpp
45Bridge.hpp: Bridge.gperf
46 $(GPERF) $< | $(SED) -e 's/defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/0/' >$@
47endif
48
49if CY_OBJECTIVEC
50filters += ObjectiveC
51libcycript_la_SOURCES += ObjectiveC/Output.mm ObjectiveC/Replace.cpp ObjectiveC/Library.mm
52
53ObjectiveC/Library.lo: Struct.hpp
54
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.
57CLEANFILES += Struct.hpp
58Struct.hpp:
59 $$($(OBJCXX) -print-prog-name=cc1obj) -print-objc-runtime-info </dev/null >$@
60endif
61
62if CY_MACH
63libcycript_la_SOURCES += Handler.mm
64cycript_SOURCES += Mach/Inject.cpp
65
66AM_CPPFLAGS += -DCY_ATTACH -DCY_LIBRARY='"$(libdir)/libcycript.$(SO)"'
67
68Mach/Inject.$(OBJEXT): Trampoline.t.hpp
69
70CLEANFILES += Trampoline.t.lo
9228a43a 71Trampoline.t.lo: Trampoline.t.cpp Trampoline.hpp Baton.hpp Standard.hpp
a243b558 72 $(LTCXXCOMPILE) $(CY_ARCH) -c -o $@ $< -fno-stack-protector -fno-exceptions -O0
a243b558
JF
73
74CLEANFILES += libTrampoline.t.la
9228a43a 75libTrampoline.t.la: Trampoline.t.lo
a243b558 76 $(CXXLINK) $(CY_ARCH) -rpath $(libdir) $^
a243b558
JF
77
78CLEANFILES += Trampoline.t.hpp
9228a43a
JF
79Trampoline.t.hpp: libTrampoline.t.la trampoline.sh
80 $(srcdir)/trampoline.sh $@ .libs/libTrampoline.t.dylib Trampoline $(SED) $(LIPO) $(NM) $(OTOOL)
a243b558
JF
81endif
82
83CLEANFILES += Cycript.yy
9228a43a 84Cycript.yy: Cycript.yy.in
a243b558
JF
85 $(srcdir)/Filter.sh <$< >$@ $(filters)
86
87CLEANFILES += Cycript.l
9228a43a 88Cycript.l: Cycript.l.in
a243b558
JF
89 $(srcdir)/Filter.sh <$< >$@ $(filters)
90
91CLEANFILES += lex.cy.cpp
92lex.cy.cpp: Cycript.l
93 $(FLEX) -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/' >$@
94
95Highlight.lo: Cycript.tab.hh
96
97CLEANFILES += Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh Cycript.output
98Cycript.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]* ([^)]*)$$'