doc: reorder "Keymap Components" functions
[platform/upstream/libxkbcommon.git] / Makefile.am
index 3168b55..0b315d0 100644 (file)
@@ -5,7 +5,12 @@ pkgconfig_DATA = xkbcommon.pc
 
 EXTRA_DIST = \
        makekeys.py \
-       src/xkbcomp/keywords.gperf
+       src/xkbcomp/keywords.gperf \
+       test/data \
+       README.md \
+       doc/quick-guide.md \
+       doc/keymap-format-text-v1.txt \
+       doc/rules-format.txt
 
 AM_CPPFLAGS = \
        -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' \
@@ -51,7 +56,6 @@ libxkbcommon_la_SOURCES = \
        src/xkbcomp/rules.c \
        src/xkbcomp/rules.h \
        src/xkbcomp/scanner.c \
-       src/xkbcomp/scanner-utils.h \
        src/xkbcomp/symbols.c \
        src/xkbcomp/types.c \
        src/xkbcomp/vmod.c \
@@ -63,7 +67,6 @@ libxkbcommon_la_SOURCES = \
        src/context.c \
        src/context.h \
        src/context-priv.c \
-       src/compat.c \
        src/darray.h \
        src/keysym.c \
        src/keysym.h \
@@ -72,11 +75,42 @@ libxkbcommon_la_SOURCES = \
        src/keymap.c \
        src/keymap.h \
        src/keymap-priv.c \
+       src/scanner-utils.h \
        src/state.c \
        src/text.c \
        src/text.h \
+       src/utf8.c \
+       src/utf8.h \
        src/utils.c \
        src/utils.h
+libxkbcommon_la_LDFLAGS = -Wl,--version-script=${srcdir}/xkbcommon.map
+
+if ENABLE_X11
+pkgconfig_DATA += xkbcommon-x11.pc
+
+xkbcommon_x11includedir = $(xkbcommonincludedir)
+xkbcommon_x11include_HEADERS = \
+       xkbcommon/xkbcommon-x11.h
+
+lib_LTLIBRARIES += libxkbcommon-x11.la
+
+libxkbcommon_x11_la_CFLAGS = $(AM_CFLAGS) $(XCB_XKB_CFLAGS)
+libxkbcommon_x11_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/x11
+libxkbcommon_x11_la_LIBADD = libxkbcommon.la $(XCB_XKB_LIBS)
+libxkbcommon_x11_la_LDFLAGS = -Wl,--version-script=${srcdir}/xkbcommon-x11.map
+
+libxkbcommon_x11_la_SOURCES = \
+       src/x11/keymap.c \
+       src/x11/state.c \
+       src/x11/util.c \
+       src/x11/x11-priv.h \
+       src/context.h \
+       src/context-priv.c \
+       src/keymap.h \
+       src/keymap-priv.c \
+       src/atom.h \
+       src/atom.c
+endif ENABLE_X11
 
 BUILT_SOURCES = \
        src/xkbcomp/parser.c \
@@ -86,7 +120,9 @@ CLEANFILES = $(BUILT_SOURCES)
 src/xkbcomp/parser.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
 src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
 
+##
 # Documentation
+##
 
 if ENABLE_DOCS
 if HAVE_DOXYGEN
@@ -108,20 +144,22 @@ install-data-local:: doc
 
 uninstall-local::
        rm -rf $(DESTDIR)$(htmldir)
-
 endif HAVE_DOXYGEN
 endif ENABLE_DOCS
 
+##
 # Tests
+##
 
 # Some tests need to use unexported symbols, so we link them against
 # a private copy of libxkbcommon with all symbols exposed.
 check_LTLIBRARIES = libtest.la
-libtest_la_CFLAGS = $(AM_CLFLAGS) -fvisibility=default
+libtest_la_CFLAGS = $(AM_CFLAGS) -fvisibility=default
 libtest_la_SOURCES = \
        $(libxkbcommon_la_SOURCES) \
        test/common.c \
-       test/test.h
+       test/test.h \
+       test/evdev-scancodes.h
 
 AM_TESTS_ENVIRONMENT = \
        XKB_LOG_LEVEL=debug; export XKB_LOG_LEVEL; \
@@ -136,12 +174,20 @@ TESTS = \
        test/stringcomp \
        test/buffercomp \
        test/log \
-       test/atom
+       test/atom \
+       test/utf8 \
+       test/state \
+       test/keyseq \
+       test/rulescomp
+check_PROGRAMS = \
+       test/rmlvo-to-kccgst \
+       test/print-compiled-keymap \
+       test/bench-key-proc
+
 TESTS_LDADD = libtest.la
 
 test_keysym_LDADD = $(TESTS_LDADD)
 test_filecomp_LDADD = $(TESTS_LDADD)
-test_rulescomp_LDADD = $(TESTS_LDADD) -lrt
 test_context_LDADD = $(TESTS_LDADD)
 test_rules_file_CFLAGS = $(AM_CFLAGS) -Wno-declaration-after-statement
 test_rules_file_LDADD = $(TESTS_LDADD) -lrt
@@ -149,33 +195,44 @@ test_stringcomp_LDADD = $(TESTS_LDADD)
 test_buffercomp_LDADD = $(TESTS_LDADD)
 test_log_LDADD = $(TESTS_LDADD)
 test_atom_LDADD = $(TESTS_LDADD)
+test_utf8_LDADD = $(TESTS_LDADD)
+test_state_LDADD = $(TESTS_LDADD)
+test_keyseq_LDADD = $(TESTS_LDADD)
+test_rulescomp_LDADD = $(TESTS_LDADD) -lrt
 test_rmlvo_to_kccgst_LDADD = $(TESTS_LDADD)
 test_print_compiled_keymap_LDADD = $(TESTS_LDADD)
 test_bench_key_proc_LDADD = $(TESTS_LDADD) -lrt
 
-check_PROGRAMS = \
-       $(TESTS) \
-       test/rmlvo-to-kccgst \
-       test/print-compiled-keymap \
-       test/bench-key-proc
-
 if BUILD_LINUX_TESTS
-TESTS += \
-       test/state \
-       test/keyseq \
-       test/rulescomp
+check_PROGRAMS += \
+       test/interactive-evdev
 
-test_keyseq_LDADD = $(TESTS_LDADD)
-test_state_LDADD = $(TESTS_LDADD)
 test_interactive_evdev_LDADD = $(TESTS_LDADD)
+endif BUILD_LINUX_TESTS
 
+if ENABLE_X11
+TESTS += \
+       test/x11 \
+       test/x11comp
 check_PROGRAMS += \
-       test/interactive-evdev
+       test/interactive-x11
 
-endif BUILD_LINUX_TESTS
+TESTS_X11_LDADD = $(XCB_XKB_LIBS) $(TESTS_LDADD) libxkbcommon-x11.la
+TESTS_X11_CFLAGS = $(XCB_XKB_CFLAGS)
+
+test_x11_LDADD = $(TESTS_X11_LDADD)
+test_x11_CFLAGS = $(TESTS_X11_CFLAGS)
+test_x11comp_LDADD = $(TESTS_X11_LDADD)
+test_x11comp_CFLAGS = $(TESTS_X11_CFLAGS)
+test_interactive_x11_LDADD = $(TESTS_X11_LDADD)
+test_interactive_x11_CFLAGS = $(TESTS_X11_CFLAGS)
+endif ENABLE_X11
+
+check_PROGRAMS += $(TESTS)
 
-EXTRA_DIST += \
-       test/data
+##
+# Custom targets
+##
 
 # This sed script strips out lines that start with '#define _' which
 # removes #define _OSF_Keysyms and such.  The XK_Ydiaeresis case is to
@@ -204,7 +261,9 @@ update-keysyms:
 update-keywords:
        $(AM_V_GEN)gperf < $(top_srcdir)/src/xkbcomp/keywords.gperf > $(top_srcdir)/src/xkbcomp/keywords.c
 
+##
 # Android stuff
+##
 
 Android_build.mk: Makefile $(BUILT_SOURCES)
        androgenizer \