Delete ibus.desktop
[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 INCLUDES =                \
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         $(INCLUDES) \
42         $(NULL)
43 AM_LDADD = \
44         @GOBJECT2_LIBS@ \
45         @GLIB2_LIBS@ \
46         @GIO2_LIBS@ \
47         @GTHREAD2_LIBS@ \
48         $(libibus) \
49         $(NULL)
50
51 commonsrc = \
52         component.c \
53         component.h \
54         dbusimpl.c \
55         dbusimpl.h \
56         ibusimpl.c \
57         ibusimpl.h \
58         inputcontext.c \
59         inputcontext.h \
60         engineproxy.c \
61         engineproxy.h \
62         panelproxy.c \
63         panelproxy.h \
64         factoryproxy.c \
65         factoryproxy.h \
66         global.c \
67         global.h \
68         server.c \
69         server.h \
70         connection.c \
71         connection.h \
72         matchrule.c \
73         matchrule.h \
74         registry.c \
75         registry.h \
76         marshalers.c \
77         marshalers.h \
78         types.h \
79         $(NULL)
80
81 bin_PROGRAMS = ibus-daemon
82 ibus_daemon_DEPENDENCIES = \
83         $(libibus) \
84         $(NULL)
85 ibus_daemon_SOURCES = \
86         $(commonsrc) \
87         main.c \
88         $(NULL)
89 ibus_daemon_CFLAGS = \
90         $(AM_CFLAGS) \
91         $(NULL)
92 ibus_daemon_LDADD = \
93         $(AM_LDADD) \
94         $(NULL)
95
96 BUILT_SOURCES =             \
97         marshalers.h            \
98         marshalers.c            \
99         $(NULL)
100
101 # gen marshal
102 marshalers.h: marshalers.list
103         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=bus_marshal $(srcdir)/marshalers.list --header --internal > $@.tmp && \
104         mv $@.tmp $@
105
106 marshalers.c: marshalers.h marshalers.list
107         $(AM_V_GEN) (echo "#include \"marshalers.h\""; \
108         $(GLIB_GENMARSHAL) --prefix=bus_marshal $(srcdir)/marshalers.list --body --internal) > $@.tmp && \
109         mv $@.tmp $@
110
111
112 if ENABLE_TESTS
113 TESTS = \
114         test-matchrule \
115         test-registry \
116         test-stress     \
117         $(NULL)
118 endif
119
120 noinst_PROGRAMS = $(TESTS)
121
122 test_registry_SOURCES = \
123         $(commonsrc) \
124         test-registry.c \
125         $(NULL)
126 test_registry_CFLAGS = \
127         $(AM_CFLAGS) \
128         $(NULL)
129 test_registry_LDADD = \
130         $(AM_LDADD) \
131         $(NULL)
132
133 test_matchrule_DEPENDENCIES = \
134         $(libibus) \
135         $(NULL)
136 test_matchrule_SOURCES = \
137         $(commonsrc) \
138         test-matchrule.c \
139         $(NULL)
140 test_matchrule_CFLAGS = \
141         $(AM_CFLAGS) \
142         $(NULL)
143 test_matchrule_LDADD = \
144         $(AM_LDADD) \
145         $(NULL)
146
147 test_stress_SOURCES = \
148         test-client.c \
149         test-client.h \
150         test-stress.c \
151         $(NULL)
152 test_stress_CFLAGS = \
153         $(AM_CFLAGS) \
154         @GTK2_CFLAGS@ \
155         @X11_CFLAGS@ \
156         $(NULL)
157 test_stress_LDADD = \
158         $(AM_LDADD) \
159         @GTK2_LIBS@ \
160         @X11_LIBS@ \
161         $(NULL)
162
163 EXTRA_DIST =                \
164         $(man_one_in_files)     \
165         marshalers.list         \
166         $(NULL)
167
168 CLEANFILES = \
169         $(man_one_DATA)            \
170         $(man_one_files)        \
171         $(NULL)
172
173 $(libibus):
174         $(MAKE) -C $(top_builddir)/src
175
176 test: ibus-daemon
177         $(ENV_IBUS_TEST) \
178                 G_DEBUG=fatal_warnings \
179                 $(builddir)/ibus-daemon -v
180
181 man_one_in_files = ibus-daemon.1.in
182 man_one_files = $(man_one_in_files:.1.in=.1)
183 man_one_DATA =$(man_one_files:.1=.1.gz) 
184 man_onedir = $(datadir)/man/man1
185 %.1: %.1.in
186         $(AM_V_GEN) sed \
187                 -e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
188                 mv $@.tmp $@
189 %.1.gz: %.1
190         $(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
191
192 -include $(top_srcdir)/git.mk