1 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
3 pkgconfigdir = $(libdir)/pkgconfig
4 pkgconfig_DATA = xkbcommon.pc
8 src/xkbcomp/keywords.gperf \
12 -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' \
14 -I$(top_srcdir)/src/xkbcomp \
15 -I$(top_builddir)/src/xkbcomp \
16 -include $(top_builddir)/src/config.h
18 AM_CFLAGS = $(BASE_CFLAGS)
20 AM_LDFLAGS = -no-undefined
22 AM_LDFLAGS += -Wl,--no-undefined
25 AM_YFLAGS = -d -p _xkbcommon_
27 xkbcommonincludedir = $(includedir)/xkbcommon
28 xkbcommoninclude_HEADERS = \
29 xkbcommon/xkbcommon.h \
30 xkbcommon/xkbcommon-compat.h \
31 xkbcommon/xkbcommon-keysyms.h \
32 xkbcommon/xkbcommon-names.h
34 lib_LTLIBRARIES = libxkbcommon.la
35 libxkbcommon_la_SOURCES = \
36 src/xkbcomp/action.c \
37 src/xkbcomp/action.h \
39 src/xkbcomp/ast-build.c \
40 src/xkbcomp/ast-build.h \
41 src/xkbcomp/compat.c \
44 src/xkbcomp/include.c \
45 src/xkbcomp/include.h \
46 src/xkbcomp/keycodes.c \
47 src/xkbcomp/keymap.c \
48 src/xkbcomp/keymap-dump.c \
49 src/xkbcomp/keywords.c \
50 src/xkbcomp/parser.y \
51 src/xkbcomp/parser-priv.h \
54 src/xkbcomp/scanner.c \
55 src/xkbcomp/symbols.c \
59 src/xkbcomp/xkbcomp.c \
60 src/xkbcomp/xkbcomp-priv.h \
83 pkgconfig_DATA += xkbcommon-x11.pc
85 xkbcommon_x11includedir = $(xkbcommonincludedir)
86 xkbcommon_x11include_HEADERS = \
87 xkbcommon/xkbcommon-x11.h
89 lib_LTLIBRARIES += libxkbcommon-x11.la
91 libxkbcommon_x11_la_CFLAGS = $(AM_CFLAGS) $(XCB_XKB_CFLAGS)
92 libxkbcommon_x11_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/x11
93 libxkbcommon_x11_la_LIBADD = libxkbcommon.la $(XCB_XKB_LIBS)
95 libxkbcommon_x11_la_SOURCES = \
109 src/xkbcomp/parser.c \
111 CLEANFILES = $(BUILT_SOURCES)
113 src/xkbcomp/parser.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
114 src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
122 doc: doc/stamp-doxygen
123 clean-doc: clean-doxygen
125 clean-local:: clean-doc
127 doc/stamp-doxygen: $(top_srcdir)/xkbcommon/*.h
128 $(AM_V_GEN)$(DOXYGEN) doc/Doxyfile
132 rm -rf doc/html doc/stamp-doxygen
134 install-data-local:: doc
135 $(MKDIR_P) $(DESTDIR)$(htmldir)
136 $(INSTALL_DATA) doc/html/* $(DESTDIR)$(htmldir)
139 rm -rf $(DESTDIR)$(htmldir)
147 # Some tests need to use unexported symbols, so we link them against
148 # a private copy of libxkbcommon with all symbols exposed.
149 check_LTLIBRARIES = libtest.la
150 libtest_la_CFLAGS = $(AM_CFLAGS) -fvisibility=default
151 libtest_la_SOURCES = \
152 $(libxkbcommon_la_SOURCES) \
156 AM_TESTS_ENVIRONMENT = \
157 XKB_LOG_LEVEL=debug; export XKB_LOG_LEVEL; \
158 XKB_LOG_VERBOSITY=10; export XKB_LOG_VERBOSITY; \
159 $(XORG_MALLOC_DEBUG_ENV)
171 test/rmlvo-to-kccgst \
172 test/print-compiled-keymap \
175 TESTS_LDADD = libtest.la
177 test_keysym_LDADD = $(TESTS_LDADD)
178 test_filecomp_LDADD = $(TESTS_LDADD)
179 test_context_LDADD = $(TESTS_LDADD)
180 test_rules_file_CFLAGS = $(AM_CFLAGS) -Wno-declaration-after-statement
181 test_rules_file_LDADD = $(TESTS_LDADD) -lrt
182 test_stringcomp_LDADD = $(TESTS_LDADD)
183 test_buffercomp_LDADD = $(TESTS_LDADD)
184 test_log_LDADD = $(TESTS_LDADD)
185 test_atom_LDADD = $(TESTS_LDADD)
186 test_rmlvo_to_kccgst_LDADD = $(TESTS_LDADD)
187 test_print_compiled_keymap_LDADD = $(TESTS_LDADD)
188 test_bench_key_proc_LDADD = $(TESTS_LDADD) -lrt
196 test/interactive-evdev
198 test_state_LDADD = $(TESTS_LDADD)
199 test_keyseq_LDADD = $(TESTS_LDADD)
200 test_rulescomp_LDADD = $(TESTS_LDADD) -lrt
201 test_interactive_evdev_LDADD = $(TESTS_LDADD)
202 endif BUILD_LINUX_TESTS
210 TESTS_X11_LDADD = $(XCB_XKB_LIBS) $(TESTS_LDADD) libxkbcommon-x11.la
211 TESTS_X11_CFLAGS = $(XCB_XKB_CFLAGS)
213 test_x11_LDADD = $(TESTS_X11_LDADD)
214 test_x11_CFLAGS = $(TESTS_X11_CFLAGS)
215 test_interactive_x11_LDADD = $(TESTS_X11_LDADD)
216 test_interactive_x11_CFLAGS = $(TESTS_X11_CFLAGS)
219 check_PROGRAMS += $(TESTS)
225 # This sed script strips out lines that start with '#define _' which
226 # removes #define _OSF_Keysyms and such. The XK_Ydiaeresis case is to
227 # handle a duplicate definition in HPkeysyms.h which kicks in if it's
228 # not already defined.
229 X11_INCLUDEDIR = /usr/include/X11
231 $(X11_INCLUDEDIR)/keysymdef.h \
232 $(X11_INCLUDEDIR)/XF86keysym.h \
233 $(X11_INCLUDEDIR)/Sunkeysym.h \
234 $(X11_INCLUDEDIR)/DECkeysym.h \
235 $(X11_INCLUDEDIR)/HPkeysym.h
237 echo -en '#ifndef _XKBCOMMON_KEYSYMS_H\n#define _XKBCOMMON_KEYSYMS_H\n\n' > $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
238 echo -en '/* This file is autogenerated from Makefile.am; please do not commit directly. */\n\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
239 echo -en '#define XKB_KEY_NoSymbol 0x000000 /* Special KeySym */\n\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
240 sed -e '/XK_Ydiaeresis\s*0x100000ee/d' \
242 -e 's/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/' \
243 -e '/\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
244 echo -en '\n\n#endif\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
245 LC_CTYPE=C python $(top_srcdir)/makekeys.py $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h > $(top_srcdir)/src/ks_tables.h
247 # Run this if you add/remove a new keyword to the xkbcomp scanner,
248 # or just want to regenerate the gperf file.
250 $(AM_V_GEN)gperf < $(top_srcdir)/src/xkbcomp/keywords.gperf > $(top_srcdir)/src/xkbcomp/keywords.c
256 Android_build.mk: Makefile $(BUILT_SOURCES)
258 -:PROJECT libxkbcommon \
259 -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
261 -:STATIC libxkbcommon \
263 -:SOURCES $(filter-out %.l %.y,$(libxkbcommon_la_SOURCES)) $(BUILT_SOURCES) \
264 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS) \
265 -:LDFLAGS $(AM_LDFLAGS) \
267 -:PASSTHROUGH 'libxkbcommon-clean: clean-libxkbcommon' \