Make build directory includes more explicit
[platform/upstream/libxkbcommon.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 pkgconfigdir = $(libdir)/pkgconfig
4 pkgconfig_DATA = xkbcommon.pc
5
6 MAINTAINERCLEANFILES = ChangeLog INSTALL
7
8 .PHONY: ChangeLog INSTALL
9
10 INSTALL:
11         $(INSTALL_CMD)
12
13 ChangeLog:
14         $(CHANGELOG_CMD)
15
16 dist-hook: ChangeLog INSTALL
17
18 AM_CPPFLAGS = \
19         -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' \
20         -I$(top_srcdir)/include \
21         -I$(top_srcdir)/src \
22         -I$(top_srcdir)/src/xkbcomp \
23         -I$(top_builddir)/src/xkbcomp \
24         -include $(top_srcdir)/src/config.h
25
26 AM_CFLAGS = \
27         $(BASE_CFLAGS) \
28         $(XMALLOC_ZERO_CFLAGS)
29
30 AM_YFLAGS = -d
31
32 xkbcommonincludedir = $(includedir)/xkbcommon
33 xkbcommoninclude_HEADERS = \
34         include/xkbcommon/xkbcommon.h \
35         include/xkbcommon/xkbcommon-names.h
36
37 lib_LTLIBRARIES = libxkbcommon.la
38 libxkbcommon_la_LDFLAGS = -no-undefined
39 libxkbcommon_la_SOURCES = \
40         src/xkbcomp/action.c \
41         src/xkbcomp/action.h \
42         src/xkbcomp/alias.c \
43         src/xkbcomp/alias.h \
44         src/xkbcomp/compat.c \
45         src/xkbcomp/expr.c \
46         src/xkbcomp/expr.h \
47         src/xkbcomp/indicators.c \
48         src/xkbcomp/indicators.h \
49         src/xkbcomp/keycodes.c \
50         src/xkbcomp/keycodes.h \
51         src/xkbcomp/keymap.c \
52         src/xkbcomp/keytypes.c \
53         src/xkbcomp/misc.c \
54         src/xkbcomp/parser.y \
55         src/xkbcomp/parseutils.c \
56         src/xkbcomp/parseutils.h \
57         src/xkbcomp/path.c \
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/keysym.c \
71         src/map.c \
72         src/misc.c \
73         src/rules.c \
74         src/rules.h \
75         src/state.c \
76         src/text.c \
77         src/text.h \
78         src/utils.c \
79         src/utils.h \
80         src/xkb.c \
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 noinst_PROGRAMS = makekeys/makekeys
91 makekeys_makekeys_SOURCES = makekeys/makekeys.c
92 makekeys_makekeys_CC = $(CC_FOR_BUILD)
93 makekeys_makekeys_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
94 makekeys_makekeys_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
95 makekeys_makekeys_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
96
97 src/ks_tables.h: $(KEYSYMDEFS) $(top_builddir)/makekeys/makekeys$(EXEEXT)
98         $(top_builddir)/makekeys/makekeys $(KEYSYMDEFS) > $@
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)
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