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 enable debug symbols so debugging with gdb
53 # is easier. If optimizations are disabled, we pass -O0 to the compiler.
54 # Otherwise, we use standard optimizations -O2.
60 -include $(top_builddir)/config.h \
78 # As there is no need to modify shaders at run-time, we statically compile them
79 # into object files. As autotools would ignore them, we need to add them to
81 # The program that converts the shaders into C-source files is "genshader". It's
82 # pretty simple and just creates a string with the shader source as content.
86 src/output_shader_def.vert \
87 src/output_shader_def.frag \
88 src/output_shader_tex.vert \
89 src/output_shader_tex.frag
96 nodist_genshader_SOURCES = \
99 src/static_shaders.c: $(SHADERS) genshader$(EXEEXT)
100 ./genshader$(EXEEXT) src/static_shaders.c $(SHADERS)
104 # This static library contains all the source files used in kmscon. We build
105 # them as separate library to allow linking them to the test programs.
106 # Only "main.c" is not included here as it contains the main() function.
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 += \
129 if KMSCON_HAVE_FREETYPE2
130 libkmscon_core_la_SOURCES += \
131 src/text_font_freetype2.c
135 libkmscon_core_la_SOURCES += \
136 src/text_font_pango.c
139 libkmscon_core_la_CPPFLAGS = \
144 libkmscon_core_la_LIBADD = \
154 # The uterm library provides helpers to creater terminals in user-space. They
155 # are not limited to text-based terminals but rather provide graphics contexts
156 # so arbitrary output can be displayed. Additionally, they provide VT
157 # abstractions and an input layer
160 libuterm_la_SOURCES = \
162 src/uterm_internal.h \
164 src/uterm_monitor.c \
166 src/uterm_input_plain.c \
167 external/imKStoUCS.h \
168 external/imKStoUCS.c \
173 libuterm_la_CPPFLAGS = \
182 libuterm_la_LIBADD = \
190 libkmscon-static.la \
192 libuterm_la_LDFLAGS = \
196 libuterm_la_SOURCES += \
197 src/uterm_video_fbdev.c
201 libuterm_la_SOURCES += \
202 src/uterm_video_drm.c
206 libuterm_la_SOURCES += \
207 src/uterm_video_dumb.c
210 if UTERM_HAVE_XKBCOMMON
211 libuterm_la_SOURCES += \
212 src/uterm_input_uxkb.c
220 # This library contains the whole event-loop implementation of kmscon. It is
221 # compiled into a separate object to allow using it in several other programs.
224 libeloop_la_SOURCES = \
229 libeloop_la_SOURCES += \
230 external/dbus-loop.h \
234 libeloop_la_CPPFLAGS = \
237 libeloop_la_LIBADD = \
238 libkmscon-static.la \
240 libeloop_la_LDFLAGS = \
248 # This static library contains all small helpers that are used in several other
249 # libraries and programs that are part of kmscon. To avoid putting these small
250 # pieces into a library and thus having to keep backwards compatibility, we
251 # simply link them statically into all other libraries/programs.
254 libkmscon_static_la_SOURCES = \
262 nodist_libkmscon_static_la_SOURCES = \
264 src/static_gl_math.c \
270 # These are the sources for the main binaries and test programs. They mostly
271 # consists of a single source file only and include all the libraries that are
272 # built as part of kmscon.
275 kmscon_SOURCES = src/main.c
282 test_output_SOURCES = tests/test_output.c tests/test_include.h
283 test_output_LDADD = libkmscon-core.la
285 test_vt_SOURCES = tests/test_vt.c
286 test_vt_LDADD = libkmscon-core.la
288 test_input_SOURCES = tests/test_input.c
289 test_input_LDADD = libkmscon-core.la