Debian Codegraph @

client/wayland/Makefile.am

raw
1 # vim:set noet ts=4:
2 #
3 # ibus - The Input Bus
4 #
5 # Copyright (c) 2007-2013 Peng Huang <[email protected]>
6 # Copyright (c) 2019-2026 Takao Fujiwara <[email protected]>
7 # Copyright (c) 2007-2019 Red Hat, Inc.
8 #
9 # This library is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU Lesser General Public License as
11 # published by the Free Software Foundation; either version 2.1 of the
12 # License, or (at your option) any later version.
13 #
14 # This library is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Lesser General Public License for more details.
18 #
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with this library; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 # 02110-1301 USA.
23
24 libibus = $(top_builddir)/src/libibus-@[email protected]
25
26 libexec_PROGRAMS = ibus-wayland
27 noinst_DATA =
28 MAINTAINERCLEANFILES =
29 DISTCLEANFILES =
30
31 protocol_sources = \
32 input-method-unstable-v1-client-protocol.h \
33 input-method-unstable-v1-protocol.c \
34 input-method-unstable-v2-client-protocol.h \
35 input-method-unstable-v2-protocol.c \
36 text-input-unstable-v1-client-protocol.h \
37 text-input-unstable-v3-client-protocol.h \
38 virtual-keyboard-unstable-v1-client-protocol.h \
39 virtual-keyboard-unstable-v1-protocol.c \
40 $(NULL)
41
42 ibus_wayland_SOURCES = \
43 $(protocol_sources) \
44 main.c \
45 ibuswaylandim.c \
46 ibuswaylandim.h \
47 $(NULL)
48
49 ibus_wayland_DEPENDENCIES = \
50 $(libibus) \
51 $(NULL)
52
53 ibus_wayland_LDADD = \
54 $(libibus) \
55 $(GIO2_LIBS) \
56 $(WAYLAND_LIBS) \
57 $(NULL)
58
59 ibus_wayland_CFLAGS = \
60 $(GIO2_CFLAGS) \
61 $(WAYLAND_CFLAGS) \
62 -DIBUS_COMPILATION \
63 -I$(top_srcdir)/src \
64 -I$(top_builddir)/src \
65 $(NULL)
66
67 $(libibus):
68 (cd $(top_builddir)/src; make)
69
70 EXTRA_DIST = \
71 $(protocol_sources) \
72 IBusWaylandIM-1.0.metadata \
73 ibus-wayland-im-custom.vala \
74 input-method-unstable-v2.xml \
75 virtual-keyboard-unstable-v1.xml \
76 README \
77 $(NULL)
78
79 if ENABLE_WAYLAND
80 # Do not use wayland_scanner_rules = /usr/share/wayland/wayland-scanner.mk
81 # for multiple protocols.
82 wayland_text_protocoldir = $(WAYLAND_PRTCLS_DIR)/$(WAYLAND_TEXT_PRTCL_SUBDIR)
83
84 input-method-unstable-v1-client-protocol.h: $(wayland_protocoldir)/input-method-unstable-v1.xml
85 $(AM_V_GEN)$(wayland_scanner) client-header $< $@
86
87 input-method-unstable-v1-protocol.c: $(wayland_protocoldir)/input-method-unstable-v1.xml
88 $(AM_V_GEN)$(wayland_scanner) code $< $@
89
90 input-method-unstable-v2-client-protocol.h: $(srcdir)/input-method-unstable-v2.xml
91 $(AM_V_GEN)$(wayland_scanner) client-header $< $@
92
93 input-method-unstable-v2-protocol.c: $(srcdir)/input-method-unstable-v2.xml
94 $(AM_V_GEN)$(wayland_scanner) code $< $@
95
96 text-input-unstable-v1-client-protocol.h: $(wayland_text_protocoldir)/text-input-unstable-v1.xml
97 $(AM_V_GEN)$(wayland_scanner) client-header $< $@
98
99 text-input-unstable-v3-client-protocol.h: $(wayland_text_protocoldir)/text-input-unstable-v3.xml
100 $(AM_V_GEN)$(wayland_scanner) client-header $< $@
101
102 virtual-keyboard-unstable-v1-client-protocol.h: $(srcdir)/virtual-keyboard-unstable-v1.xml
103 $(AM_V_GEN)$(wayland_scanner) client-header $< $@
104
105 virtual-keyboard-unstable-v1-protocol.c: $(srcdir)/virtual-keyboard-unstable-v1.xml
106 $(AM_V_GEN)$(wayland_scanner) code $< $@
107 endif
108
109
110 # `make distdir` can go to ibus/client/wayland
111 if ENABLE_WAYLAND
112 if HAVE_INTROSPECTION
113 -include $(INTROSPECTION_MAKEFILE)
114
115 libibuswaylandim = libibuswaylandim.la
116 noinst_LTLIBRARIES = $(libibuswaylandim)
117
118 libibuswaylandim_la_CPPFLAGS = \
119 $(GIO2_CFLAGS) \
120 $(WAYLAND_CFLAGS) \
121 -DIBUS_COMPILATION \
122 -I$(top_srcdir)/src \
123 -I$(top_builddir)/src \
124 $(NULL)
125 libibuswaylandim_la_LIBADD = \
126 $(GIO2_LIBS) \
127 $(WAYLAND_LIBS) \
128 $(libibus) \
129 $(NULL)
130 libibuswaylandim_la_LDFLAGS = \
131 -no-undefined \
132 -export-symbols-regex "ibus_wayland_im_.*" \
133 $(NULL)
134 libibuswaylandim_la_SOURCES = \
135 $(protocol_sources) \
136 ibuswaylandim.c \
137 ibuswaylandim.h \
138 $(NULL)
139
140 INTROSPECTION_GIRS = IBusWaylandIM-1.0.gir
141 INTROSPECTION_SCANNER_ARGS = \
142 --add-include-path=$(top_srcdir)/src \
143 --add-include-path=$(top_builddir)/src \
144 $(NULL)
145 INTROSPECTION_COMPILER_ARGS = \
146 --includedir=$(srcdir) \
147 --includedir=. \
148 $(NULL)
149 noinst_DATA += $(INTROSPECTION_GIRS)
150 EXTRA_DIST += $(INTROSPECTION_GIRS)
151 MAINTAINERCLEANFILES += $(INTROSPECTION_GIRS)
152 DISTCLEANFILES += $(INTROSPECTION_GIRS)
153 $(INTROSPECTION_GIRS): $(libibus) $(libibuswaylandim) Makefile
154 IBusWaylandIM_1_0_gir_SCANNERFLAGS = \
155 --pkg-export=ibus-1.0 \
156 --pkg=gobject-2.0 \
157 $(IBUS_GIR_SCANNERFLAGS) \
158 $(NULL)
159 IBusWaylandIM_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0
160 IBusWaylandIM_1_0_gir_LIBS = $(libibus) $(libibuswaylandim)
161 IBusWaylandIM_1_0_gir_FILES = \
162 ibuswaylandim.h \
163 $(NULL)
164 IBusWaylandIM_1_0_gir_CFLAGS = \
165 -DIBUS_COMPILATION \
166 -I$(srcdir) \
167 -I$(builddir) \
168 -I$(top_srcdir)/src \
169 -I$(top_builddir)/src \
170 $(NULL)
171
172 -include $(VAPIGEN_MAKEFILE)
173 VAPIGEN_VAPIS = ibus-wayland-im-1.0.vapi
174 VAPIGEN_VAPIDIRS = \
175 $(top_srcdir)/bindings/vala \
176 $(top_builddir)/bindings/vala \
177 $(NULL)
178 VAPIGEN_GIRDIRS = \
179 $(top_srcdir)/src \
180 $(NULL)
181 noinst_DATA += $(VAPIGEN_VAPIS)
182 EXTRA_DIST += $(VAPIGEN_VAPIS)
183 MAINTAINERCLEANFILES += $(VAPIGEN_VAPIS)
184 DISTCLEANFILES += $(VAPIGEN_VAPIS)
185 $(VAPIGEN_VAPIS): $(INTROSPECTION_GIRS)
186 ibus_wayland_im_1_0_vapi_DEPS = glib-2.0 gobject-2.0 gio-2.0 ibus-1.0
187 ibus_waylayd_im_1_0_vapi_METADATADIRS = $(srcdir) $(top_srcdir)/bindings/vala
188 #ibus_waylayd_im_1_0_vapi_VAPIDIRS = $(top_srcdir)/bindings/vala
189 ibus_wayland_im_1_0_vapi_FILES = \
190 $(INTROSPECTION_GIRS) \
191 $(srcdir)/ibus-wayland-im-custom.vala \
192 $(NULL)
193
194 endif
195 #end of HAVE_INTROSPECTION
196 endif
197 #end of ENABLE_WAYLAND
198
199 -include $(top_srcdir)/git.mk