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
103 libshl_la_CPPFLAGS = $(AM_CPPFLAGS)
104 libshl_la_LDFLAGS = $(AM_LDFLAGS)
105 libshl_la_LIBADD = $(AM_LIBADD)
109 # Main library build instructions
112 lib_LTLIBRARIES += libtsm.la
118 pkgconfig_DATA += docs/libtsm.pc
120 libtsm_la_SOURCES = \
128 src/tsm_vte_charsets.c \
131 external/xkbcommon-keysyms.h
133 libtsm_la_CPPFLAGS = $(AM_CPPFLAGS)
134 libtsm_la_LIBADD = libshl.la
135 EXTRA_libtsm_la_DEPENDENCIES = $(top_srcdir)/docs/libtsm.sym
136 libtsm_la_LDFLAGS = \
138 -version-info $(LIBTSM_CURRENT):$(LIBTSM_REVISION):$(LIBTSM_AGE) \
139 -Wl,--version-script="$(top_srcdir)/docs/libtsm.sym"
141 if BUILD_HAVE_XKBCOMMON
142 libtsm_la_CPPFLAGS += $(XKBCOMMON_CFLAGS)
152 # Empty .SECONDARY target causes alle intermediate files to be treated as
153 # secondary files. That is, they don't get deleted after make finished.