Load the system registry cache prior to the user one.
[platform/upstream/ibus.git] / bus / Makefile.am
1 # vim:set noet ts=4:
2 #
3 # ibus - The Input Bus
4 #
5 # Copyright (c) 2007-2013 Peng Huang <shawn.p.huang@gmail.com>
6 # Copyright (c) 2007-2013 Red Hat, Inc.
7 #
8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public
10 # License as published by the Free Software Foundation; either
11 # version 2 of the License, or (at your option) any later version.
12 #
13 # This library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU Lesser General Public License for more details.
17 #
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with this program; if not, write to the
20 # Free Software Foundation, Inc., 59 Temple Place, Suite 330,
21 # Boston, MA  02111-1307  USA
22
23 NULL =
24
25 libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la
26
27 AM_CPPFLAGS =                \
28         -I$(top_srcdir)/src   \
29         -I$(top_builddir)/src \
30         $(NULL)
31
32 AM_CFLAGS = \
33         @GLIB2_CFLAGS@ \
34         @GIO2_CFLAGS@ \
35         @GTHREAD2_CFLAGS@ \
36         -DG_LOG_DOMAIN=\"IBUS\" \
37         -DPKGDATADIR=\"$(pkgdatadir)\" \
38         -DLIBEXECDIR=\"$(libexecdir)\" \
39         -DBINDIR=\"@bindir@\" \
40         -DIBUS_DISABLE_DEPRECATED \
41         $(NULL)
42 AM_LDADD = \
43         @GOBJECT2_LIBS@ \
44         @GLIB2_LIBS@ \
45         @GIO2_LIBS@ \
46         @GTHREAD2_LIBS@ \
47         $(libibus) \
48         $(NULL)
49
50 commonsrc = \
51         component.c \
52         component.h \
53         dbusimpl.c \
54         dbusimpl.h \
55         ibusimpl.c \
56         ibusimpl.h \
57         inputcontext.c \
58         inputcontext.h \
59         engineproxy.c \
60         engineproxy.h \
61         panelproxy.c \
62         panelproxy.h \
63         factoryproxy.c \
64         factoryproxy.h \
65         global.c \
66         global.h \
67         server.c \
68         server.h \
69         connection.c \
70         connection.h \
71         matchrule.c \
72         matchrule.h \
73         marshalers.c \
74         marshalers.h \
75         types.h \
76         $(NULL)
77
78 bin_PROGRAMS = ibus-daemon
79 ibus_daemon_DEPENDENCIES = \
80         $(libibus) \
81         $(NULL)
82 ibus_daemon_SOURCES = \
83         $(commonsrc) \
84         main.c \
85         $(NULL)
86 ibus_daemon_CFLAGS = \
87         $(AM_CFLAGS) \
88         $(NULL)
89 ibus_daemon_LDADD = \
90         $(AM_LDADD) \
91         $(NULL)
92
93 BUILT_SOURCES =             \
94         marshalers.h            \
95         marshalers.c            \
96         $(NULL)
97
98 # gen marshal
99 marshalers.h: marshalers.list
100         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=bus_marshal $(srcdir)/marshalers.list --header --internal > $@.tmp && \
101         mv $@.tmp $@
102
103 marshalers.c: marshalers.h marshalers.list
104         $(AM_V_GEN) (echo "#include \"marshalers.h\""; \
105         $(GLIB_GENMARSHAL) --prefix=bus_marshal $(srcdir)/marshalers.list --body --internal) > $@.tmp && \
106         mv $@.tmp $@
107
108
109 if ENABLE_TESTS
110 TESTS = \
111         test-matchrule \
112         test-stress     \
113         $(NULL)
114 endif
115
116 noinst_PROGRAMS = $(TESTS)
117
118 test_matchrule_DEPENDENCIES = \
119         $(libibus) \
120         $(NULL)
121 test_matchrule_SOURCES = \
122         $(commonsrc) \
123         test-matchrule.c \
124         $(NULL)
125 test_matchrule_CFLAGS = \
126         $(AM_CFLAGS) \
127         $(NULL)
128 test_matchrule_LDADD = \
129         $(AM_LDADD) \
130         $(NULL)
131
132 test_stress_SOURCES = \
133         test-client.c \
134         test-client.h \
135         test-stress.c \
136         $(NULL)
137 test_stress_CFLAGS = \
138         $(AM_CFLAGS) \
139         @GTK2_CFLAGS@ \
140         @X11_CFLAGS@ \
141         $(NULL)
142 test_stress_LDADD = \
143         $(AM_LDADD) \
144         @GTK2_LIBS@ \
145         @X11_LIBS@ \
146         $(NULL)
147
148 EXTRA_DIST =                \
149         $(man_one_in_files)     \
150         marshalers.list         \
151         $(NULL)
152
153 CLEANFILES = \
154         $(man_one_DATA)            \
155         $(man_one_files)        \
156         $(NULL)
157
158 $(libibus):
159         $(MAKE) -C $(top_builddir)/src
160
161 test: ibus-daemon
162         $(ENV_IBUS_TEST) \
163                 G_DEBUG=fatal_warnings \
164                 $(builddir)/ibus-daemon -v
165
166 man_one_in_files = ibus-daemon.1.in
167 man_one_files = $(man_one_in_files:.1.in=.1)
168 man_one_DATA =$(man_one_files:.1=.1.gz) 
169 man_onedir = $(datadir)/man/man1
170 %.1: %.1.in
171         $(AM_V_GEN) sed \
172                 -e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
173                 mv $@.tmp $@
174 %.1.gz: %.1
175         $(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
176
177 -include $(top_srcdir)/git.mk