1bin_PROGRAMS =
2noinst_PROGRAMS = testvte
3
4CLEANFILES =
5DISTCLEANFILES =
6MAINTAINERCLEANFILES =
7EXTRA_DIST =
8
9# The library
10
11headerdir = $(includedir)/vte-$(VTE_API_VERSION)/vte
12header_HEADERS = \
13	vte.h \
14	vtedeprecated.h \
15	vteenums.h \
16	vteglobals.h \
17	vtemacros.h \
18	vtepty.h \
19	vteterminal.h \
20	$(NULL)
21
22nodist_header_HEADERS = \
23	vtetypebuiltins.h \
24	vteversion.h \
25	$(NULL)
26
27lib_LTLIBRARIES = libvte-@VTE_API_MAJOR_VERSION@.@VTE_API_MINOR_VERSION@.la
28
29EXTRA_libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_SOURCES = \
30	box_drawing_generate.sh \
31	marshal.list \
32	vteseq-n.gperf \
33	vteseq-n.c \
34	vtetypebuiltins.c.template \
35	vtetypebuiltins.h.template \
36	$(NULL)
37
38libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_SOURCES = \
39	buffer.h \
40	caps.c \
41	caps.h \
42	debug.c \
43	debug.h \
44	iso2022.c \
45	iso2022.h \
46	keymap.c \
47	keymap.h \
48	matcher.c \
49	matcher.h \
50	pty.c \
51	ring.c \
52	ring.h \
53	table.c \
54	table.h \
55	vte.c \
56	vte.h \
57	vte-private.h \
58	vteaccess.c \
59	vteaccess.h \
60	vteconv.c \
61	vteconv.h \
62	vtedraw.c \
63	vtedraw.h \
64	vtedeprecated.h \
65	vteenums.h \
66	vteglobals.h \
67	vteint.h \
68	vtemacros.h \
69	vtepty.h \
70	vtepty-private.h \
71	vterowdata.c \
72	vterowdata.h \
73	vteseq.c \
74	vteseq-list.h \
75	vtestream.c \
76	vtestream.h \
77	vtestream-base.h \
78	vtestream-file.h \
79	vteterminal.h \
80	vtetree.c \
81	vtetree.h \
82	vteunistr.c \
83	vteunistr.h \
84	vteutils.c \
85	vteutils.h \
86	$(NULL)
87
88nodist_libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_SOURCES = \
89	box_drawing.h \
90	marshal.c \
91	marshal.h \
92	vteresources.c \
93	vtetypebuiltins.c \
94	vtetypebuiltins.h \
95	vteversion.h \
96	$(NULL)
97
98libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_CPPFLAGS = \
99	-DG_LOG_DOMAIN=\"Vte\" \
100	-DVTE_API_VERSION=\"$(VTE_API_VERSION)\" \
101	-DDATADIR='"$(datadir)"' \
102	-DLIBEXECDIR='"$(libexecdir)"' \
103	-DLOCALEDIR='"$(localedir)"' \
104	-DGLIB_DISABLE_DEPRECATION_WARNINGS \
105	-DVTE_COMPILATION \
106	$(AM_CPPFLAGS)
107
108libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_CFLAGS = \
109	$(VTE_CFLAGS) \
110	$(AM_CFLAGS)
111
112libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_LDFLAGS = \
113	$(VTE_LDFLAGS) \
114	-version-info $(LT_VERSION_INFO) \
115	-export-symbols-regex "^vte_.*" \
116	$(AM_LDFLAGS)
117
118libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_LIBADD = \
119	$(VTE_LIBS)
120
121# Generated sources
122
123VTESEQ_BUILTSOURCES = vteseq-list.h vteseq-n.c
124BUILT_SOURCES = box_drawing.h marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h vteresources.c $(VTESEQ_BUILTSOURCES)
125MAINTAINERCLEANFILES += $(VTESEQ_BUILTSOURCES)
126EXTRA_DIST += $(VTESEQ_BUILTSOURCES) box_drawing.txt box_drawing_generate.sh iso2022.txt
127CLEANFILES += box_drawing.h marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h stamp-vtetypebuiltins.h vteresources.c
128
129box_drawing.h: box_drawing.txt box_drawing_generate.sh
130	$(AM_V_GEN) $(srcdir)/box_drawing_generate.sh < $< > $@
131
132marshal.c: marshal.list
133	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_vte_marshal --header --body --internal $< > $@
134
135marshal.h: marshal.list
136	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_vte_marshal --header --internal $< > $@
137
138vtetypebuiltins.h: stamp-vtetypebuiltins.h
139	@true
140stamp-vtetypebuiltins.h: vtetypebuiltins.h.template vteenums.h vtedeprecated.h
141	$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter %.h,$^) > xgen-vtbh \
142	&& (cmp -s xgen-vtbh vtetypebuiltins.h || cp xgen-vtbh vtetypebuiltins.h ) \
143	&& rm -f xgen-vtbh \
144	&& echo timestamp > $(@F)
145
146vtetypebuiltins.c: vtetypebuiltins.c.template vteenums.h vtedeprecated.h
147	$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter %.h,$^) > xgen-vtbc \
148	&& (cmp -s xgen-vtbc vtetypebuiltins.c || cp xgen-vtbc vtetypebuiltins.c ) \
149	&& rm -f xgen-vtbc
150
151vteseq-n.c: vteseq-n.gperf
152	$(AM_V_GEN) $(top_srcdir)/missing --run gperf -m 100 $< > $@.tmp && \
153	mv -f $@.tmp $@
154
155vteseq-list.h: vteseq-n.gperf
156	$(AM_V_GEN) echo '/* Generated file.  Do not edit */' > $@.tmp && \
157	cat $^ | grep -v '^#' | grep '\<VTE_SEQUENCE_HANDLER\>'| sed 's/.*, //' | LANG=C sort -u >> $@.tmp && \
158	mv -f $@.tmp $@
159
160vteresources.c: vte.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies vte.gresource.xml)
161	$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir . --generate --c-name vte $<
162
163# introspection
164
165INTROSPECTION_GIRS =
166INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
167INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
168
169if HAVE_INTROSPECTION
170include $(INTROSPECTION_MAKEFILE)
171
172Vte-@VTE_API_VERSION@.gir: libvte-$(VTE_API_VERSION).la
173Vte_@VTE_API_VERSION_U@_gir_INCLUDES = Pango-1.0 Gdk-$(GTK_API_VERSION) Gtk-$(GTK_API_VERSION)
174Vte_@VTE_API_VERSION_U@_gir_CFLAGS = $(VTE_CFLAGS) -DVTE_COMPILATION -I$(top_srcdir)
175Vte_@VTE_API_VERSION_U@_gir_LIBS = libvte-$(VTE_API_VERSION).la
176Vte_@VTE_API_VERSION_U@_gir_EXPORT_PACKAGES = vte-$(VTE_API_VERSION)
177Vte_@VTE_API_VERSION_U@_gir_SCANNERFLAGS = --c-include "vte/vte.h"
178Vte_@VTE_API_VERSION_U@_gir_FILES = \
179	vte.c \
180	vte.h \
181	vtedeprecated.h \
182	vteenums.h \
183	vteglobals.h \
184	vtemacros.h \
185	vtepty.h \
186	vteterminal.h \
187	vtetypebuiltins.c \
188	vtetypebuiltins.h \
189	vteversion.h \
190	pty.c \
191	$(NULL)
192
193INTROSPECTION_GIRS += Vte-$(VTE_API_VERSION).gir
194
195girdir = $(datadir)/gir-1.0
196nodist_gir_DATA = $(INTROSPECTION_GIRS)
197
198typelibdir = $(libdir)/girepository-1.0
199nodist_typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
200
201CLEANFILES += $(nodist_gir_DATA) $(nodist_typelib_DATA)
202
203if ENABLE_VAPIGEN
204include $(VAPIGEN_MAKEFILE)
205
206VAPIGEN_VAPIS = vte-$(VTE_API_VERSION).vapi
207
208vte-@VTE_API_VERSION@.vapi: Vte-$(VTE_API_VERSION).gir
209vte_@VTE_API_VERSION_U@_vapi_DEPS = \
210	glib-2.0 \
211	gio-2.0 \
212	pango \
213	gdk-$(GTK_API_VERSION) \
214	gtk+-$(GTK_API_VERSION) \
215	$(NULL)
216vte_@VTE_API_VERSION_U@_vapi_METADATADIRS = $(srcdir)
217vte_@VTE_API_VERSION_U@_vapi_FILES = Vte-$(VTE_API_VERSION).gir
218
219vapidir = $(datadir)/vala/vapi
220nodist_vapi_DATA = $(VAPIGEN_VAPIS)
221
222CLEANFILES += $(nodist_vapi_DATA)
223
224endif # ENABLE_VAPIGEN
225
226endif # HAVE_INTROSPECTION
227
228# C Test application
229
230testvte_SOURCES = \
231        vteapp.c \
232        debug.c \
233        debug.h \
234        $(NULL)
235
236testvte_CPPFLAGS = \
237        -DGLIB_DISABLE_DEPRECATION_WARNINGS \
238        -DGDK_DISABLE_DEPRECATION_WARNINGS \
239        $(AM_CPPFLAGS)
240
241testvte_CFLAGS = \
242        $(VTE_CFLAGS) \
243        $(AM_CFLAGS)
244
245testvte_LDADD = \
246        libvte-$(VTE_API_VERSION).la \
247        $(VTE_LIBS)
248
249# VALA Test application
250
251if ENABLE_TEST_APPLICATION
252
253bin_PROGRAMS += vte-@VTE_API_MAJOR_VERSION@.@VTE_API_MINOR_VERSION@
254
255vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_SOURCES = \
256	app.vala \
257	config.vapi \
258	vte-$(VTE_API_VERSION).vapi \
259	$(NULL)
260
261nodist_vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_SOURCES = \
262	appresources.c \
263	$(NULL)
264
265vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_VALAFLAGS = \
266	--vapidir=. \
267	--girdir=. \
268	--pkg=posix \
269	--pkg=gio-2.0 \
270	--pkg=gtk+-$(GTK_API_VERSION) \
271	--gresources app.gresource.xml \
272	$(AM_VALAFLAGS)
273
274vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_CPPFLAGS = \
275	-I$(top_builddir) \
276	-I$(top_srcdir) \
277	$(AM_CPPFLAGS) \
278	$(NULL)
279
280vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_CFLAGS = \
281	-Wno-unused-variable \
282	-Wno-unused-but-set-variable \
283	$(VTE_CFLAGS) \
284	$(AM_CFLAGS) \
285	$(NULL)
286
287vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_LDFLAGS = \
288	$(AM_LDFLAGS) \
289	$(NULL)
290
291vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_LDADD = \
292	libvte-$(VTE_API_VERSION).la \
293	$(VTE_LIBS) \
294	$(NULL)
295
296CLEANFILES += \
297	app.c \
298	appresources.c \
299	$(NULL)
300
301EXTRA_DIST += \
302        app.gresource.xml \
303	app.ui \
304	$(NULL)
305
306appresources.c: app.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/app.gresource.xml)
307	$(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name app $<
308
309endif # ENABLE_TEST_APPLICATION
310
311# Misc unit tests and utilities
312
313noinst_PROGRAMS += interpret slowcat
314noinst_SCRIPTS = decset osc window
315EXTRA_DIST += $(noinst_SCRIPTS)
316
317TEST_SH = \
318	check-doc-syntax.sh \
319	test-vte-sh.sh \
320	$(NULL)
321EXTRA_DIST += $(TEST_SH)
322
323check_PROGRAMS = dumpkeys reflect-text-view reflect-vte mev table xticker vteconv vtestream-file
324TESTS = table vteconv vtestream-file $(TEST_SH)
325
326reflect_text_view_CPPFLAGS = -DUSE_TEXT_VIEW $(AM_CPPFLAGS)
327reflect_text_view_CFLAGS = $(VTE_CFLAGS) $(AM_CFLAGS)
328reflect_text_view_SOURCES = reflect.c
329reflect_text_view_LDADD = $(VTE_LIBS)
330
331reflect_vte_CPPFLAGS = -DUSE_VTE $(AM_CPPFLAGS)
332reflect_vte_CFLAGS = $(VTE_CFLAGS) $(AM_CFLAGS)
333reflect_vte_SOURCES = reflect.c
334reflect_vte_LDADD = libvte-$(VTE_API_VERSION).la $(VTE_LIBS)
335
336interpret_SOURCES = \
337	buffer.h \
338	caps.c \
339	caps.h \
340	debug.c \
341	debug.h \
342	iso2022.c \
343	iso2022.h \
344	matcher.c \
345	matcher.h \
346	table.c \
347	table.h \
348	vteconv.c \
349	vteconv.h \
350	vtetree.c \
351	vtetree.h \
352	interpret.c
353interpret_CPPFLAGS = \
354	-DINTERPRET_MAIN \
355	-DVTE_API_VERSION=\"$(VTE_API_VERSION)\" \
356	$(AM_CPPFLAGS)
357interpret_CFLAGS = \
358	$(GLIB_CFLAGS) \
359	$(GOBJECT_CFLAGS) \
360	$(GTK_CFLAGS) \
361	$(AM_CFLAGS)
362interpret_LDADD = \
363	$(GLIB_LIBS) \
364	$(GOBJECT_LIBS)
365
366slowcat_SOURCES = \
367	slowcat.c \
368	$(NULL)
369slowcat_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
370slowcat_LDADD = $(GLIB_LIBS)
371
372table_SOURCES = \
373	buffer.h \
374	caps.c \
375	caps.h \
376	debug.c \
377	debug.h \
378	matcher.c \
379	matcher.h \
380	table.c \
381	table.h \
382	vteconv.c \
383	vteconv.h \
384	$(NULL)
385table_CPPFLAGS = \
386	-DTABLE_MAIN \
387	$(AM_CPPFLAGS)
388table_CFLAGS = \
389	$(GLIB_CFLAGS) \
390	$(AM_CFLAGS)
391table_LDADD = \
392	$(GLIB_LIBS) \
393	$(GOBJECT_LIBS)
394
395vtestream_file_SOURCES = \
396	vtestream-base.h \
397	vtestream-file.h \
398	vtestream.c \
399	vtestream.h \
400	vteutils.c \
401	vteutils.h \
402	$(NULL)
403vtestream_file_CPPFLAGS = \
404	-DVTESTREAM_MAIN \
405	$(AM_CPPFLAGS)
406vtestream_file_CFLAGS = \
407	$(VTE_CFLAGS) \
408	$(AM_CFLAGS)
409vtestream_file_LDADD = \
410	$(VTE_LIBS)
411
412vteconv_SOURCES = buffer.h debug.c debug.h vteconv.c vteconv.h
413vteconv_CPPFLAGS = -DVTECONV_MAIN $(AM_CPPFLAGS)
414vteconv_CFLAGS = $(VTE_CFLAGS) $(AM_CFLAGS)
415vteconv_LDADD = $(VTE_LIBS)
416
417dumpkeys_SOURCES = dumpkeys.c
418dumpkeys_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
419dumpkeys_LDADD = $(GLIB_LIBS)
420
421mev_SOURCES = mev.c
422mev_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
423mev_LDADD = $(GLIB_LIBS)
424
425xticker_SOURCES = xticker.c
426xticker_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
427xticker_LDADD = $(GLIB_LIBS)
428
429# Shell
430
431profiledir = $(sysconfdir)/profile.d
432dist_profile_DATA = vte.sh
433
434.DELETE_ON_ERROR:
435
436-include $(top_srcdir)/git.mk
437