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
48 # Make all files include "config.h" by default. This shouldn't cause any
49 # problems and we cannot forget to include it anymore.
51 # Also make the linker discard all unused symbols.
53 # When compiling in debug mode, we enable debug symbols so debugging with gdb
54 # is easier. If optimizations are disabled, we pass -O0 to the compiler.
55 # Otherwise, we use standard optimizations -O2.
63 -fdiagnostics-show-option \
64 -fno-strict-aliasing \
70 -include $(top_builddir)/config.h \
82 if BUILD_ENABLE_OPTIMIZATIONS
89 # SHL - Static Helper Library
90 # The SHL subsystem contains several small code pieces used all over libtsm and
94 noinst_LTLIBRARIES += libshl.la
101 libshl_la_CPPFLAGS = $(AM_CPPFLAGS)
102 libshl_la_LDFLAGS = $(AM_LDFLAGS)
103 libshl_la_LIBADD = $(AM_LIBADD)
107 # Main library build instructions
110 lib_LTLIBRARIES += libtsm.la
116 pkgconfig_DATA += docs/libtsm.pc
118 libtsm_la_SOURCES = \
127 src/tsm_vte_charsets.c \
130 external/xkbcommon-keysyms.h
132 libtsm_la_CPPFLAGS = $(AM_CPPFLAGS)
133 libtsm_la_LIBADD = libshl.la
134 EXTRA_libtsm_la_DEPENDENCIES = $(top_srcdir)/docs/libtsm.sym
135 libtsm_la_LDFLAGS = \
137 -version-info $(LIBTSM_CURRENT):$(LIBTSM_REVISION):$(LIBTSM_AGE) \
138 -Wl,--version-script="$(top_srcdir)/docs/libtsm.sym"
140 if BUILD_HAVE_XKBCOMMON
141 libtsm_la_CPPFLAGS += $(XKBCOMMON_CFLAGS)
149 check_PROGRAMS += test_hashtable
150 TESTS += test_hashtable
164 test_hashtable_SOURCES = test/test_hashtable.c $(test_sources)
165 test_hashtable_CPPFLAGS = $(test_cflags)
166 test_hashtable_LDADD = $(test_libs)
167 test_hashtable_LDFLAGS = $(test_lflags)
176 # Empty .SECONDARY target causes alle intermediate files to be treated as
177 # secondary files. That is, they don't get deleted after make finished.