Use AC_ARG_VAR for X11 header and XKB paths
[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         -Isrc/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 = include/xkbcommon/xkbcommon.h
34
35 lib_LTLIBRARIES = libxkbcommon.la
36 libxkbcommon_la_LDFLAGS = -no-undefined
37 libxkbcommon_la_SOURCES = \
38         src/xkbcomp/action.c \
39         src/xkbcomp/action.h \
40         src/xkbcomp/alias.c \
41         src/xkbcomp/alias.h \
42         src/xkbcomp/compat.c \
43         src/xkbcomp/expr.c \
44         src/xkbcomp/expr.h \
45         src/xkbcomp/indicators.c \
46         src/xkbcomp/indicators.h \
47         src/xkbcomp/keycodes.c \
48         src/xkbcomp/keycodes.h \
49         src/xkbcomp/keymap.c \
50         src/xkbcomp/keytypes.c \
51         src/xkbcomp/misc.c \
52         src/xkbcomp/misc.h \
53         src/xkbcomp/parseutils.c \
54         src/xkbcomp/parseutils.h \
55         src/xkbcomp/symbols.c \
56         src/xkbcomp/vmod.c \
57         src/xkbcomp/vmod.h \
58         src/xkbcomp/xkbcomp.c \
59         src/xkbcomp/xkbcomp.h \
60         src/xkbcomp/xkbparse.y \
61         src/xkbcomp/xkbpath.c \
62         src/xkbcomp/xkbpath.h \
63         src/xkbcomp/xkbscan.l \
64         src/alloc.c \
65         src/atom.c \
66         src/context.c \
67         src/keysym.c \
68         src/map.c \
69         src/maprules.c \
70         src/misc.c \
71         src/state.c \
72         src/text.c \
73         src/utils.c \
74         src/utils.h \
75         src/xkb.c \
76         src/xkballoc.h \
77         src/xkbmisc.h \
78         src/xkbrules.h \
79         src/XKBcommonint.h
80
81 BUILT_SOURCES = \
82         src/xkbcomp/xkbparse.c \
83         src/xkbcomp/xkbparse.h \
84         src/xkbcomp/xkbscan.c \
85         src/ks_tables.h
86 CLEANFILES = $(BUILT_SOURCES)
87
88 noinst_PROGRAMS = makekeys/makekeys
89 makekeys_makekeys_SOURCES = makekeys/makekeys.c
90 makekeys_makekeys_CC = $(CC_FOR_BUILD)
91 makekeys_makekeys_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD)
92 makekeys_makekeys_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD)
93 makekeys_makekeys_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD)
94
95 src/ks_tables.h: $(KEYSYMDEFS) $(top_builddir)/makekeys/makekeys$(EXEEXT)
96         $(top_builddir)/makekeys/makekeys $(KEYSYMDEFS) > $@
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