]> Pileus Git - ~andy/gtk/blob - modules/input/Makefile.am
If major.minor of required and available glib versions are the same, add
[~andy/gtk] / modules / input / Makefile.am
1 ## Makefile.am for gtk+/modules/input
2
3 if PLATFORM_WIN32
4 no_undefined = -no-undefined
5 endif
6
7 INCLUDES = \
8         -I$(top_srcdir)                                 \
9         -I$(top_srcdir)/gdk                             \
10         -I$(top_builddir)/gdk                           \
11         -DGDK_PIXBUF_DISABLE_DEPRECATED                 \
12         -DGDK_DISABLE_DEPRECATED                        \
13         -DGTK_DISABLE_DEPRECATED                        \
14         $(GTK_DEBUG_FLAGS)                              \
15         $(GTK_XIM_FLAGS)                                \
16         $(GTK_DEP_CFLAGS)
17
18 DEPS = \
19         $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la  \
20         $(top_builddir)/gdk/$(gdktargetlib)                             \
21         $(top_builddir)/gtk/$(gtktargetlib)
22
23 LDADDS = \
24         $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la  \
25         $(top_builddir)/gdk/$(gdktargetlib)                             \
26         $(top_builddir)/gtk/$(gtktargetlib)                             \
27         $(GTK_DEP_LIBS)
28
29 moduledir = $(libdir)/gtk-2.0/$(GTK_BINARY_VERSION)/immodules
30
31 im_xim_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
32 im_xim_la_SOURCES =             \
33         gtkimcontextxim.c       \
34         gtkimcontextxim.h       \
35         imxim.c
36 im_xim_la_LIBADD = $(LDADDS)
37 if HAVE_X11R6
38 IM_XIM_MODULE=im-xim.la 
39 endif
40
41 im_am_et_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
42 im_am_et_la_SOURCES = imam-et.c
43 im_am_et_la_LIBADD = $(LDADDS)
44
45 im_cedilla_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
46 im_cedilla_la_SOURCES = imcedilla.c
47 im_cedilla_la_LIBADD = $(LDADDS)
48
49 im_cyrillic_translit_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
50 im_cyrillic_translit_la_SOURCES = imcyrillic-translit.c
51 im_cyrillic_translit_la_LIBADD = $(LDADDS)
52
53 im_ti_er_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
54 im_ti_er_la_SOURCES = imti-er.c
55 im_ti_er_la_LIBADD = $(LDADDS)
56
57 im_ti_et_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
58 im_ti_et_la_SOURCES = imti-et.c
59 im_ti_et_la_LIBADD = $(LDADDS)
60
61 im_thai_broken_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
62 im_thai_broken_la_SOURCES = imthai-broken.c
63 im_thai_broken_la_LIBADD = $(LDADDS)
64
65 im_viqr_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
66 im_viqr_la_SOURCES = imviqr.c
67 im_viqr_la_LIBADD = $(LDADDS)
68
69 im_inuktitut_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
70 im_inuktitut_la_SOURCES = iminuktitut.c
71 im_inuktitut_la_LIBADD = $(LDADDS)
72
73 im_ipa_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
74 im_ipa_la_SOURCES = imipa.c
75 im_ipa_la_LIBADD = $(LDADDS)
76
77
78 im_ime_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
79 im_ime_la_SOURCES = \
80         gtkimcontextime.c \
81         gtkimcontextime.h \
82         imime.c           \
83         imm-extra.h
84 im_ime_la_LIBADD = -limm32 $(LDADDS)
85 if USE_WIN32
86 IM_IME_MODULE=im-ime.la 
87 endif
88
89 if CROSS_COMPILING
90 RUN_QUERY_IMMODULES_TEST=false
91 else
92 RUN_QUERY_IMMODULES_TEST=test -z "$(DESTDIR)"
93 endif
94
95 # Running this if cross compiling or if DESTDIR is set is going to
96 # not work at all, so skip it.
97 # We use install-data-hook here to workaround a bug in automake and/or libtool
98 # that makes the install target for the loader libraries a dependency on
99 # install-data-am, and not install-exec-am. We need to ensure this gets run
100 # after the libraries are installed in their final locations.
101 install-data-hook:
102         @if $(RUN_QUERY_IMMODULES_TEST) ; then \
103           echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
104           $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
105           echo "$(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules" ; \
106           $(top_builddir)/gtk/gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules ; \
107         else \
108           echo "***" ; \
109           echo "*** Warning: gtk.immodules not built" ; \
110           echo "***" ; \
111           echo "*** Generate this file manually on host" ; \
112           echo "*** system using gtk-query-immodules-2.0" ; \
113           echo "***" ; \
114         fi
115
116 uninstall-local:
117         rm -f $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules
118
119 module_LTLIBRARIES =                            \
120         $(IM_XIM_MODULE)                        \
121         im-am-et.la                             \
122         im-cedilla.la                           \
123         im-cyrillic-translit.la                 \
124         im-inuktitut.la                         \
125         im-ipa.la                               \
126         im-thai-broken.la                       \
127         im-ti-er.la                             \
128         im-ti-et.la                             \
129         im-viqr.la                              \
130         $(IM_IME_MODULE)
131
132 gtk.immodules: Makefile.am $(module_LTLIBRARIES)
133         $(top_builddir)/gtk/gtk-query-immodules-2.0 $(module_LTLIBRARIES) > gtk.immodules
134
135 CLEANFILES = gtk.immodules
136
137 if CROSS_COMPILING
138 else
139 all-local: gtk.immodules
140 endif