Change xkb_key_get_syms to just return a bare int
[platform/upstream/libxkbcommon.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 SUBDIRS = makekeys
4
5 pkgconfigdir = $(libdir)/pkgconfig
6 pkgconfig_DATA = xkbcommon.pc
7
8 MAINTAINERCLEANFILES = ChangeLog INSTALL
9
10 .PHONY: ChangeLog INSTALL
11
12 INSTALL:
13         $(INSTALL_CMD)
14
15 ChangeLog:
16         $(CHANGELOG_CMD)
17
18 dist-hook: ChangeLog INSTALL
19
20 AM_CPPFLAGS = \
21         -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' \
22         -I$(top_srcdir)/include \
23         -I$(top_srcdir)/src \
24         -I$(top_srcdir)/src/xkbcomp \
25         -I$(top_builddir)/src/xkbcomp \
26         -include $(top_srcdir)/src/config.h
27
28 AM_CFLAGS = \
29         $(BASE_CFLAGS) \
30         $(XMALLOC_ZERO_CFLAGS)
31
32 AM_YFLAGS = -d
33
34 xkbcommonincludedir = $(includedir)/xkbcommon
35 xkbcommoninclude_HEADERS = \
36         include/xkbcommon/xkbcommon.h \
37         include/xkbcommon/xkbcommon-names.h
38
39 lib_LTLIBRARIES = libxkbcommon.la
40 libxkbcommon_la_LDFLAGS = -no-undefined
41 libxkbcommon_la_SOURCES = \
42         src/xkbcomp/action.c \
43         src/xkbcomp/action.h \
44         src/xkbcomp/alias.c \
45         src/xkbcomp/alias.h \
46         src/xkbcomp/compat.c \
47         src/xkbcomp/expr.c \
48         src/xkbcomp/expr.h \
49         src/xkbcomp/indicators.c \
50         src/xkbcomp/indicators.h \
51         src/xkbcomp/keycodes.c \
52         src/xkbcomp/keycodes.h \
53         src/xkbcomp/keymap.c \
54         src/xkbcomp/keytypes.c \
55         src/xkbcomp/misc.c \
56         src/xkbcomp/parser.y \
57         src/xkbcomp/parseutils.c \
58         src/xkbcomp/parseutils.h \
59         src/xkbcomp/path.c \
60         src/xkbcomp/scanner.l \
61         src/xkbcomp/symbols.c \
62         src/xkbcomp/vmod.c \
63         src/xkbcomp/vmod.h \
64         src/xkbcomp/xkbcomp.c \
65         src/xkbcomp/xkbcomp.h \
66         src/xkbcomp/xkbcomp-priv.h \
67         src/alloc.c \
68         src/alloc.h \
69         src/atom.c \
70         src/atom.h \
71         src/context.c \
72         src/keysym.c \
73         src/map.c \
74         src/misc.c \
75         src/rules.c \
76         src/rules.h \
77         src/state.c \
78         src/text.c \
79         src/text.h \
80         src/utils.c \
81         src/utils.h \
82         src/xkb.c \
83         src/xkb-priv.h
84
85 BUILT_SOURCES = \
86         src/xkbcomp/parser.c \
87         src/xkbcomp/parser.h \
88         src/xkbcomp/scanner.c \
89         src/ks_tables.h
90 CLEANFILES = $(BUILT_SOURCES)
91
92 src/ks_tables.h: $(KEYSYMDEFS) $(top_builddir)/makekeys/makekeys$(EXEEXT)
93         $(top_builddir)/makekeys/makekeys $(top_srcdir)/include/xkbcommon/xkbcommon-keysyms.h > $@
94
95 $(top_builddir)/makekeys/makekeys$(EXEEXT): $(top_srcdir)/makekeys/makekeys.c
96         $(MAKE) -C makekeys
97
98 # Tests
99
100 TESTS_ENVIRONMENT =
101
102 TESTS = \
103         test/xkey \
104         test/filecomp \
105         test/namescomp \
106         test/rulescomp \
107         test/canonicalise \
108         test/state \
109         test/context
110 TESTS_LDADD = libxkbcommon.la
111
112 test_xkey_LDADD = $(TESTS_LDADD)
113 test_filecomp_LDADD = $(TESTS_LDADD)
114 test_namescomp_LDADD = $(TESTS_LDADD)
115 test_rulescomp_LDADD = $(TESTS_LDADD)
116 test_canonicalise_LDADD = $(TESTS_LDADD)
117 test_state_LDADD = $(TESTS_LDADD)
118 test_context_LDADD = $(TESTS_LDADD)
119
120 check_PROGRAMS = $(TESTS)
121
122 EXTRA_DIST = test/data
123
124 # This sed script strips out lines that start with '#define _' which
125 # removes #define _OSF_Keysyms and such.  The XK_Ydiaeresis case is to
126 # handle a duplicate definition in HPkeysyms.h which kicks in if it's
127 # not already defined.
128
129 update-keysyms:
130         sed -e '/XK_Ydiaeresis\s*0x100000ee/d; /#define _/d; s/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/; /\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) > include/xkbcommon/xkbcommon-keysyms.h