]> git.saurik.com Git - cycript.git/blame_incremental - Makefile.am
Upgrading to clang++-3.7 found infinite recursion.
[cycript.git] / Makefile.am
... / ...
CommitLineData
1# Cycript - Optimizing JavaScript Compiler/Runtime
2# Copyright (C) 2009-2015 Jay Freeman (saurik)
3
4# GNU Affero General Public License, Version 3 {{{
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as published by
8# the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Affero General Public License for more details.
15#
16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18# }}}
19
20.DELETE_ON_ERROR:
21
22AUTOMAKE_OPTIONS = subdir-objects
23CLEANFILES =
24SUBDIRS =
25
26ACLOCAL_AMFLAGS = -I m4
27
28AM_CPPFLAGS = -DYYDEBUG=1
29AM_CPPFLAGS += -include config.h -include $(srcdir)/unconfig.h
30
31AM_OBJCXXFLAGS = -fobjc-exceptions
32
33CY_LDFLAGS = -no-undefined -avoid-version -export-dynamic
34
35lib_LTLIBRARIES =
36
37lib_LTLIBRARIES += libcycript.la
38libcycript_la_LDFLAGS = $(CY_LDFLAGS)
39libcycript_la_LIBADD = $(LTLIBFFI) $(LTLIBGCC) -ldl
40
41libcycript_la_SOURCES = ConvertUTF.c Decode.cpp Driver.cpp Highlight.cpp Library.cpp Network.cpp Output.cpp Parser.cpp Replace.cpp
42libcycript_la_SOURCES += Cycript.tab.cc lex.cy.cpp
43
44filters =
45
46if CY_CONSOLE
47bin_PROGRAMS = cycript
48cycript_SOURCES = Console.cpp Display.cpp
49cycript_LDADD = libcycript.la $(LTLIBREADLINE) $(LTLIBTERMCAP) $(LTLIBGCC) $(PTHREAD_CFLAGS) -ldl
50endif
51
52if CY_EXECUTE
53libcycript_la_SOURCES += sig/ffi_type.cpp sig/parse.cpp sig/copy.cpp
54libcycript_la_SOURCES += Bridge.cpp Execute.cpp JavaScriptCore.cpp
55libcycript_la_LIBADD += $(LTJAVASCRIPTCORE)
56
57AM_CPPFLAGS += -DCY_EXECUTE
58filters += C
59
60Bridge.lo: Bridge.hpp
61
62CLEANFILES += Bridge.gperf
63Bridge.gperf: Bridge.def Bridge.sh
64 $(srcdir)/Bridge.sh $< >$@
65
66CLEANFILES += Bridge.hpp
67Bridge.hpp: Bridge.gperf
68 $(GPERF) $< | $(SED) -e 's/defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__/0/' >$@
69endif
70
71if CY_JAVA
72filters += Java
73libcycript_la_SOURCES += Java/Execute.cpp
74libcycript_la_LIBADD += $(LTJAVA)
75endif
76
77if CY_OBJECTIVEC
78filters += ObjectiveC
79libcycript_la_SOURCES += ObjectiveC/Output.cpp ObjectiveC/Replace.cpp ObjectiveC/Library.mm
80libcycript_la_LIBADD += $(LTOBJECTIVEC)
81endif
82
83if CY_ATTACH
84libcycript_la_SOURCES += Handler.cpp
85
86if CY_CONSOLE
87cycript_SOURCES += Inject.cpp
88AM_CPPFLAGS += -DCY_ATTACH
89endif
90endif
91
92CLEANFILES += Cycript.yy
93Cycript.yy: Cycript.yy.in
94 $(srcdir)/Filter.sh <$< >$@ $(filters)
95
96CLEANFILES += Cycript.l
97Cycript.l: Cycript.l.in
98 $(srcdir)/Filter.sh <$< >$@ $(filters)
99
100CLEANFILES += lex.cy.cpp
101lex.cy.cpp: Cycript.l
102 $(FLEX) -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/' >$@
103
104Console.$(OBJEXT) Cycript.tab.lo Driver.lo Handler.lo Highlight.lo Library.lo lex.cy.lo: Cycript.tab.hh
105
106CLEANFILES += Cycript.tab.cc Cycript.tab.hh stack.hh Cycript.output
107Cycript.tab.cc Cycript.tab.hh stack.hh Cycript.output: Cycript.yy
108 $(BISON) -v --report=state $<
109 ! grep -n '^State [0-9]* conflicts:' Cycript.output
110 ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep 'shift, and go to state [0-9]*$$'
111 ! grep -n '^ *$$default reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep -v '$$default' | grep 'reduce using rule [0-9]* ([^)]*)$$'