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