action: check range of MovePtr X,Y values
[platform/upstream/libxkbcommon.git] / Makefile.am
index d72c91b..c4d3352 100644 (file)
@@ -17,9 +17,11 @@ AM_CPPFLAGS = \
 AM_CFLAGS = $(BASE_CFLAGS)
 
 AM_LDFLAGS = -no-undefined
+if HAVE_NO_UNDEFINED
+AM_LDFLAGS += -Wl,--no-undefined
+endif
 
-AM_LFLAGS = -o lex.yy.c
-AM_YFLAGS = -d
+AM_YFLAGS = -d -p _xkbcommon_
 
 xkbcommonincludedir = $(includedir)/xkbcommon
 xkbcommoninclude_HEADERS = \
@@ -60,6 +62,7 @@ libxkbcommon_la_SOURCES = \
        src/atom.h \
        src/context.c \
        src/context.h \
+       src/context-priv.c \
        src/compat.c \
        src/darray.h \
        src/keysym.c \
@@ -68,12 +71,40 @@ libxkbcommon_la_SOURCES = \
        src/ks_tables.h \
        src/keymap.c \
        src/keymap.h \
+       src/keymap-priv.c \
        src/state.c \
        src/text.c \
        src/text.h \
        src/utils.c \
        src/utils.h
 
+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_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 \
        src/xkbcomp/parser.h
@@ -131,7 +162,8 @@ TESTS = \
        test/rules-file \
        test/stringcomp \
        test/buffercomp \
-       test/log
+       test/log \
+       test/atom
 TESTS_LDADD = libtest.la
 
 test_keysym_LDADD = $(TESTS_LDADD)
@@ -143,6 +175,7 @@ test_rules_file_LDADD = $(TESTS_LDADD) -lrt
 test_stringcomp_LDADD = $(TESTS_LDADD)
 test_buffercomp_LDADD = $(TESTS_LDADD)
 test_log_LDADD = $(TESTS_LDADD)
+test_atom_LDADD = $(TESTS_LDADD)
 test_rmlvo_to_kccgst_LDADD = $(TESTS_LDADD)
 test_print_compiled_keymap_LDADD = $(TESTS_LDADD)
 test_bench_key_proc_LDADD = $(TESTS_LDADD) -lrt
@@ -161,13 +194,28 @@ TESTS += \
 
 test_keyseq_LDADD = $(TESTS_LDADD)
 test_state_LDADD = $(TESTS_LDADD)
-test_interactive_LDADD = $(TESTS_LDADD)
+test_interactive_evdev_LDADD = $(TESTS_LDADD)
 
 check_PROGRAMS += \
-       test/interactive
+       test/interactive-evdev
 
 endif BUILD_LINUX_TESTS
 
+if ENABLE_X11
+TESTS += \
+       test/x11
+TESTS_X11_LDADD = $(TESTS_LDADD) $(XCB_XKB_LIBS) libxkbcommon-x11.la
+TESTS_X11_CFLAGS = $(XCB_XKB_CFLAGS)
+
+test_x11_LDADD = $(TESTS_X11_LDADD)
+test_x11_CFLAGS = $(TESTS_X11_CFLAGS)
+test_interactive_x11_LDADD = $(TESTS_X11_LDADD)
+test_interactive_x11_CFLAGS = $(TESTS_X11_CFLAGS)
+
+check_PROGRAMS += \
+       test/interactive-x11
+endif ENABLE_X11
+
 EXTRA_DIST += \
        test/data
 
@@ -191,8 +239,7 @@ update-keysyms:
            -e 's/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/' \
            -e '/\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
        echo -en '\n\n#endif\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
-       echo -en '/* This file is autogenerated from Makefile.am; please do not commit directly. */\n\n' > $(top_srcdir)/src/ks_tables.h
-       LC_CTYPE=C python $(top_srcdir)/makekeys.py $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h >> $(top_srcdir)/src/ks_tables.h
+       LC_CTYPE=C python $(top_srcdir)/makekeys.py $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h > $(top_srcdir)/src/ks_tables.h
 
 # Run this if you add/remove a new keyword to the xkbcomp scanner,
 # or just want to regenerate the gperf file.