1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
|
#
# Kmscon - Global Makefile
# Copyright (c) 2012 David Herrmann <dh.herrmann@googlemail.com>
#
#
# Library Version Numbers
#
LIBELOOP_CURRENT = 1
LIBELOOP_REVISION = 0
LIBELOOP_AGE = 0
LIBTSM_CURRENT = 1
LIBTSM_REVISION = 0
LIBTSM_AGE = 0
LIBUTERM_CURRENT = 1
LIBUTERM_REVISION = 0
LIBUTERM_AGE = 0
#
# Global Configurations and Initializations
#
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory
AUTOMAKE_OPTIONS = color-tests
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-wlterm
SUBDIRS = .
.DELETE_ON_ERROR:
include_HEADERS =
EXTRA_DIST = \
README \
COPYING \
NEWS \
docs/kmscon.service \
docs/kmsconvt@.service \
docs/pc/libeloop.pc.in \
docs/pc/libtsm.pc.in \
docs/pc/libuterm.pc.in \
docs/sym/libeloop.sym \
docs/sym/libtsm.sym \
docs/sym/libuterm.sym
CLEANFILES =
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
MANPAGES =
MANPAGES_ALIASES =
TPHONY =
bin_PROGRAMS =
check_PROGRAMS =
noinst_PROGRAMS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
moduledir = $(libdir)/kmscon
module_LTLIBRARIES =
#
# Default CFlags
# Make all files include "config.h" by default. This shouldn't cause any
# problems and we cannot forget to include it anymore.
#
# Also make the linker discard all unused symbols.
#
# When compiling in debug mode, we enable debug symbols so debugging with gdb
# is easier. If optimizations are disabled, we pass -O0 to the compiler.
# Otherwise, we use standard optimizations -O2.
#
AM_CFLAGS = \
-Wall \
-pipe \
-fno-common \
-ffast-math \
-fdiagnostics-show-option \
-fno-strict-aliasing \
-fvisibility=hidden \
-ffunction-sections \
-fdata-sections \
-fstack-protector
AM_CPPFLAGS = \
-DBUILD_MODULE_DIR='"$(moduledir)"' \
-include $(top_builddir)/config.h \
-I $(srcdir)/src
AM_LDFLAGS = \
-Wl,--as-needed \
-Wl,--gc-sections \
-Wl,-z,relro \
-Wl,-z,now
if BUILD_ENABLE_DEBUG
AM_CFLAGS += -g
endif
if BUILD_ENABLE_OPTIMIZATIONS
AM_CFLAGS += -O2
else
AM_CFLAGS += -O0
endif
#
# GIT-HEAD helper
# The file ./src/githead.h contains a constant BUILD_GIT_HEAD which is defined
# to the string returned by "git describe". We need to adjust this string for
# every build and correctly rebuild any sources that depend on it. Therefore,
# you should use this file rarely as it causes rebuilds on every git-commit.
#
# We have a helper-script ./src/genversion.sh that takes as argument the header
# file and creates it if necessary. It updates it only if the new git-describe
# string is different to the old one. So the file is only modified on changes.
# Hence, we can use it as normal dependency in this Makefile.
# However, we need to run this script on _every_ "make" invocation before any
# recipy is executed. To achieve this, we use $(shell ...) and assign it to a
# "simply expanded" variable (:=) so the shell command is executed on
# variable-declaration and not during expansion.
#
# Note that we must not clean ./src/githead.h ever! If we would, a distribution
# tarball might delete that file and have no way to recreate it.
# We could delete it on something like "make maintainerclean", but then again,
# it seems unnecessary so lets simply not clean it at all.
#
# If the helper-script is executed in a directory that is not a git-repository
# (like a distribution tarball) and githead.h exists, then it does nothing as it
# expects githead.h to be correctly written by "make dist".
# However, if githead.h does not exist, it will print a warning and write
# "<unknown>" as git-revision.
# This guarantees, that githead.h is always present and has the most correct
# value that we can get under any conditions.
#
# The $(emptyvariable) expansion below is used for broken $(shell ...)
# syntax-highlighting algorithms in many existing editors.
#
EXTRA_DIST += src/genversion.sh
GITHEAD:=$(shell $(emptyvariable)"$(srcdir)/src/genversion.sh" "$(srcdir)/src/githead.h")
#
# SHL - Static Helper Library
# The SHL subsystem contains several small code pieces used all over kmscon and
# other applications.
#
noinst_LTLIBRARIES += libshl.la
libshl_la_SOURCES = \
src/shl_dlist.h \
src/shl_array.h \
src/shl_hashtable.h \
external/htable.h \
external/htable.c \
src/shl_ring.h \
src/shl_timer.h \
src/shl_llog.h \
src/shl_hook.h \
src/shl_misc.h \
src/shl_register.h
libshl_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(XKBCOMMON_CFLAGS) \
-pthread
libshl_la_LDFLAGS = \
$(AM_LDFLAGS) \
-pthread
libshl_la_LIBADD = \
$(AM_LIBADD) \
$(XKBCOMMON_LIBS)
#
# libeloop
# This library contains the whole event-loop implementation of kmscon. It is
# compiled into a separate object to allow using it in several other programs.
#
if BUILD_ENABLE_ELOOP
lib_LTLIBRARIES += libeloop.la
include_HEADERS += src/eloop.h
pkgconfig_DATA += docs/pc/libeloop.pc
endif
libeloop_la_SOURCES = \
src/eloop.h \
src/eloop.c
libeloop_la_LIBADD = libshl.la
libeloop_la_CPPFLAGS = $(AM_CPPFLAGS)
EXTRA_libeloop_la_DEPENDENCIES = ${top_srcdir}/docs/sym/libeloop.sym
libeloop_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info $(LIBELOOP_CURRENT):$(LIBELOOP_REVISION):$(LIBELOOP_AGE) \
-Wl,--version-script=$(top_srcdir)/docs/sym/libeloop.sym
if BUILD_ENABLE_ELOOP_DBUS
libeloop_la_SOURCES += \
external/dbus-common.h \
external/dbus-loop.h \
external/dbus-loop.c
libeloop_la_CPPFLAGS += $(DBUS_CFLAGS)
libeloop_la_LIBADD += $(DBUS_LIBS)
endif
#
# libtsm
# The Terminal-emulator State Machine is a library that implements the whole VTE
# layer and everything related to it. It has no external dependencies so it can
# be used to implement any kind of terminal emulator or debugger.
#
if BUILD_ENABLE_TSM
lib_LTLIBRARIES += libtsm.la
include_HEADERS += \
src/tsm_screen.h \
src/tsm_unicode.h \
src/tsm_vte.h
pkgconfig_DATA += docs/pc/libtsm.pc
endif
libtsm_la_SOURCES = \
src/tsm_screen.h \
src/tsm_screen.c \
src/tsm_unicode.h \
src/tsm_unicode.c \
src/tsm_vte.h \
src/tsm_vte.c \
src/tsm_vte_charsets.c \
external/wcwidth.h \
external/wcwidth.c
libtsm_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(XKBCOMMON_CFLAGS)
libtsm_la_LIBADD = \
$(XKBCOMMON_LIBS) \
libshl.la
EXTRA_libtsm_la_DEPENDENCIES = ${top_srcdir}/docs/sym/libtsm.sym
libtsm_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info $(LIBTSM_CURRENT):$(LIBTSM_REVISION):$(LIBTSM_AGE) \
-Wl,--version-script="$(top_srcdir)/docs/sym/libtsm.sym"
#
# libuterm
# The uterm library provides helpers to create terminals in user-space. They
# are not limited to text-based terminals but rather provide graphics contexts
# so arbitrary output can be displayed. Additionally, they provide VT
# abstractions and an input layer
#
if BUILD_ENABLE_UTERM
lib_LTLIBRARIES += libuterm.la
include_HEADERS += \
src/uterm_input.h \
src/uterm_monitor.h \
src/uterm_video.h \
src/uterm_vt.h
pkgconfig_DATA += docs/pc/libuterm.pc
endif
libuterm_la_SOURCES = \
src/uterm_input.h \
src/uterm_monitor.h \
src/uterm_video.h \
src/uterm_vt.h \
src/uterm_input_internal.h \
src/uterm_video_internal.h \
src/uterm_systemd_internal.h \
src/uterm_video.c \
src/uterm_monitor.c \
src/uterm_vt.c \
src/uterm_input.c \
src/uterm_input_uxkb.c
nodist_libuterm_la_SOURCES =
libuterm_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(XKBCOMMON_CFLAGS)
libuterm_la_LIBADD = \
$(XKBCOMMON_LIBS) \
libeloop.la \
libshl.la
EXTRA_libuterm_la_DEPENDENCIES = ${top_srcdir}/docs/sym/libuterm.sym
libuterm_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info $(LIBUTERM_CURRENT):$(LIBUTERM_REVISION):$(LIBUTERM_AGE) \
-Wl,--version-script="$(top_srcdir)/docs/sym/libuterm.sym"
if BUILD_ENABLE_MULTI_SEAT
libuterm_la_SOURCES += src/uterm_systemd.c
libuterm_la_CPPFLAGS += $(SYSTEMD_CFLAGS)
libuterm_la_LIBADD += $(SYSTEMD_LIBS)
endif
if BUILD_ENABLE_HOTPLUG
libuterm_la_CPPFLAGS += $(UDEV_CFLAGS)
libuterm_la_LIBADD += $(UDEV_LIBS)
endif
if BUILD_ENABLE_VIDEO_FBDEV
libuterm_la_SOURCES += \
src/uterm_fbdev_internal.h \
src/uterm_fbdev_video.c \
src/uterm_fbdev_render.c
endif
if BUILD_ENABLE_VIDEO_DRM2D
libuterm_la_SOURCES += \
src/uterm_drm2d_internal.h \
src/uterm_drm2d_video.c \
src/uterm_drm2d_render.c
libuterm_la_CPPFLAGS += $(DRM_CFLAGS)
libuterm_la_LIBADD += $(DRM_LIBS)
endif
if BUILD_ENABLE_VIDEO_DRM3D
noinst_PROGRAMS += genshader
libuterm_la_SOURCES += \
src/uterm_drm3d_internal.h \
src/uterm_drm3d_video.c \
src/uterm_drm3d_render.c \
src/static_gl.h \
src/static_gl_math.c \
src/static_gl_shader.c
nodist_libuterm_la_SOURCES += src/static_shaders.c
libuterm_la_CPPFLAGS += \
$(DRM_CFLAGS) \
$(EGL_CFLAGS) \
$(GBM_CFLAGS) \
$(GLES2_CFLAGS)
libuterm_la_LIBADD += \
$(DRM_LIBS) \
$(EGL_LIBS) \
$(GBM_LIBS) \
$(GLES2_LIBS)
endif
# add shared sources only once
UTERM_DRM_SHARED_SRC = \
src/uterm_drm_shared_internal.h \
src/uterm_drm_shared.c
if BUILD_ENABLE_VIDEO_DRM2D
libuterm_la_SOURCES += $(UTERM_DRM_SHARED_SRC)
else
if BUILD_ENABLE_VIDEO_DRM3D
libuterm_la_SOURCES += $(UTERM_DRM_SHARED_SRC)
endif
endif
#
# Shaders
# As there is no need to modify shaders at run-time, we statically compile them
# into object files. As autotools would ignore them, we need to add them to
# EXTRA_DIST.
# The program that converts the shaders into C-source files is "genshader". It's
# pretty simple and just creates a string with the shader source as content.
#
SHADERS = \
$(srcdir)/src/static_fill.vert \
$(srcdir)/src/static_fill.frag \
$(srcdir)/src/static_blend.vert \
$(srcdir)/src/static_blend.frag \
$(srcdir)/src/static_blit.vert \
$(srcdir)/src/static_blit.frag \
$(srcdir)/src/static_gltex.vert \
$(srcdir)/src/static_gltex.frag
EXTRA_DIST += $(SHADERS)
CLEANFILES += src/static_shaders.c
genshader_SOURCES = src/genshader.c
src/static_shaders.c: $(SHADERS) genshader$(EXEEXT)
$(AM_V_GEN)./genshader$(EXEEXT) src/static_shaders.c $(SHADERS)
#
# Unifont Generator
# This generates the unifont sources from raw hex-encoded font data.
#
UNIFONT = $(top_srcdir)/src/font_unifont_data.hex
UNIFONT_BIN = src/font_unifont_data.bin
EXTRA_DIST += $(UNIFONT)
CLEANFILES += $(UNIFONT_BIN)
genunifont_SOURCES = src/genunifont.c
$(UNIFONT_BIN): $(UNIFONT) genunifont$(EXEEXT)
$(AM_V_GEN)./genunifont$(EXEEXT) $(UNIFONT_BIN) $(UNIFONT)
#
# Kmscon Modules
#
if BUILD_ENABLE_FONT_UNIFONT
module_LTLIBRARIES += mod-unifont.la
noinst_PROGRAMS += genunifont
endif
mod_unifont_la_SOURCES = \
src/kmscon_module_interface.h \
src/githead.h \
src/font_unifont.c \
src/kmscon_mod_unifont.c
EXTRA_mod_unifont_la_DEPENDENCIES = $(UNIFONT_BIN)
mod_unifont_la_LIBADD = libshl.la
mod_unifont_la_LDFLAGS = \
$(AM_LDFLAGS) \
-module \
-avoid-version \
-Wl,--format=binary -Wl,$(UNIFONT_BIN) -Wl,--format=default
if BUILD_ENABLE_FONT_FREETYPE2
module_LTLIBRARIES += mod-freetype2.la
endif
mod_freetype2_la_SOURCES = \
src/kmscon_module_interface.h \
src/githead.h \
src/font_freetype2.c \
src/kmscon_mod_freetype2.c
mod_freetype2_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(FREETYPE2_CFLAGS)
mod_freetype2_la_LIBADD = \
$(FREETYPE2_LIBS) \
-lpthread \
libtsm.la \
libshl.la
mod_freetype2_la_LDFLAGS = \
$(AM_LDFLAGS) \
-module \
-avoid-version
if BUILD_ENABLE_FONT_PANGO
module_LTLIBRARIES += mod-pango.la
endif
mod_pango_la_SOURCES = \
src/kmscon_module_interface.h \
src/githead.h \
src/font_pango.c \
src/kmscon_mod_pango.c
mod_pango_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(PANGO_CFLAGS)
mod_pango_la_LIBADD = \
$(PANGO_LIBS) \
-lpthread \
libtsm.la \
libshl.la
mod_pango_la_LDFLAGS = \
$(AM_LDFLAGS) \
-module \
-avoid-version
if BUILD_ENABLE_RENDERER_BBULK
module_LTLIBRARIES += mod-bbulk.la
endif
mod_bbulk_la_SOURCES = \
src/kmscon_module_interface.h \
src/githead.h \
src/text_bbulk.c \
src/kmscon_mod_bbulk.c
mod_bbulk_la_LIBADD = libshl.la
mod_bbulk_la_LDFLAGS = \
$(AM_LDFLAGS) \
-module \
-avoid-version
if BUILD_ENABLE_RENDERER_GLTEX
module_LTLIBRARIES += mod-gltex.la
noinst_PROGRAMS += genshader
endif
mod_gltex_la_SOURCES = \
src/kmscon_module_interface.h \
src/githead.h \
src/text_gltex.c \
src/static_gl.h \
src/static_gl_math.c \
src/static_gl_shader.c \
src/kmscon_mod_gltex.c
nodist_mod_gltex_la_SOURCES = \
src/static_shaders.c
mod_gltex_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(GLES2_CFLAGS)
mod_gltex_la_LIBADD = \
$(GLES2_LIBS) \
libshl.la
mod_gltex_la_LDFLAGS = \
$(AM_LDFLAGS) \
-module \
-avoid-version
if BUILD_ENABLE_RENDERER_CAIRO
module_LTLIBRARIES += mod-cairo.la
endif
mod_cairo_la_SOURCES = \
src/kmscon_module_interface.h \
src/githead.h \
src/text_cairo.c \
src/kmscon_mod_cairo.c
mod_cairo_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(CAIRO_CFLAGS)
mod_cairo_la_LIBADD = \
$(CAIRO_LIBS) \
libshl.la
mod_cairo_la_LDFLAGS = \
$(AM_LDFLAGS) \
-module \
-avoid-version
if BUILD_ENABLE_RENDERER_PIXMAN
module_LTLIBRARIES += mod-pixman.la
endif
mod_pixman_la_SOURCES = \
src/kmscon_module_interface.h \
src/githead.h \
src/text_pixman.c \
src/kmscon_mod_pixman.c
mod_pixman_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(PIXMAN_CFLAGS)
mod_pixman_la_LIBADD = \
$(PIXMAN_LIBS) \
libshl.la
mod_pixman_la_LDFLAGS = \
$(AM_LDFLAGS) \
-module \
-avoid-version
#
# Binaries
# These are the sources for the main binaries and test programs. They mostly
# consists of a single source file only and include all the libraries that are
# built as part of kmscon.
#
if BUILD_ENABLE_KMSCON
bin_PROGRAMS += kmscon
check_PROGRAMS += \
test_output \
test_vt \
test_input \
test_key
MANPAGES += docs/man/kmscon.1
endif
kmscon_SOURCES = \
src/githead.h \
src/conf.h \
src/conf.c \
src/log.h \
src/log.c \
src/pty.h \
src/pty.c \
src/font.h \
src/font.c \
src/font_8x16.c \
src/text.h \
src/text.c \
src/text_bblit.c \
src/kmscon_module_interface.h \
src/kmscon_module.h \
src/kmscon_module.c \
src/kmscon_terminal.h \
src/kmscon_dummy.h \
src/kmscon_cdev.h \
src/kmscon_seat.h \
src/kmscon_seat.c \
src/kmscon_conf.h \
src/kmscon_conf.c \
src/kmscon_main.c
nodist_kmscon_SOURCES =
kmscon_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(XKBCOMMON_CFLAGS)
kmscon_LDADD = \
$(XKBCOMMON_LIBS) \
libeloop.la \
libuterm.la \
libshl.la \
-lpthread \
-ldl
kmscon_LDFLAGS = \
$(AM_LDFLAGS) \
-rdynamic
if BUILD_ENABLE_SESSION_DUMMY
kmscon_SOURCES += src/kmscon_dummy.c
endif
if BUILD_ENABLE_SESSION_TERMINAL
kmscon_SOURCES += src/kmscon_terminal.c
kmscon_LDADD += libtsm.la
endif
if BUILD_ENABLE_SESSION_CDEV
kmscon_SOURCES += src/kmscon_cdev.c
kmscon_CPPFLAGS += $(FUSE_CFLAGS)
kmscon_LDADD += $(FUSE_LIBS)
endif
#
# Wayland Terminal
#
if BUILD_ENABLE_WLTERM
bin_PROGRAMS += wlterm
endif
wlterm_SOURCES = \
src/wlt_main.h \
src/wlt_main.c \
src/wlt_toolkit.h \
src/wlt_toolkit.c \
src/wlt_theme.h \
src/wlt_theme.c \
src/wlt_terminal.h \
src/wlt_terminal.c \
src/log.h \
src/log.c \
src/conf.h \
src/conf.c \
src/pty.h \
src/pty.c \
src/font.h \
src/font.c \
src/font_8x16.c \
src/font_pango.c
wlterm_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(WAYLAND_CFLAGS) \
$(PANGO_CFLAGS) \
$(XKBCOMMON_CFLAGS)
wlterm_LDADD = \
$(WAYLAND_LIBS) \
$(PANGO_LIBS) \
$(XKBCOMMON_LIBS) \
libeloop.la \
libtsm.la \
libshl.la \
-lpthread
#
# Tests
#
test_sources = \
src/log.h \
src/log.c \
src/conf.h \
src/conf.c \
tests/test_include.h
test_cflags = \
$(AM_CPPFLAGS) \
$(XKBCOMMON_CFLAGS)
test_libs = \
$(XKBCOMMON_LIBS) \
libeloop.la
test_output_SOURCES = \
$(test_sources) \
tests/test_output.c
test_output_CPPFLAGS = $(test_cflags)
test_output_LDADD = \
$(test_libs) \
libuterm.la
test_vt_SOURCES = \
$(test_sources) \
tests/test_vt.c
test_vt_CPPFLAGS = $(test_cflags)
test_vt_LDADD = \
$(test_libs) \
libuterm.la
test_input_SOURCES = \
$(test_sources) \
tests/test_input.c
test_input_CPPFLAGS = $(test_cflags)
test_input_LDADD = \
$(test_libs) \
libuterm.la
test_key_SOURCES = \
$(test_sources) \
tests/test_key.c
test_key_CPPFLAGS = $(test_cflags)
test_key_LDADD = $(test_libs)
#
# Manpages
#
man_MANS =
EXTRA_DIST += ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}}
CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES) .man_fixup
if BUILD_HAVE_XSLTPROC
if BUILD_HAVE_MANPAGES_STYLESHEET
man_MANS += $(MANPAGES) $(MANPAGES_ALIASES)
XSLTPROC_FLAGS = \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
--stringparam funcsynopsis.style ansi \
--stringparam man.output.quietly 1 \
--nonet
XSLTPROC_PROCESS_MAN = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(XSLTPROC) -o "$@" $(XSLTPROC_FLAGS) $(BUILD_MANPAGES_STYLESHEET) "$<" && \
touch .man_fixup
# Force .man_fixup if $(MANPAGES) are not built
.man_fixup: | $(MANPAGES)
@touch .man_fixup
$(MANPAGES_ALIASES): $(MANPAGES) .man_fixup
$(AM_V_GEN)if test -n "$@" ; then $(SED) -i -e 's/^\.so \([a-z_]\+\)\.\([0-9]\)$$/\.so man\2\/\1\.\2/' "$@" ; fi
docs/man/%.1: docs/man/%.xml
$(XSLTPROC_PROCESS_MAN)
docs/man/%.3: docs/man/%.xml
$(XSLTPROC_PROCESS_MAN)
docs/man/%.5: docs/man/%.xml
$(XSLTPROC_PROCESS_MAN)
docs/man/%.7: docs/man/%.xml
$(XSLTPROC_PROCESS_MAN)
endif # BUILD_HAVE_MANPAGES_STYLESHEET
endif # BUILD_HAVE_XSLTPROC
#
# Phony targets
#
.PHONY: $(TPHONY)
|