1 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
3 pkgconfigdir = $(libdir)/pkgconfig
4 pkgconfig_DATA = xkbcommon.pc
8 src/xkbcomp/keywords.gperf \
12 doc/keymap-format-text-v1.txt \
16 -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' \
18 -I$(top_srcdir)/src/xkbcomp \
19 -I$(top_builddir)/src/xkbcomp \
20 -include $(top_builddir)/src/config.h
22 AM_CFLAGS = $(BASE_CFLAGS)
24 AM_LDFLAGS = -no-undefined
26 AM_LDFLAGS += -Wl,--no-undefined
29 AM_YFLAGS = -d -p _xkbcommon_
31 xkbcommonincludedir = $(includedir)/xkbcommon
32 xkbcommoninclude_HEADERS = \
33 xkbcommon/xkbcommon.h \
34 xkbcommon/xkbcommon-compat.h \
35 xkbcommon/xkbcommon-keysyms.h \
36 xkbcommon/xkbcommon-names.h
38 lib_LTLIBRARIES = libxkbcommon.la
39 libxkbcommon_la_SOURCES = \
40 src/xkbcomp/action.c \
41 src/xkbcomp/action.h \
43 src/xkbcomp/ast-build.c \
44 src/xkbcomp/ast-build.h \
45 src/xkbcomp/compat.c \
48 src/xkbcomp/include.c \
49 src/xkbcomp/include.h \
50 src/xkbcomp/keycodes.c \
51 src/xkbcomp/keymap.c \
52 src/xkbcomp/keymap-dump.c \
53 src/xkbcomp/keywords.c \
54 src/xkbcomp/parser.y \
55 src/xkbcomp/parser-priv.h \
58 src/xkbcomp/scanner.c \
59 src/xkbcomp/symbols.c \
63 src/xkbcomp/xkbcomp.c \
64 src/xkbcomp/xkbcomp-priv.h \
89 pkgconfig_DATA += xkbcommon-x11.pc
91 xkbcommon_x11includedir = $(xkbcommonincludedir)
92 xkbcommon_x11include_HEADERS = \
93 xkbcommon/xkbcommon-x11.h
95 lib_LTLIBRARIES += libxkbcommon-x11.la
97 libxkbcommon_x11_la_CFLAGS = $(AM_CFLAGS) $(XCB_XKB_CFLAGS)
98 libxkbcommon_x11_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/x11
99 libxkbcommon_x11_la_LIBADD = libxkbcommon.la $(XCB_XKB_LIBS)
101 libxkbcommon_x11_la_SOURCES = \
115 src/xkbcomp/parser.c \
117 CLEANFILES = $(BUILT_SOURCES)
119 src/xkbcomp/parser.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
120 src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
128 doc: doc/stamp-doxygen
129 clean-doc: clean-doxygen
131 clean-local:: clean-doc
133 doc/stamp-doxygen: $(top_srcdir)/xkbcommon/*.h
134 $(AM_V_GEN)$(DOXYGEN) doc/Doxyfile
138 rm -rf doc/html doc/stamp-doxygen
140 install-data-local:: doc
141 $(MKDIR_P) $(DESTDIR)$(htmldir)
142 $(INSTALL_DATA) doc/html/* $(DESTDIR)$(htmldir)
145 rm -rf $(DESTDIR)$(htmldir)
153 # Some tests need to use unexported symbols, so we link them against
154 # a private copy of libxkbcommon with all symbols exposed.
155 check_LTLIBRARIES = libtest.la
156 libtest_la_CFLAGS = $(AM_CFLAGS) -fvisibility=default
157 libtest_la_SOURCES = \
158 $(libxkbcommon_la_SOURCES) \
162 AM_TESTS_ENVIRONMENT = \
163 XKB_LOG_LEVEL=debug; export XKB_LOG_LEVEL; \
164 XKB_LOG_VERBOSITY=10; export XKB_LOG_VERBOSITY; \
165 $(XORG_MALLOC_DEBUG_ENV)
178 test/rmlvo-to-kccgst \
179 test/print-compiled-keymap \
182 TESTS_LDADD = libtest.la
184 test_keysym_LDADD = $(TESTS_LDADD)
185 test_filecomp_LDADD = $(TESTS_LDADD)
186 test_context_LDADD = $(TESTS_LDADD)
187 test_rules_file_CFLAGS = $(AM_CFLAGS) -Wno-declaration-after-statement
188 test_rules_file_LDADD = $(TESTS_LDADD) -lrt
189 test_stringcomp_LDADD = $(TESTS_LDADD)
190 test_buffercomp_LDADD = $(TESTS_LDADD)
191 test_log_LDADD = $(TESTS_LDADD)
192 test_atom_LDADD = $(TESTS_LDADD)
193 test_utf8_LDADD = $(TESTS_LDADD)
194 test_rmlvo_to_kccgst_LDADD = $(TESTS_LDADD)
195 test_print_compiled_keymap_LDADD = $(TESTS_LDADD)
196 test_bench_key_proc_LDADD = $(TESTS_LDADD) -lrt
204 test/interactive-evdev
206 test_state_LDADD = $(TESTS_LDADD)
207 test_keyseq_LDADD = $(TESTS_LDADD)
208 test_rulescomp_LDADD = $(TESTS_LDADD) -lrt
209 test_interactive_evdev_LDADD = $(TESTS_LDADD)
210 endif BUILD_LINUX_TESTS
218 TESTS_X11_LDADD = $(XCB_XKB_LIBS) $(TESTS_LDADD) libxkbcommon-x11.la
219 TESTS_X11_CFLAGS = $(XCB_XKB_CFLAGS)
221 test_x11_LDADD = $(TESTS_X11_LDADD)
222 test_x11_CFLAGS = $(TESTS_X11_CFLAGS)
223 test_interactive_x11_LDADD = $(TESTS_X11_LDADD)
224 test_interactive_x11_CFLAGS = $(TESTS_X11_CFLAGS)
227 check_PROGRAMS += $(TESTS)
233 # This sed script strips out lines that start with '#define _' which
234 # removes #define _OSF_Keysyms and such. The XK_Ydiaeresis case is to
235 # handle a duplicate definition in HPkeysyms.h which kicks in if it's
236 # not already defined.
237 X11_INCLUDEDIR = /usr/include/X11
239 $(X11_INCLUDEDIR)/keysymdef.h \
240 $(X11_INCLUDEDIR)/XF86keysym.h \
241 $(X11_INCLUDEDIR)/Sunkeysym.h \
242 $(X11_INCLUDEDIR)/DECkeysym.h \
243 $(X11_INCLUDEDIR)/HPkeysym.h
245 echo -en '#ifndef _XKBCOMMON_KEYSYMS_H\n#define _XKBCOMMON_KEYSYMS_H\n\n' > $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
246 echo -en '/* This file is autogenerated from Makefile.am; please do not commit directly. */\n\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
247 echo -en '#define XKB_KEY_NoSymbol 0x000000 /* Special KeySym */\n\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
248 sed -e '/XK_Ydiaeresis\s*0x100000ee/d' \
250 -e 's/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/' \
251 -e '/\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
252 echo -en '\n\n#endif\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
253 LC_CTYPE=C python $(top_srcdir)/makekeys.py $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h > $(top_srcdir)/src/ks_tables.h
255 # Run this if you add/remove a new keyword to the xkbcomp scanner,
256 # or just want to regenerate the gperf file.
258 $(AM_V_GEN)gperf < $(top_srcdir)/src/xkbcomp/keywords.gperf > $(top_srcdir)/src/xkbcomp/keywords.c
264 Android_build.mk: Makefile $(BUILT_SOURCES)
266 -:PROJECT libxkbcommon \
267 -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
269 -:STATIC libxkbcommon \
271 -:SOURCES $(filter-out %.l %.y,$(libxkbcommon_la_SOURCES)) $(BUILT_SOURCES) \
272 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS) \
273 -:LDFLAGS $(AM_LDFLAGS) \
275 -:PASSTHROUGH 'libxkbcommon-clean: clean-libxkbcommon' \