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