Make vte dual buildable with gtk2 and gtk3
[vte.git] / src / Makefile.am
1
2 EXTRA_DIST = iso2022.txt
3
4
5 # The library
6
7 headerdir = $(includedir)/vte-$(VTE_API_VERSION)/vte
8 header_HEADERS = pty.h reaper.h vte.h vteaccess.h vtepty.h vtetypebuiltins.h vteversion.h vtedeprecated.h
9
10 lib_LTLIBRARIES = libvte@VTE_LIBRARY_SUFFIX_U@.la
11
12 EXTRA_libvte@VTE_LIBRARY_SUFFIX_U@_la_SOURCES = \
13         genkeysyms.py \
14         keysyms.c \
15         marshal.list \
16         mkunitables.sh \
17         unitable.CNS11643 \
18         unitable.CP437 \
19         unitable.GB12345 \
20         unitable.GB2312 \
21         unitable.JIS0201 \
22         unitable.JIS0208 \
23         unitable.JIS0212 \
24         unitable.KSX1001 \
25         vteseq-2.gperf \
26         vteseq-2.c \
27         vteseq-n.gperf \
28         vteseq-n.c \
29         vtetypebuiltins.c.template \
30         vtetypebuiltins.h.template \
31         $(NULL)
32
33 libvte@VTE_LIBRARY_SUFFIX_U@_la_SOURCES = \
34         buffer.h \
35         caps.c \
36         caps.h \
37         debug.c \
38         debug.h \
39         iso2022.c \
40         iso2022.h \
41         keymap.c \
42         keymap.h \
43         marshal.c \
44         marshal.h \
45         matcher.c \
46         matcher.h \
47         pty.c \
48         pty.h \
49         reaper.c \
50         reaper.h \
51         ring.c \
52         ring.h \
53         table.c \
54         table.h \
55         trie.c \
56         trie.h \
57         vte.c \
58         vte.h \
59         vte-private.h \
60         vteaccess.c \
61         vteaccess.h \
62         vtebg.c \
63         vtebg.h \
64         vteconv.c \
65         vteconv.h \
66         vtedraw.c \
67         vtedraw.h \
68         vtedeprecated.h \
69         vteint.h \
70         vtepty.h \
71         vtepty-private.h \
72         vteregex.c \
73         vteregex.h \
74         vterowdata.c \
75         vterowdata.h \
76         vteseq.c \
77         vteseq-list.h \
78         vtestream.c \
79         vtestream.h \
80         vtestream-base.h \
81         vtestream-file.h \
82         vtetc.c \
83         vtetc.h \
84         vtetree.c \
85         vtetree.h \
86         vtetypebuiltins.c \
87         vtetypebuiltins.h \
88         vteunistr.c \
89         vteunistr.h \
90         vteversion.h
91         $(NULL)
92
93 libvte@VTE_LIBRARY_SUFFIX_U@_la_CPPFLAGS = \
94         -DG_LOG_DOMAIN=\"Vte-$(VTE_API_VERSION)\" \
95         -DDATADIR='"$(datadir)"' \
96         -DLIBEXECDIR='"$(libexecdir)"' \
97         -DLOCALEDIR='"$(localedir)"' \
98         -DVTE_COMPILATION
99 libvte@VTE_LIBRARY_SUFFIX_U@_la_CFLAGS = $(VTE_CFLAGS)
100 libvte@VTE_LIBRARY_SUFFIX_U@_la_LIBADD = $(VTE_LIBS)
101 libvte@VTE_LIBRARY_SUFFIX_U@_la_LDFLAGS = \
102         -version-info $(LIBVTE_LTVERSION) \
103         -export-symbols-regex "^vte_terminal_.*|^vte_pty_.*|^_vte_pty_.*|^vte_reaper_.*|_vte_debug_.*" \
104         @LIBTOOL_EXPORT_OPTIONS@ @LIBTOOL_FLAGS@
105
106
107 # Generated sources
108
109 VTESEQ_BUILTSOURCES = vteseq-list.h vteseq-2.c vteseq-n.c
110 BUILT_SOURCES = marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h $(VTESEQ_BUILTSOURCES)
111 MAINTAINERCLEANFILES = $(VTESEQ_BUILTSOURCES)
112 EXTRA_DIST += $(VTESEQ_BUILTSOURCES)
113 CLEANFILES = marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h stamp-vtetypebuiltins.h
114
115 marshal.c: marshal.list
116         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_vte_marshal --header --body --internal $< > $@
117         
118 marshal.h: marshal.list
119         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_vte_marshal --header --internal $< > $@
120
121 vtetypebuiltins.h: stamp-vtetypebuiltins.h
122         @true
123 stamp-vtetypebuiltins.h: vtetypebuiltins.h.template vte.h vtepty.h vtedeprecated.h
124         $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter %.h,$^) > xgen-vtbh \
125         && (cmp -s xgen-vtbh vtetypebuiltins.h || cp xgen-vtbh vtetypebuiltins.h ) \
126         && rm -f xgen-vtbh \
127         && echo timestamp > $(@F)
128
129 vtetypebuiltins.c: vtetypebuiltins.c.template vte.h vtepty.h vtedeprecated.h
130         $(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter %.h,$^) > xgen-vtbc \
131         && (cmp -s xgen-vtbc vtetypebuiltins.c || cp xgen-vtbc vtetypebuiltins.c ) \
132         && rm -f xgen-vtbc
133
134 vteseq-2.c: vteseq-2.gperf
135         $(AM_V_GEN) $(top_srcdir)/missing --run gperf -m 100 --no-strlen $< > $@.tmp && \
136         mv -f $@.tmp $@
137
138 vteseq-n.c: vteseq-n.gperf
139         $(AM_V_GEN) $(top_srcdir)/missing --run gperf -m 100 $< > $@.tmp && \
140         mv -f $@.tmp $@
141
142 vteseq-list.h: vteseq-2.gperf vteseq-n.gperf
143         $(AM_V_GEN) echo '/* Generated file.  Do not edit */' > $@.tmp && \
144         cat $^ | grep -v '^#' | grep '\<VTE_SEQUENCE_HANDLER\>'| sed 's/.*, //' | LANG=C sort -u >> $@.tmp && \
145         mv -f $@.tmp $@
146
147
148 # vte the application
149
150 bin_PROGRAMS = vte@VTE_LIBRARY_SUFFIX_U@
151
152 vte@VTE_LIBRARY_SUFFIX_U@_SOURCES = vteapp.c
153 vte@VTE_LIBRARY_SUFFIX_U@_CFLAGS = $(VTE_CFLAGS)
154 vte@VTE_LIBRARY_SUFFIX_U@_LDADD = libvte@VTE_LIBRARY_SUFFIX_U@.la $(VTE_LIBS)
155
156 # introspection
157
158 INTROSPECTION_GIRS =
159 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
160 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
161
162 if HAVE_INTROSPECTION
163
164 Vte-@VTE_API_VERSION@.gir: libvte@VTE_LIBRARY_SUFFIX_U@.la
165 Vte_@VTE_API_VERSION_U@_gir_INCLUDES = Pango-1.0 Gdk-$(GTK_API_VERSION) Gtk-$(GTK_API_VERSION)
166 Vte_@VTE_API_VERSION_U@_gir_CFLAGS = $(VTE_CFLAGS) -DVTE_COMPILATION -I$(top_srcdir)
167 Vte_@VTE_API_VERSION_U@_gir_LIBS = libvte@VTE_LIBRARY_SUFFIX_U@.la
168 Vte_@VTE_API_VERSION_U@_gir_FILES = \
169         vte.c \
170         vte.h \
171         vtepty.h \
172         pty.c \
173         vtetypebuiltins.c \
174         vtetypebuiltins.h \
175         $(NULL)
176
177 INTROSPECTION_GIRS += Vte-$(VTE_API_VERSION).gir
178
179 girdir = $(INTROSPECTION_GIRDIR)
180 dist_gir_DATA = $(INTROSPECTION_GIRS)
181
182 typelibdir = $(INTROSPECTION_TYPELIBDIR)
183 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
184
185 CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
186 endif
187
188
189 # Misc unit tests and utilities
190
191 vtelibdir = $(libdir)/vte-$(VTE_API_VERSION)
192 vtelib_PROGRAMS = interpret slowcat
193 vtelib_SCRIPTS = decset osc window
194 EXTRA_DIST += $(pkglib_SCRIPTS)
195
196 TEST_SH = check-doc-syntax.sh
197 EXTRA_DIST += $(TEST_SH)
198
199 check_PROGRAMS = dumpkeys iso2022 reaper reflect-text-view reflect-vte mev ssfe table trie xticker vteconv vtetc
200 TESTS = table trie $(TEST_SH)
201
202 AM_CFLAGS = $(GLIB_CFLAGS)
203 LDADD = $(GLIB_LIBS)
204
205 reflect_text_view_CPPFLAGS = -DUSE_TEXT_VIEW
206 reflect_text_view_CFLAGS = $(VTE_CFLAGS)
207 reflect_text_view_SOURCES = reflect.c
208 reflect_text_view_LDADD = $(VTE_LIBS)
209
210 reflect_vte_CPPFLAGS = -DUSE_VTE
211 reflect_vte_CFLAGS = $(VTE_CFLAGS)
212 reflect_vte_SOURCES = reflect.c
213 reflect_vte_LDADD = libvte@VTE_LIBRARY_SUFFIX_U@.la $(VTE_LIBS)
214
215 interpret_SOURCES = \
216         buffer.h \
217         caps.c \
218         caps.h \
219         debug.c \
220         debug.h \
221         iso2022.c \
222         iso2022.h \
223         matcher.c \
224         matcher.h \
225         table.c \
226         table.h \
227         trie.c \
228         trie.h \
229         vteconv.c \
230         vteconv.h \
231         vtetc.c \
232         vtetc.h \
233         vtetree.c \
234         vtetree.h \
235         interpret.c
236 interpret_CPPFLAGS = \
237         -DINTERPRET_MAIN \
238         -DDATADIR='"$(datadir)"'
239 interpret_CFLAGS = $(GTK_CFLAGS)
240 interpret_LDADD = $(GTK_LIBS)
241
242 iso2022_SOURCES = \
243         buffer.h \
244         caps.c \
245         caps.h \
246         debug.c \
247         debug.h \
248         iso2022.c \
249         iso2022.h \
250         matcher.c \
251         matcher.h \
252         table.c \
253         table.h \
254         trie.c \
255         trie.h \
256         vteconv.c \
257         vteconv.h \
258         vtetc.c \
259         vtetc.h \
260         vtetree.c \
261         vtetree.h
262 iso2022_CPPFLAGS = -DISO2022_MAIN
263 iso2022_CFLAGS = $(GTK_CFLAGS)
264 iso2022_LDADD = $(GTK_LIBS)
265
266 slowcat_SOURCES = \
267         slowcat.c
268
269 table_SOURCES = \
270         buffer.h \
271         caps.c \
272         caps.h \
273         debug.c \
274         debug.h \
275         matcher.c \
276         matcher.h \
277         table.c \
278         table.h \
279         trie.c \
280         trie.h \
281         vteconv.c \
282         vteconv.h \
283         vtetc.c \
284         vtetc.h
285 table_CPPFLAGS = -DTABLE_MAIN
286 table_CFLAGS = $(VTE_CFLAGS)
287 table_LDADD = $(VTE_LIBS)
288
289 trie_SOURCES = \
290         trie.c \
291         trie.h \
292         buffer.h \
293         caps.c \
294         caps.h \
295         debug.c \
296         debug.h \
297         matcher.c \
298         matcher.h \
299         table.c \
300         table.h \
301         vteconv.c \
302         vteconv.h \
303         vtetc.c \
304         vtetc.h 
305 trie_CPPFLAGS = -DTRIE_MAIN
306 trie_CFLAGS = $(VTE_CFLAGS)
307 trie_LDADD = $(VTE_LIBS)
308
309 vtetc_SOURCES = vtetc.c vtetc.h debug.c debug.h
310 vtetc_CPPFLAGS = -DTERMCAP_MAIN
311
312 reaper_SOURCES = reaper.c reaper.h debug.c debug.h marshal.c marshal.h
313 reaper_CPPFLAGS =  -DREAPER_MAIN -DLOCALEDIR='"$(localedir)"'
314
315 vteconv_SOURCES = buffer.h debug.c debug.h vteconv.c vteconv.h
316 vteconv_CPPFLAGS = -DVTECONV_MAIN
317 vteconv_CFLAGS = $(VTE_CFLAGS)
318 vteconv_LDADD = $(VTE_LIBS)
319
320 dumpkeys_SOURCES = dumpkeys.c
321 mev_SOURCES = mev.c
322 ssfe_SOURCES = ssfe.c
323 xticker_SOURCES = xticker.c
324
325 -include $(top_srcdir)/git.mk
326 -include $(INTROSPECTION_MAKEFILE)