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
38 pkgconfigdir = $(libdir)/pkgconfig
49 # Make all files include "config.h" by default. This shouldn't cause any
50 # problems and we cannot forget to include it anymore.
52 # Also make the linker discard all unused symbols.
54 # When compiling in debug mode, we enable debug symbols so debugging with gdb
55 # is easier. If optimizations are disabled, we pass -O0 to the compiler.
56 # Otherwise, we use standard optimizations -O2.
64 -fdiagnostics-show-option \
65 -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
111 include_HEADERS += src/libtsm.h
112 pkgconfig_DATA += docs/libtsm.pc
114 libtsm_la_SOURCES = \
120 src/tsm_vte_charsets.c \
123 external/xkbcommon-keysyms.h
125 libtsm_la_CPPFLAGS = $(AM_CPPFLAGS)
126 libtsm_la_LIBADD = libshl.la
127 EXTRA_libtsm_la_DEPENDENCIES = $(top_srcdir)/docs/libtsm.sym
128 libtsm_la_LDFLAGS = \
130 -version-info $(LIBTSM_CURRENT):$(LIBTSM_REVISION):$(LIBTSM_AGE) \
131 -Wl,--version-script="$(top_srcdir)/docs/libtsm.sym"
133 if BUILD_HAVE_XKBCOMMON
134 libtsm_la_CPPFLAGS += $(XKBCOMMON_CFLAGS)
159 test_htable_SOURCES = test/test_htable.c $(test_sources)
160 test_htable_CPPFLAGS = $(test_cflags)
161 test_htable_LDADD = $(test_libs)
162 test_htable_LDFLAGS = $(test_lflags)
171 # Empty .SECONDARY target causes alle intermediate files to be treated as
172 # secondary files. That is, they don't get deleted after make finished.