2 # Kmscon - Global Makefile
3 # Copyright (c) 2012 David Herrmann <dh.herrmann@googlemail.com>
6 ACLOCAL_AMFLAGS = -I m4
20 # kmscon: Main kmscon program
21 # test_output: Test program for the display graphics subsystem
22 # test_vt: Test program for the VT subsystem
23 # test_input: Test program for the input subsystem
24 # libkmscon-core: Static core library for kmscon and test programs
25 # libkmscon-static: Static library for all subsystems
26 # genshader: Program used to convert shaders into C-source files
37 noinst_LTLIBRARIES = \
46 # Make all files include "config.h" by default. This shouldn't cause any
47 # problems and we cannot forget to include it anymore.
49 # Also make the linker discard all unused symbols as we are not building a
52 # When compiling in debug mode, we disable optimization and enable debug symbols
53 # so debugging with gdb is easier.
59 -include $(top_builddir)/config.h \
73 # As there is no need to modify shaders at run-time, we statically compile them
74 # into object files. As autotools would ignore them, we need to add them to
76 # The program that converts the shaders into C-source files is "genshader". It's
77 # pretty simple and just creates a string with the shader source as content.
81 src/output_shader_def.vert \
82 src/output_shader_def.frag \
83 src/output_shader_tex.vert \
84 src/output_shader_tex.frag
88 nodist_genshader_SOURCES = \
91 src/output_shaders.c: \
92 src/output_shader_def.vert \
93 src/output_shader_def.frag \
94 src/output_shader_tex.vert \
95 src/output_shader_tex.frag \
101 # This static library contains all the source files used in kmscon. We build
102 # them as separate library to allow linking them to the test programs.
103 # Only "main.c" is not included here as it contains the main() function.
106 nodist_libkmscon_core_la_SOURCES = \
109 libkmscon_core_la_SOURCES = \
110 src/conf.c src/conf.h \
112 src/console.c src/console.h \
113 src/unicode.c src/unicode.h \
114 src/log.c src/log.h \
115 src/vte.c src/vte.h \
117 src/terminal.c src/terminal.h \
118 src/pty.c src/pty.h \
125 libkmscon_core_la_SOURCES += \
126 src/font_pango.c src/font.h
128 libkmscon_core_la_SOURCES += \
129 src/font_freetype.c src/font.h
132 libkmscon_core_la_CPPFLAGS = \
137 $(FREETYPE2_CFLAGS) \
139 libkmscon_core_la_LIBADD = \
151 # The uterm library provides helpers to creater terminals in user-space. They
152 # are not limited to text-based terminals but rather provide graphics contexts
153 # so arbitrary output can be displayed. Additionally, they provide VT
154 # abstractions and an input layer
157 libuterm_la_SOURCES = \
159 src/uterm_internal.h \
161 src/uterm_video_drm.c \
162 src/uterm_video_fbdev.c \
163 src/uterm_monitor.c \
168 libuterm_la_CPPFLAGS = \
175 libuterm_la_LIBADD = \
181 libkmscon-static.la \
183 libuterm_la_LDFLAGS = \
187 libuterm_la_SOURCES += \
188 src/uterm_input_xkb.c
189 libuterm_la_CPPFLAGS += \
190 $(XKBCOMMON_CFLAGS) \
192 libuterm_la_LIBADD += \
196 libuterm_la_SOURCES += \
197 src/uterm_input_dumb.c
205 # This library contains the whole event-loop implementation of kmscon. It is
206 # compiled into a separate object to allow using it in several other programs.
209 libeloop_la_SOURCES = \
213 libeloop_la_CPPFLAGS = \
215 libeloop_la_LIBADD = \
217 libeloop_la_LDFLAGS = \
225 # This static library contains all small helpers that are used in several other
226 # libraries and programs that are part of kmscon. To avoid putting these small
227 # pieces into a library and thus having to keep backwards compatibility, we
228 # simply link them statically into all other libraries/programs.
231 libkmscon_static_la_SOURCES = \
232 external/imKStoUCS.h \
233 external/imKStoUCS.c \
238 libkmscon_static_la_CPPFLAGS = \
241 libkmscon_static_la_LIBADD = \
246 # These are the sources for the main binaries and test programs. They mostly
247 # consists of a single source file only and include all the libraries that are
248 # built as part of kmscon.
251 kmscon_SOURCES = src/main.c
258 test_output_SOURCES = tests/test_output.c tests/test_include.h
259 test_output_LDADD = libkmscon-core.la
261 test_vt_SOURCES = tests/test_vt.c
262 test_vt_LDADD = libkmscon-core.la
264 test_input_SOURCES = tests/test_input.c
265 test_input_LDADD = libkmscon-core.la