2 # libtsm - Global Makefile
3 # Copyright (c) 2012-2013 David Herrmann <dh.herrmann@gmail.com>
7 # Library Version Numbers
15 # Global Configurations and Initializations
18 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
19 AM_MAKEFLAGS = --no-print-directory
20 AUTOMAKE_OPTIONS = color-tests
21 AM_DISTCHECK_CONFIGURE_FLAGS = \
23 --enable-optimizations
37 pkgconfigdir = $(libdir)/pkgconfig
47 # Make all files include "config.h" by default. This shouldn't cause any
48 # problems and we cannot forget to include it anymore.
50 # Also make the linker discard all unused symbols.
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.
62 -fdiagnostics-show-option \
63 -fno-strict-aliasing \
69 -include $(top_builddir)/config.h \
81 if BUILD_ENABLE_OPTIMIZATIONS
88 # SHL - Static Helper Library
89 # The SHL subsystem contains several small code pieces used all over libtsm and
93 noinst_LTLIBRARIES += libshl.la
104 libshl_la_CPPFLAGS = $(AM_CPPFLAGS)
105 libshl_la_LDFLAGS = $(AM_LDFLAGS)
106 libshl_la_LIBADD = $(AM_LIBADD)
110 # Main library build instructions
113 lib_LTLIBRARIES += libtsm.la
119 pkgconfig_DATA += docs/libtsm.pc
121 libtsm_la_SOURCES = \
129 src/tsm_vte_charsets.c \
132 external/xkbcommon-keysyms.h
134 libtsm_la_CPPFLAGS = $(AM_CPPFLAGS)
135 libtsm_la_LIBADD = libshl.la
136 EXTRA_libtsm_la_DEPENDENCIES = $(top_srcdir)/docs/libtsm.sym
137 libtsm_la_LDFLAGS = \
139 -version-info $(LIBTSM_CURRENT):$(LIBTSM_REVISION):$(LIBTSM_AGE) \
140 -Wl,--version-script="$(top_srcdir)/docs/libtsm.sym"
142 if BUILD_HAVE_XKBCOMMON
143 libtsm_la_CPPFLAGS += $(XKBCOMMON_CFLAGS)
153 # Empty .SECONDARY target causes alle intermediate files to be treated as
154 # secondary files. That is, they don't get deleted after make finished.