1 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
3 pkgconfigdir = $(libdir)/pkgconfig
4 pkgconfig_DATA = xkbcommon.pc
8 src/xkbcomp/keywords.gperf
11 -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' \
13 -I$(top_srcdir)/src/xkbcomp \
14 -I$(top_builddir)/src/xkbcomp \
15 -include $(top_builddir)/src/config.h
17 AM_CFLAGS = $(BASE_CFLAGS)
19 AM_LDFLAGS = -no-undefined
21 AM_YFLAGS = -d -p _xkbcommon_
23 xkbcommonincludedir = $(includedir)/xkbcommon
24 xkbcommoninclude_HEADERS = \
25 xkbcommon/xkbcommon.h \
26 xkbcommon/xkbcommon-compat.h \
27 xkbcommon/xkbcommon-keysyms.h \
28 xkbcommon/xkbcommon-names.h
30 lib_LTLIBRARIES = libxkbcommon.la
31 libxkbcommon_la_SOURCES = \
32 src/xkbcomp/action.c \
33 src/xkbcomp/action.h \
35 src/xkbcomp/ast-build.c \
36 src/xkbcomp/ast-build.h \
37 src/xkbcomp/compat.c \
40 src/xkbcomp/include.c \
41 src/xkbcomp/include.h \
42 src/xkbcomp/keycodes.c \
43 src/xkbcomp/keymap.c \
44 src/xkbcomp/keymap-dump.c \
45 src/xkbcomp/keywords.c \
46 src/xkbcomp/parser.y \
47 src/xkbcomp/parser-priv.h \
50 src/xkbcomp/scanner.c \
51 src/xkbcomp/scanner-utils.h \
52 src/xkbcomp/symbols.c \
56 src/xkbcomp/xkbcomp.c \
57 src/xkbcomp/xkbcomp-priv.h \
77 src/xkbcomp/parser.c \
79 CLEANFILES = $(BUILT_SOURCES)
81 src/xkbcomp/parser.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
82 src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
88 doc: doc/stamp-doxygen
89 clean-doc: clean-doxygen
91 clean-local:: clean-doc
93 doc/stamp-doxygen: $(top_srcdir)/xkbcommon/*.h
94 $(AM_V_GEN)$(DOXYGEN) doc/Doxyfile
98 rm -rf doc/html doc/stamp-doxygen
100 install-data-local:: doc
101 $(MKDIR_P) $(DESTDIR)$(htmldir)
102 $(INSTALL_DATA) doc/html/* $(DESTDIR)$(htmldir)
105 rm -rf $(DESTDIR)$(htmldir)
112 # Some tests need to use unexported symbols, so we link them against
113 # a private copy of libxkbcommon with all symbols exposed.
114 check_LTLIBRARIES = libtest.la
115 libtest_la_CFLAGS = $(AM_CLFLAGS) -fvisibility=default
116 libtest_la_SOURCES = \
117 $(libxkbcommon_la_SOURCES) \
121 AM_TESTS_ENVIRONMENT = \
122 XKB_LOG_LEVEL=debug; export XKB_LOG_LEVEL; \
123 XKB_LOG_VERBOSITY=10; export XKB_LOG_VERBOSITY; \
124 $(XORG_MALLOC_DEBUG_ENV)
135 TESTS_LDADD = libtest.la
137 test_keysym_LDADD = $(TESTS_LDADD)
138 test_filecomp_LDADD = $(TESTS_LDADD)
139 test_rulescomp_LDADD = $(TESTS_LDADD) -lrt
140 test_context_LDADD = $(TESTS_LDADD)
141 test_rules_file_CFLAGS = $(AM_CFLAGS) -Wno-declaration-after-statement
142 test_rules_file_LDADD = $(TESTS_LDADD) -lrt
143 test_stringcomp_LDADD = $(TESTS_LDADD)
144 test_buffercomp_LDADD = $(TESTS_LDADD)
145 test_log_LDADD = $(TESTS_LDADD)
146 test_atom_LDADD = $(TESTS_LDADD)
147 test_rmlvo_to_kccgst_LDADD = $(TESTS_LDADD)
148 test_print_compiled_keymap_LDADD = $(TESTS_LDADD)
149 test_bench_key_proc_LDADD = $(TESTS_LDADD) -lrt
153 test/rmlvo-to-kccgst \
154 test/print-compiled-keymap \
163 test_keyseq_LDADD = $(TESTS_LDADD)
164 test_state_LDADD = $(TESTS_LDADD)
165 test_interactive_evdev_LDADD = $(TESTS_LDADD)
168 test/interactive-evdev
170 endif BUILD_LINUX_TESTS
175 # This sed script strips out lines that start with '#define _' which
176 # removes #define _OSF_Keysyms and such. The XK_Ydiaeresis case is to
177 # handle a duplicate definition in HPkeysyms.h which kicks in if it's
178 # not already defined.
179 X11_INCLUDEDIR = /usr/include/X11
181 $(X11_INCLUDEDIR)/keysymdef.h \
182 $(X11_INCLUDEDIR)/XF86keysym.h \
183 $(X11_INCLUDEDIR)/Sunkeysym.h \
184 $(X11_INCLUDEDIR)/DECkeysym.h \
185 $(X11_INCLUDEDIR)/HPkeysym.h
187 echo -en '#ifndef _XKBCOMMON_KEYSYMS_H\n#define _XKBCOMMON_KEYSYMS_H\n\n' > $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
188 echo -en '/* This file is autogenerated from Makefile.am; please do not commit directly. */\n\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
189 echo -en '#define XKB_KEY_NoSymbol 0x000000 /* Special KeySym */\n\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
190 sed -e '/XK_Ydiaeresis\s*0x100000ee/d' \
192 -e 's/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/' \
193 -e '/\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
194 echo -en '\n\n#endif\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
195 LC_CTYPE=C python $(top_srcdir)/makekeys.py $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h > $(top_srcdir)/src/ks_tables.h
197 # Run this if you add/remove a new keyword to the xkbcomp scanner,
198 # or just want to regenerate the gperf file.
200 $(AM_V_GEN)gperf < $(top_srcdir)/src/xkbcomp/keywords.gperf > $(top_srcdir)/src/xkbcomp/keywords.c
204 Android_build.mk: Makefile $(BUILT_SOURCES)
206 -:PROJECT libxkbcommon \
207 -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
209 -:STATIC libxkbcommon \
211 -:SOURCES $(filter-out %.l %.y,$(libxkbcommon_la_SOURCES)) $(BUILT_SOURCES) \
212 -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS) \
213 -:LDFLAGS $(AM_LDFLAGS) \
215 -:PASSTHROUGH 'libxkbcommon-clean: clean-libxkbcommon' \