Move indicators.c code into compat.c
[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_builddir)/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         include/xkbcommon/xkbcommon-keysyms.h
39
40 lib_LTLIBRARIES = libxkbcommon.la
41 libxkbcommon_la_LDFLAGS = -no-undefined
42 libxkbcommon_la_SOURCES = \
43         src/xkbcomp/action.c \
44         src/xkbcomp/action.h \
45         src/xkbcomp/compat.c \
46         src/xkbcomp/expr.c \
47         src/xkbcomp/expr.h \
48         src/xkbcomp/keycodes.c \
49         src/xkbcomp/keytypes.c \
50         src/xkbcomp/misc.c \
51         src/xkbcomp/parser.y \
52         src/xkbcomp/parseutils.c \
53         src/xkbcomp/parseutils.h \
54         src/xkbcomp/path.c \
55         src/xkbcomp/path.h \
56         src/xkbcomp/rules.c \
57         src/xkbcomp/rules.h \
58         src/xkbcomp/scanner.l \
59         src/xkbcomp/symbols.c \
60         src/xkbcomp/vmod.c \
61         src/xkbcomp/vmod.h \
62         src/xkbcomp/xkbcomp.c \
63         src/xkbcomp/xkbcomp.h \
64         src/xkbcomp/xkbcomp-priv.h \
65         src/alloc.c \
66         src/alloc.h \
67         src/atom.c \
68         src/atom.h \
69         src/context.c \
70         src/darray.h \
71         src/keymap-dump.c \
72         src/keysym.c \
73         src/keysym-utf.c \
74         src/list.h \
75         src/map.c \
76         src/state.c \
77         src/text.c \
78         src/text.h \
79         src/utils.c \
80         src/utils.h \
81         src/xkb-priv.h
82
83 BUILT_SOURCES = \
84         src/xkbcomp/parser.c \
85         src/xkbcomp/parser.h \
86         src/xkbcomp/scanner.c \
87         src/ks_tables.h
88 CLEANFILES = $(BUILT_SOURCES)
89
90 src/xkbcomp/parser.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
91 src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
92 src/xkbcomp/scanner.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp)
93
94 src/ks_tables.h: $(top_builddir)/makekeys/makekeys$(EXEEXT)
95         $(AM_V_GEN)$(top_builddir)/makekeys/makekeys $(top_srcdir)/include/xkbcommon/xkbcommon-keysyms.h > $@
96
97 $(top_builddir)/makekeys/makekeys$(EXEEXT): $(top_srcdir)/makekeys/makekeys.c
98         $(MAKE) -C makekeys
99
100 # Tests
101
102 # Some tests need to use unexported symbols, so we link them against
103 # a private copy of libxkbcommon with all symbols exposed.
104 noinst_LTLIBRARIES = libtest.la
105 libtest_la_LDFLAGS = $(libxkbcommon_la_LDFLAGS)
106 libtest_la_SOURCES = \
107         $(libxkbcommon_la_SOURCES) \
108         test/common.c
109
110 TESTS_ENVIRONMENT =
111
112 TESTS = \
113         test/xkey \
114         test/filecomp \
115         test/namescomp \
116         test/rulescomp \
117         test/state \
118         test/context \
119         test/rules-file \
120         test/dump \
121         test/stringcomp \
122         test/keyseq
123 TESTS_LDADD = libtest.la
124
125 test_xkey_LDADD = $(TESTS_LDADD)
126 test_filecomp_LDADD = $(TESTS_LDADD)
127 test_namescomp_LDADD = $(TESTS_LDADD)
128 test_rulescomp_LDADD = $(TESTS_LDADD) -lrt
129 test_state_LDADD = $(TESTS_LDADD)
130 test_context_LDADD = $(TESTS_LDADD)
131 test_rules_file_CFLAGS = $(AM_CFLAGS) -Wno-declaration-after-statement
132 test_rules_file_LDADD = $(TESTS_LDADD)
133 test_dump_LDADD = $(TESTS_LDADD)
134 test_stringcomp_LDADD = $(TESTS_LDADD)
135 test_keyseq_LDADD = $(TESTS_LDADD)
136
137 check_PROGRAMS = $(TESTS)
138
139 EXTRA_DIST = \
140         test/data \
141         test/test.h
142
143 # This sed script strips out lines that start with '#define _' which
144 # removes #define _OSF_Keysyms and such.  The XK_Ydiaeresis case is to
145 # handle a duplicate definition in HPkeysyms.h which kicks in if it's
146 # not already defined.
147
148 X11_INCLUDEDIR = /usr/include/X11
149 KEYSYMDEFS = \
150          $(X11_INCLUDEDIR)/keysymdef.h \
151          $(X11_INCLUDEDIR)/XF86keysym.h \
152          $(X11_INCLUDEDIR)/Sunkeysym.h \
153          $(X11_INCLUDEDIR)/DECkeysym.h \
154          $(X11_INCLUDEDIR)/HPkeysym.h
155 update-keysyms:
156         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