Add Ctrl+space customization.
[platform/upstream/ibus.git] / src / Makefile.am
1 # vim:set noet ts=4:
2 #
3 # ibus - The Input Bus
4 #
5 # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
6 # Copyright (c) 2007-2010 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 if ENABLE_TESTS
26 TESTS_DIR = tests
27 endif
28
29 SUBDIRS = . $(TESTS_DIR)
30
31 # libibus = libibus-@IBUS_API_VERSION@.la
32 libibus = libibus-1.0.la
33
34 # gobject introspection
35 -include $(INTROSPECTION_MAKEFILE)
36 INTROSPECTION_SCANNER_ARGS =
37 INTROSPECTION_COMPILER_ARGS = \
38     --includedir=$(srcdir)    \
39     --includedir=.            \
40     $(NULL)
41 INTROSPECTION_GIRS =
42 CLEANFILES =
43
44 # C preprocessor flags
45 AM_CPPFLAGS =                                   \
46     -DG_LOG_DOMAIN=\"IBUS\"                     \
47     @GLIB2_CFLAGS@                              \
48     @GOBJECT2_CFLAGS@                           \
49     @GIO2_CFLAGS@                               \
50     -DIBUS_DATA_DIR=\"$(pkgdatadir)\"           \
51     -DIBUS_COMPILATION                          \
52     -DISOCODES_PREFIX=\"$(ISOCODES_PREFIX)\"    \
53     $(NULL)
54
55 # ibus library
56 lib_LTLIBRARIES = $(libibus)
57
58 libibus_1_0_la_LIBADD =     \
59     @GLIB2_LIBS@            \
60     @GOBJECT2_LIBS@         \
61     @GIO2_LIBS@             \
62     $(NULL)
63 libibus_1_0_la_LDFLAGS =            \
64     -no-undefined                   \
65     -export-symbols-regex "ibus_.*" \
66     -version-info @LT_VERSION_INFO@ \
67     $(NULL)
68
69 ibus_sources =              \
70     ibusshare.c             \
71     ibusobject.c            \
72     ibusserializable.c      \
73     ibusproxy.c             \
74     ibusservice.c           \
75     ibusfactory.c           \
76     ibusengine.c            \
77     ibuserror.c             \
78     ibustext.c              \
79     ibuskeymap.c            \
80     ibusattribute.c         \
81     ibusattrlist.c          \
82     ibusproperty.c          \
83     ibusproplist.c          \
84     ibuslookuptable.c       \
85     ibusinputcontext.c      \
86     ibusconfig.c            \
87     ibusconfigservice.c     \
88     ibuspanelservice.c      \
89     ibusbus.c               \
90     ibuskeynames.c          \
91     ibuskeyuni.c            \
92     ibushotkey.c            \
93     ibusxml.c               \
94     ibusenginedesc.c        \
95     ibusobservedpath.c      \
96     ibuscomponent.c         \
97     ibusutil.c              \
98     ibusenginesimple.c      \
99     $(NULL)
100 libibus_1_0_la_SOURCES =    \
101     ibusmarshalers.c        \
102     ibusenumtypes.c         \
103     $(ibus_sources)         \
104     $(NULL)
105 ibus_marshalers_sources =   \
106     ibusmarshalers.h        \
107     ibusmarshalers.c        \
108     $(NULL)
109 ibus_enumtypes_sources =    \
110     ibusenumtypes.h         \
111     ibusenumtypes.c         \
112     $(NULL)
113 ibus_headers =              \
114     ibus.h                  \
115     ibusshare.h             \
116     ibusdebug.h             \
117     ibusobject.h            \
118     ibusserializable.h      \
119     ibusproxy.h             \
120     ibusservice.h           \
121     ibusfactory.h           \
122     ibusengine.h            \
123     ibuserror.h             \
124     ibustext.h              \
125     ibuskeymap.h            \
126     ibusattribute.h         \
127     ibusattrlist.h          \
128     ibusproperty.h          \
129     ibusproplist.h          \
130     ibuslookuptable.h       \
131     ibusinputcontext.h      \
132     ibusconfig.h            \
133     ibusconfigservice.h     \
134     ibuspanelservice.h      \
135     ibuskeysyms.h           \
136     ibuskeysyms-compat.h    \
137     ibuskeys.h              \
138     ibustypes.h             \
139     ibusbus.h               \
140     ibushotkey.h            \
141     ibusxml.h               \
142     ibusenginedesc.h        \
143     ibusobservedpath.h      \
144     ibuscomponent.h         \
145     ibusutil.h              \
146     ibusenginesimple.h      \
147     $(NULL)
148 ibusincludedir = $(includedir)/ibus-@IBUS_API_VERSION@
149 ibus_public_headers =       \
150     $(ibus_headers)         \
151     ibusenumtypes.h         \
152     ibusversion.h           \
153     $(NULL)
154 ibusinclude_HEADERS =       \
155     $(ibus_public_headers)  \
156     $(NULL)
157 ibus_privite_headers =       \
158     ibusinternal.h           \
159     keyname-table.h          \
160     gtkimcontextsimpleseqs.h \
161     $(NULL)
162 noinst_HEADERS =            \
163     $(ibus_privite_headers) \
164     $(NULL)
165
166 BUILT_SOURCES =                 \
167     $(ibus_marshalers_sources)  \
168     $(ibus_enumtypes_sources)   \
169     $(NULL)
170
171 if HAVE_INTROSPECTION
172 introspection_sources =         \
173     $(ibus_headers)             \
174     $(ibus_sources)             \
175     $(NULL)
176 built_introspection_sources =   \
177     $(ibus_enumtypes_sources)   \
178     ibusversion.h               \
179     $(NULL)
180 IBus-1.0.gir: $(libibus) Makefile
181 IBus_1_0_gir_SCANNERFLAGS = --pkg-export=ibus-1.0 $(IBUS_GIR_SCANNERFLAGS)
182 IBus_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0
183 IBus_1_0_gir_LIBS = $(libibus)
184 IBus_1_0_gir_FILES =                                            \
185     $(addprefix $(srcdir)/,$(introspection_sources))            \
186     $(addprefix $(builddir)/,$(built_introspection_sources))    \
187     $(NULL)
188 IBus_1_0_gir_CFLAGS = -DIBUS_COMPILATION -I$(srcdir) -I$(builddir)
189 INTROSPECTION_GIRS += IBus-1.0.gir
190
191 girdir = $(datadir)/gir-1.0
192 dist_gir_DATA = $(INTROSPECTION_GIRS)
193
194 typelibsdir = $(libdir)/girepository-1.0
195 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
196
197 CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA)
198 endif
199
200 # gen enum types
201 ibusenumtypes.h: $(ibus_headers) ibusenumtypes.h.template
202         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
203         cd $(srcdir) && $(GLIB_MKENUMS) --template ibusenumtypes.h.template $(ibus_headers) | \
204                 sed 's/i_bus_/ibus_/g' | \
205                 sed 's/I_TYPE_BUS_/IBUS_TYPE_/g') > \
206         ibusenumtypes.h.tmp && mv ibusenumtypes.h.tmp ibusenumtypes.h
207
208 ibusenumtypes.c: $(ibus_headers) ibusenumtypes.c.template
209         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
210         cd $(srcdir) && $(GLIB_MKENUMS) --template ibusenumtypes.c.template $(ibus_headers) | \
211                 sed 's/i_bus_/ibus_/g' | \
212                 sed 's/I_TYPE_BUS_/IBUS_TYPE_/g') > \
213         ibusenumtypes.c.tmp && mv ibusenumtypes.c.tmp ibusenumtypes.c
214
215 # gen marshal
216 ibusmarshalers.h: ibusmarshalers.list
217         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_ibus_marshal $(srcdir)/ibusmarshalers.list --header --internal > $@.tmp && \
218         mv $@.tmp $@
219
220 ibusmarshalers.c: ibusmarshalers.h ibusmarshalers.list
221         $(AM_V_GEN) (echo "#include \"ibusmarshalers.h\""; \
222         $(GLIB_GENMARSHAL) --prefix=_ibus_marshal $(srcdir)/ibusmarshalers.list --body --internal) > $@.tmp && \
223         mv $@.tmp $@
224
225 EXTRA_DIST =                    \
226     ibusversion.h.in            \
227     ibusmarshalers.list         \
228     ibusenumtypes.h.template    \
229     ibusenumtypes.c.template    \
230     $(NULL)
231
232 CLEANFILES +=                   \
233     $(BUILT_SOURCES)            \
234     stamp-ibusmarshalers.h      \
235     stamp-ibusenumtypes.h       \
236     $(NULL)
237
238 DISTCLEANFILES =                \
239     ibusversion.h               \
240     $(NULL)
241
242 -include $(top_srcdir)/git.mk