0da3b79a26a731a490815b911e58abb71045fb1e
[profile/ivi/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/alias.c \
46         src/xkbcomp/alias.h \
47         src/xkbcomp/compat.c \
48         src/xkbcomp/expr.c \
49         src/xkbcomp/expr.h \
50         src/xkbcomp/indicators.c \
51         src/xkbcomp/indicators.h \
52         src/xkbcomp/keycodes.c \
53         src/xkbcomp/keycodes.h \
54         src/xkbcomp/keymap.c \
55         src/xkbcomp/keytypes.c \
56         src/xkbcomp/misc.c \
57         src/xkbcomp/parser.y \
58         src/xkbcomp/parseutils.c \
59         src/xkbcomp/parseutils.h \
60         src/xkbcomp/path.c \
61         src/xkbcomp/path.h \
62         src/xkbcomp/scanner.l \
63         src/xkbcomp/symbols.c \
64         src/xkbcomp/vmod.c \
65         src/xkbcomp/vmod.h \
66         src/xkbcomp/xkbcomp.c \
67         src/xkbcomp/xkbcomp.h \
68         src/xkbcomp/xkbcomp-priv.h \
69         src/alloc.c \
70         src/alloc.h \
71         src/atom.c \
72         src/atom.h \
73         src/context.c \
74         src/keysym.c \
75         src/map.c \
76         src/misc.c \
77         src/rules.c \
78         src/rules.h \
79         src/state.c \
80         src/text.c \
81         src/text.h \
82         src/utils.c \
83         src/utils.h \
84         src/xkb.c \
85         src/xkb-priv.h
86
87 BUILT_SOURCES = \
88         src/xkbcomp/parser.c \
89         src/xkbcomp/parser.h \
90         src/xkbcomp/scanner.c \
91         src/ks_tables.h
92 CLEANFILES = $(BUILT_SOURCES)
93
94 src/ks_tables.h: $(KEYSYMDEFS) $(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 TESTS_ENVIRONMENT =
103
104 TESTS = \
105         test/xkey \
106         test/filecomp \
107         test/namescomp \
108         test/rulescomp \
109         test/canonicalise \
110         test/state \
111         test/context
112 TESTS_LDADD = libxkbcommon.la
113
114 test_xkey_LDADD = $(TESTS_LDADD)
115 test_filecomp_LDADD = $(TESTS_LDADD)
116 test_namescomp_LDADD = $(TESTS_LDADD)
117 test_rulescomp_LDADD = $(TESTS_LDADD) -lrt
118 test_canonicalise_LDADD = $(TESTS_LDADD)
119 test_state_LDADD = $(TESTS_LDADD)
120 test_context_LDADD = $(TESTS_LDADD)
121
122 check_PROGRAMS = $(TESTS)
123
124 EXTRA_DIST = test/data
125
126 # This sed script strips out lines that start with '#define _' which
127 # removes #define _OSF_Keysyms and such.  The XK_Ydiaeresis case is to
128 # handle a duplicate definition in HPkeysyms.h which kicks in if it's
129 # not already defined.
130
131 update-keysyms:
132         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