5 # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
6 # Copyright (c) 2007-2010 Red Hat, Inc.
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.
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.
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
29 SUBDIRS = . $(TESTS_DIR)
31 # libibus = libibus-@IBUS_API_VERSION@.la
32 libibus = libibus-1.0.la
34 # gobject introspection
35 -include $(INTROSPECTION_MAKEFILE)
36 INTROSPECTION_SCANNER_ARGS =
37 INTROSPECTION_COMPILER_ARGS = \
38 --includedir=$(srcdir) \
44 # C preprocessor flags
46 -DG_LOG_DOMAIN=\"IBUS\" \
50 -DIBUS_DATA_DIR=\"$(pkgdatadir)\" \
52 -DISOCODES_PREFIX=\"$(ISOCODES_PREFIX)\" \
56 lib_LTLIBRARIES = $(libibus)
58 libibus_1_0_la_LIBADD = \
63 libibus_1_0_la_LDFLAGS = \
65 -export-symbols-regex "ibus_.*" \
66 -version-info @LT_VERSION_INFO@ \
100 libibus_1_0_la_SOURCES = \
105 ibus_marshalers_sources = \
109 ibus_enumtypes_sources = \
133 ibusconfigservice.h \
136 ibuskeysyms-compat.h \
148 ibusincludedir = $(includedir)/ibus-@IBUS_API_VERSION@
149 ibus_public_headers = \
154 ibusinclude_HEADERS = \
155 $(ibus_public_headers) \
157 ibus_privite_headers = \
160 gtkimcontextsimpleseqs.h \
163 $(ibus_privite_headers) \
167 $(ibus_marshalers_sources) \
168 $(ibus_enumtypes_sources) \
171 if HAVE_INTROSPECTION
172 introspection_sources = \
176 built_introspection_sources = \
177 $(ibus_enumtypes_sources) \
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)) \
188 IBus_1_0_gir_CFLAGS = -DIBUS_COMPILATION -I$(srcdir) -I$(builddir)
189 INTROSPECTION_GIRS += IBus-1.0.gir
191 girdir = $(datadir)/gir-1.0
192 dist_gir_DATA = $(INTROSPECTION_GIRS)
194 typelibsdir = $(libdir)/girepository-1.0
195 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
197 CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA)
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
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
216 ibusmarshalers.h: ibusmarshalers.list
217 $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_ibus_marshal $(srcdir)/ibusmarshalers.list --header --internal > $@.tmp && \
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 && \
227 ibusmarshalers.list \
228 ibusenumtypes.h.template \
229 ibusenumtypes.c.template \
234 stamp-ibusmarshalers.h \
235 stamp-ibusenumtypes.h \
242 -include $(top_srcdir)/git.mk