Add git.mk
[vte.git] / src / Makefile.am
1
2 EXTRA_DIST = iso2022.txt
3
4
5 # The library
6
7 pkginclude_HEADERS = pty.h reaper.h vte.h vteaccess.h vtetypebuiltins.h vteversion.h
8
9 lib_LTLIBRARIES = libvte.la
10
11 EXTRA_libvte_la_SOURCES = \
12         genkeysyms.py \
13         keysyms.c \
14         marshal.list \
15         mkunitables.sh \
16         unitable.CNS11643 \
17         unitable.CP437 \
18         unitable.GB12345 \
19         unitable.GB2312 \
20         unitable.JIS0201 \
21         unitable.JIS0208 \
22         unitable.JIS0212 \
23         unitable.KSX1001 \
24         vteseq-2.gperf \
25         vteseq-2.c \
26         vteseq-n.gperf \
27         vteseq-n.c \
28         vtetypebuiltins.c.template \
29         vtetypebuiltins.h.template \
30         $(NULL)
31
32 libvte_la_SOURCES = \
33         buffer.c \
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         vteint.h \
69         vtepangocairo.c \
70         vtepangocairo.h \
71         vteregex.c \
72         vteregex.h \
73         vteseq.c \
74         vteseq-list.h \
75         vteskel.c \
76         vteskel.h \
77         vtetc.c \
78         vtetc.h \
79         vtetree.c \
80         vtetree.h \
81         vtetypebuiltins.c \
82         vtetypebuiltins.h \
83         vteunistr.c \
84         vteunistr.h \
85         vteversion.h
86         $(NULL)
87
88 libvte_la_CPPFLAGS = \
89         -DG_DISABLE_ASSERT \
90         -DG_LOG_DOMAIN=\"Vte\" \
91         -DDATADIR='"$(datadir)"' \
92         -DLIBEXECDIR='"$(libexecdir)"' \
93         -DLOCALEDIR='"$(localedir)"' \
94         -DVTE_COMPILATION
95 libvte_la_CFLAGS = $(VTE_CFLAGS)
96 libvte_la_LIBADD = $(VTE_LIBS)
97 libvte_la_LDFLAGS = \
98         -version-info $(LIBVTE_LTVERSION) \
99         -export-symbols-regex "^vte_terminal_.*|^_vte_pty_.*|^vte_reaper_.*|_vte_debug_.*" \
100         @LIBTOOL_EXPORT_OPTIONS@ @LIBTOOL_FLAGS@
101
102
103 # Generated sources
104
105 VTESEQ_BUILTSOURCES = vteseq-list.h vteseq-2.c vteseq-n.c
106 BUILT_SOURCES = marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h $(VTESEQ_BUILTSOURCES)
107 MAINTAINERCLEANFILES = $(VTESEQ_BUILTSOURCES)
108 EXTRA_DIST += $(VTESEQ_BUILTSOURCES)
109 CLEANFILES = marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h stamp-vtetypebuiltins.h
110
111 marshal.c marshal.h: marshal.list
112         $(GLIB_GENMARSHAL) --prefix=_vte_marshal --header --body --internal $^ > marshal.c
113         $(GLIB_GENMARSHAL) --prefix=_vte_marshal --header --internal $^ > marshal.h
114
115 vtetypebuiltins.h: stamp-vtetypebuiltins.h
116         @true
117 stamp-vtetypebuiltins.h: vtetypebuiltins.h.template vte.h
118         $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-vtbh \
119         && (cmp -s xgen-vtbh vtetypebuiltins.h || cp xgen-vtbh vtetypebuiltins.h ) \
120         && rm -f xgen-vtbh \
121         && echo timestamp > $(@F)
122
123 vtetypebuiltins.c: vtetypebuiltins.c.template vte.h
124         $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-vtbc \
125         && (cmp -s xgen-vtbc vtetypebuiltins.c || cp xgen-vtbc vtetypebuiltins.c ) \
126         && rm -f xgen-vtbc
127
128 vteseq-2.c: vteseq-2.gperf
129         @echo creating $@
130         $(top_srcdir)/missing --run gperf -m 100 --no-strlen $< > $@.tmp && \
131         mv -f $@.tmp $@
132
133 vteseq-n.c: vteseq-n.gperf
134         @echo creating $@
135         $(top_srcdir)/missing --run gperf -m 100 $< > $@.tmp && \
136         mv -f $@.tmp $@
137
138 vteseq-list.h: vteseq-2.gperf vteseq-n.gperf
139         @echo creating $@
140         echo '/* Generated file.  Do not edit */' > $@.tmp && \
141         cat $^ | grep -v '^#' | grep '\<VTE_SEQUENCE_HANDLER\>'| sed 's/.*, //' | LANG=C sort -u >> $@.tmp && \
142         mv -f $@.tmp $@
143
144
145 # vte the application
146
147 bin_PROGRAMS = vte
148
149 vte_SOURCES = vteapp.c
150 vte_CFLAGS = $(VTE_CFLAGS)
151 vte_LDADD = libvte.la $(VTE_LIBS)
152
153
154 # Misc unit tests and utilities
155
156 pkglib_PROGRAMS = interpret slowcat
157 pkglib_SCRIPTS = decset osc window
158 EXTRA_DIST += $(pkglib_SCRIPTS)
159
160 TEST_SH = check-doc-syntax.sh
161 EXTRA_DIST += $(TEST_SH)
162
163 check_PROGRAMS = buffer dumpkeys iso2022 pty reaper reflect-text-view reflect-vte ring mev ssfe table trie xticker vteconv vtetc
164 TESTS = buffer ring table trie $(TEST_SH)
165
166 AM_CFLAGS = $(GLIB_CFLAGS) $(GOBJECT_CFLAGS)
167 LDADD = $(GLIB_LIBS) $(GOBJECT_LIBS)
168
169 reflect_text_view_CPPFLAGS = -DUSE_TEXT_VIEW
170 reflect_text_view_CFLAGS = $(VTE_CFLAGS)
171 reflect_text_view_SOURCES = reflect.c
172 reflect_text_view_LDADD = $(VTE_LIBS)
173
174 reflect_vte_CPPFLAGS = -DUSE_VTE
175 reflect_vte_CFLAGS = $(VTE_CFLAGS)
176 reflect_vte_SOURCES = reflect.c
177 reflect_vte_LDADD = libvte.la $(VTE_LIBS)
178
179 interpret_SOURCES = \
180         buffer.c \
181         buffer.h \
182         caps.c \
183         caps.h \
184         debug.c \
185         debug.h \
186         iso2022.c \
187         iso2022.h \
188         matcher.c \
189         matcher.h \
190         table.c \
191         table.h \
192         trie.c \
193         trie.h \
194         vteconv.c \
195         vteconv.h \
196         vtetc.c \
197         vtetc.h \
198         vtetree.c \
199         vtetree.h \
200         interpret.c
201 interpret_CPPFLAGS = \
202         -DINTERPRET_MAIN \
203         -DDATADIR='"$(datadir)"'
204 interpret_CFLAGS = $(GTK_CFLAGS)
205 interpret_LDADD = $(GTK_LIBS)
206
207 iso2022_SOURCES = \
208         buffer.c \
209         buffer.h \
210         caps.c \
211         caps.h \
212         debug.c \
213         debug.h \
214         iso2022.c \
215         iso2022.h \
216         matcher.c \
217         matcher.h \
218         table.c \
219         table.h \
220         trie.c \
221         trie.h \
222         vteconv.c \
223         vteconv.h \
224         vtetc.c \
225         vtetc.h \
226         vtetree.c \
227         vtetree.h
228 iso2022_CPPFLAGS = -DISO2022_MAIN
229 iso2022_CFLAGS = $(GTK_CFLAGS)
230 iso2022_LDADD = $(GTK_LIBS)
231
232 ring_SOURCES = ring.c ring.h debug.c debug.h
233 ring_CPPFLAGS = -DRING_MAIN
234
235 slowcat_SOURCES = \
236         slowcat.c
237
238 table_SOURCES = \
239         buffer.c \
240         buffer.h \
241         caps.c \
242         caps.h \
243         debug.c \
244         debug.h \
245         matcher.c \
246         matcher.h \
247         table.c \
248         table.h \
249         trie.c \
250         trie.h \
251         vteconv.c \
252         vteconv.h \
253         vtetc.c \
254         vtetc.h
255 table_CPPFLAGS = -DTABLE_MAIN
256 table_CFLAGS = $(VTE_CFLAGS)
257 table_LDADD = $(VTE_LIBS)
258
259 trie_SOURCES = \
260         trie.c \
261         trie.h \
262         buffer.c \
263         buffer.h \
264         caps.c \
265         caps.h \
266         debug.c \
267         debug.h \
268         matcher.c \
269         matcher.h \
270         table.c \
271         table.h \
272         vteconv.c \
273         vteconv.h \
274         vtetc.c \
275         vtetc.h 
276 trie_CPPFLAGS = -DTRIE_MAIN
277 trie_CFLAGS = $(VTE_CFLAGS)
278 trie_LDADD = $(VTE_LIBS)
279
280 vtetc_SOURCES = vtetc.c vtetc.h debug.c debug.h
281 vtetc_CPPFLAGS = -DTERMCAP_MAIN
282
283 pty_SOURCES = pty.c pty.h debug.c debug.h
284 pty_CPPFLAGS = -DPTY_MAIN -DLIBEXECDIR='"$(libexecdir)"'
285
286 reaper_SOURCES = reaper.c reaper.h debug.c debug.h marshal.c marshal.h
287 reaper_CPPFLAGS =  -DREAPER_MAIN -DLOCALEDIR='"$(localedir)"'
288
289 vteconv_SOURCES = buffer.c buffer.h debug.c debug.h vteconv.c vteconv.h
290 vteconv_CPPFLAGS = -DVTECONV_MAIN
291 vteconv_CFLAGS = $(VTE_CFLAGS)
292 vteconv_LDADD = $(VTE_LIBS)
293
294 buffer_SOURCES = buffer.c
295 buffer_CPPFLAGS = -DBUFFER_MAIN
296
297 dumpkeys_SOURCES = dumpkeys.c
298 mev_SOURCES = mev.c
299 ssfe_SOURCES = ssfe.c
300 xticker_SOURCES = xticker.c
301
302 -include $(top_srcdir)/git.mk