Makefile.am 7.67 KB
Newer Older
Daiki Ueno's avatar
Daiki Ueno committed
1 2
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
# Copyright (C) 2010-2011 Red Hat, Inc.
Daiki Ueno's avatar
Daiki Ueno committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.

# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA

19 20 21
lib_LTLIBRARIES =				\
	libeek.la				\
	libeek-gtk.la				\
22
	libeek-xkl.la
Daiki Ueno's avatar
Daiki Ueno committed
23

24 25 26 27 28 29 30
libeek_public_headers =				\
	$(srcdir)/eek-layout.h			\
	$(srcdir)/eek-element.h			\
	$(srcdir)/eek-container.h		\
	$(srcdir)/eek-keyboard.h		\
	$(srcdir)/eek-section.h			\
	$(srcdir)/eek-key.h			\
31
	$(srcdir)/eek-symbol.h			\
32
	$(srcdir)/eek-keysym.h			\
Daiki Ueno's avatar
Daiki Ueno committed
33
	$(srcdir)/eek-text.h			\
34
	$(srcdir)/eek-symbol-matrix.h		\
35
	$(srcdir)/eek-types.h			\
36
	$(srcdir)/eek-xml.h			\
37
	$(srcdir)/eek-xml-layout.h		\
38
	$(srcdir)/eek-serializable.h		\
39
	$(srcdir)/eek-theme.h			\
40 41
	$(srcdir)/eek.h

42 43
libeek_private_headers =			\
	$(srcdir)/eek-renderer.h		\
44 45
	$(srcdir)/eek-special-keysym-entries.h	\
	$(srcdir)/eek-unicode-keysym-entries.h	\
46
	$(srcdir)/eek-xkeysym-keysym-entries.h	\
47 48
	$(srcdir)/eek-marshalers.h		\
	$(srcdir)/eek-theme-context.h		\
49
	$(srcdir)/eek-theme-private.h		\
50
	$(srcdir)/eek-theme-node.h
51

52
libeek_sources =				\
Daiki Ueno's avatar
Daiki Ueno committed
53
	$(srcdir)/eek.c				\
54 55 56 57 58 59
	$(srcdir)/eek-layout.c			\
	$(srcdir)/eek-element.c			\
	$(srcdir)/eek-container.c		\
	$(srcdir)/eek-keyboard.c		\
	$(srcdir)/eek-section.c			\
	$(srcdir)/eek-key.c			\
60
	$(srcdir)/eek-symbol-matrix.c		\
61
	$(srcdir)/eek-symbol.c			\
62
	$(srcdir)/eek-keysym.c			\
Daiki Ueno's avatar
Daiki Ueno committed
63
	$(srcdir)/eek-text.c			\
64
	$(srcdir)/eek-types.c			\
65
	$(srcdir)/eek-serializable.c		\
66 67
	$(srcdir)/eek-xml.c			\
	$(srcdir)/eek-xml-layout.c		\
Daiki Ueno's avatar
Daiki Ueno committed
68
	$(srcdir)/eek-renderer.c		\
69 70
	$(srcdir)/eek-keyboard-drawing.c	\
	$(srcdir)/eek-theme.c			\
71
	$(srcdir)/eek-theme-context.c		\
72
	$(srcdir)/eek-theme-node.c
73 74

libeek_keysym_sources =				\
75 76
	$(srcdir)/eek-special-keysym-entries.h	\
	$(srcdir)/eek-unicode-keysym-entries.h	\
77
	$(srcdir)/eek-xkeysym-keysym-entries.h
78 79 80 81 82

libeek_enumtypes_sources =			\
	$(srcdir)/eek-enumtypes.c		\
	$(srcdir)/eek-enumtypes.h

Daiki Ueno's avatar
Daiki Ueno committed
83 84 85
libeek_marshalers_sources =			\
	$(srcdir)/eek-marshalers.c		\
	$(srcdir)/eek-marshalers.h
86 87 88

BUILT_SOURCES =					\
	$(libeek_keysym_sources)		\
Daiki Ueno's avatar
Daiki Ueno committed
89
	$(libeek_enumtypes_sources)		\
Daiki Ueno's avatar
Daiki Ueno committed
90
	$(libeek_marshalers_sources)
91 92 93

libeek_la_SOURCES =				\
	$(libeek_sources)			\
Daiki Ueno's avatar
Daiki Ueno committed
94
	$(srcdir)/eek-enumtypes.c		\
Daiki Ueno's avatar
Daiki Ueno committed
95
	$(srcdir)/eek-marshalers.c
96

97 98 99 100 101 102 103 104 105 106 107 108 109 110
libeek_la_CFLAGS =					\
	-DEEK_COMPILATION=1				\
	-DKEYBOARDSDIR=\"$(pkgdatadir)/keyboards\"	\
	$(GIO2_CFLAGS)					\
	$(PANGOCAIRO_CFLAGS)				\
	$(LIBCROCO_CFLAGS)				\
	$(NULL)

libeek_la_LIBADD =				\
	$(GIO2_LIBS)				\
	$(PANGOCAIRO_LIBS)			\
	$(LIBCROCO_LIBS)			\
	-lm					\
	$(NULL)
Daiki Ueno's avatar
Daiki Ueno committed
111

112 113
libeek_gtk_public_headers =			\
	$(srcdir)/eek-gtk-keyboard.h		\
Daiki Ueno's avatar
Daiki Ueno committed
114
	$(srcdir)/eek-gtk.h
115 116
libeek_gtk_private_headers =			\
	$(srcdir)/eek-gtk-renderer.h
117
libeek_gtk_sources =				\
118 119
	$(srcdir)/eek-gtk-keyboard.c		\
	$(srcdir)/eek-gtk-renderer.c
120 121

libeek_gtk_la_SOURCES = $(libeek_gtk_sources)
Daiki Ueno's avatar
Daiki Ueno committed
122 123
libeek_gtk_la_CFLAGS = -DEEK_COMPILATION=1 $(GTK_CFLAGS) $(LIBCANBERRA_CFLAGS)
libeek_gtk_la_LIBADD = libeek.la $(GTK_LIBS) $(LIBCANBERRA_LIBS)
124

125 126
libeek_xkl_public_headers =			\
	$(srcdir)/eek-xkl-layout.h		\
Daiki Ueno's avatar
Daiki Ueno committed
127 128 129
	$(srcdir)/eek-xkl.h			\
	$(srcdir)/eek-xkb-layout.h		\
	$(srcdir)/eek-xkb.h
130 131

libeek_xkl_sources =				\
Daiki Ueno's avatar
Daiki Ueno committed
132
	$(srcdir)/eek-xkb-layout.c		\
Daiki Ueno's avatar
Daiki Ueno committed
133
	$(srcdir)/eek-xkl-layout.c
Daiki Ueno's avatar
Daiki Ueno committed
134

135
libeek_xkl_la_SOURCES = $(libeek_xkl_sources)
136 137
libeek_xkl_la_CFLAGS = -DEEK_COMPILATION=1 $(LIBXKLAVIER_CFLAGS)
libeek_xkl_la_LIBADD = libeek.la $(LIBXKLAVIER_LIBS)
Daiki Ueno's avatar
Daiki Ueno committed
138

Daiki Ueno's avatar
Daiki Ueno committed
139
eekdir = $(includedir)/eek-$(EEK_API_VERSION)/eek
140 141
eek_HEADERS =					\
	$(libeek_public_headers)		\
Daiki Ueno's avatar
Daiki Ueno committed
142
	$(srcdir)/eek-enumtypes.h		\
143 144 145 146 147 148 149
	$(libeek_gtk_public_headers)		\
	$(libeek_xkl_public_headers)

noinst_HEADERS =				\
	$(libeek_private_headers)		\
	$(libeek_gtk_private_headers)		\
	$(libeek_xkl_private_headers)
Daiki Ueno's avatar
Daiki Ueno committed
150

151
eek-special-keysym-entries.h: special-keysym-entries.txt
152 153
	$(AM_V_GEN) $(PYTHON) ./gen-keysym-entries.py special_keysym_entries \
		< $< > $@
154
eek-unicode-keysym-entries.h: unicode-keysym-entries.txt
155 156
	$(AM_V_GEN) $(PYTHON) ./gen-keysym-entries.py unicode_keysym_entries \
		< $< > $@
157
eek-xkeysym-keysym-entries.h: xkeysym-keysym-entries.txt
158 159
	$(AM_V_GEN) $(PYTHON) ./gen-keysym-entries.py xkeysym_keysym_entries \
		< $< > $@
Daiki Ueno's avatar
Daiki Ueno committed
160

Daiki Ueno's avatar
Daiki Ueno committed
161 162 163 164 165 166 167 168 169 170
eek-enumtypes.h: $(libeek_public_headers) eek-enumtypes.h.template
	$(AM_V_GEN) $(GLIB_MKENUMS) --template eek-enumtypes.h.template \
		$(libeek_public_headers) > eek-enumtypes.h.tmp && \
		mv eek-enumtypes.h.tmp eek-enumtypes.h

eek-enumtypes.c: $(libeek_public_headers) eek-enumtypes.c.template
	$(AM_V_GEN) $(GLIB_MKENUMS) --template eek-enumtypes.c.template \
		$(libeek_public_headers) > eek-enumtypes.c.tmp && \
		mv eek-enumtypes.c.tmp eek-enumtypes.c

171
# gen marshal
Daiki Ueno's avatar
Daiki Ueno committed
172 173
eek-marshalers.h: eek-marshalers.list
	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_eek_marshal $(srcdir)/eek-marshalers.list --header --internal > $@.tmp && \
174 175
	mv $@.tmp $@

Daiki Ueno's avatar
Daiki Ueno committed
176 177 178
eek-marshalers.c: eek-marshalers.list eek-marshalers.h
	$(AM_V_GEN) (echo "#include \"eek-marshalers.h\""; \
	$(GLIB_GENMARSHAL) --prefix=_eek_marshal $(srcdir)/eek-marshalers.list --body --internal) > $@.tmp && \
179 180
	mv $@.tmp $@

Daiki Ueno's avatar
Daiki Ueno committed
181
pkgconfigdir = $(libdir)/pkgconfig
182 183 184
pkgconfig_DATA =				\
	eek-$(EEK_API_VERSION).pc		\
	eek-gtk-$(EEK_API_VERSION).pc		\
Daiki Ueno's avatar
Daiki Ueno committed
185
	eek-xkl-$(EEK_API_VERSION).pc
Daiki Ueno's avatar
Daiki Ueno committed
186

187
CLEANFILES =
Daiki Ueno's avatar
Daiki Ueno committed
188

189 190 191
DISTCLEANFILES =				\
	$(BUILT_SOURCES)			\
	$(pkgconfig_DATA)
192

193
EXTRA_DIST =					\
194 195 196
	gen-keysym-entries.py			\
	special-keysym-entries.txt		\
	unicode-keysym-entries.txt		\
197
	xkeysym-keysym-entries.txt		\
Daiki Ueno's avatar
Daiki Ueno committed
198 199
	eek-enumtypes.h.template		\
	eek-enumtypes.c.template		\
Daiki Ueno's avatar
Daiki Ueno committed
200
	eek-marshalers.list
201 202 203

-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
204
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(builddir)
205 206 207 208
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)

if HAVE_INTROSPECTION

209
Eek@EEK_LIBRARY_SUFFIX@.gir: libeek.la
Daiki Ueno's avatar
Daiki Ueno committed
210
Eek@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = --strip-prefix=Eek --pkg=glib-2.0 --pkg-export=eek-$(EEK_API_VERSION)
211
Eek@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0
212 213
Eek@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_la_CFLAGS)
Eek@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek.la
Daiki Ueno's avatar
Daiki Ueno committed
214
Eek@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_sources) $(libeek_public_headers) $(srcdir)/eek-enumtypes.h
215

216
EekGtk@EEK_LIBRARY_SUFFIX@.gir: libeek-gtk.la Eek@EEK_LIBRARY_SUFFIX@.gir
Daiki Ueno's avatar
Daiki Ueno committed
217
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_SCANNERFLAGS = --pkg-export=eek-gtk-$(EEK_API_VERSION)
218 219 220
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Gtk-@GTK_API_VERSION@ Eek@EEK_LIBRARY_SUFFIX@
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_gtk_la_CFLAGS)
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-gtk.la
221
EekGtk@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_gtk_sources) $(libeek_gtk_public_headers)
222

Daiki Ueno's avatar
Daiki Ueno committed
223 224
EekXkl@EEK_LIBRARY_SUFFIX@.gir: libeek-xkl.la Eek@EEK_LIBRARY_SUFFIX@.gir
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_INCLUDES = GObject-2.0 Eek@EEK_LIBRARY_SUFFIX@
225 226
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_CFLAGS = $(libeek_xkl_la_CFLAGS)
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_LIBS = libeek-xkl.la
227
EekXkl@EEK_LIBRARY_SUFFIX_U@_gir_FILES = $(libeek_xkl_sources) $(libeek_xkl_public_headers)
228

229 230 231
INTROSPECTION_GIRS +=				\
	Eek@EEK_LIBRARY_SUFFIX@.gir		\
	EekGtk@EEK_LIBRARY_SUFFIX@.gir		\
232
	EekXkl@EEK_LIBRARY_SUFFIX@.gir
233 234 235 236 237 238 239 240

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES += $(gir_DATA) $(typelib_DATA)
Daiki Ueno's avatar
Daiki Ueno committed
241
endif
Daiki Ueno's avatar
Daiki Ueno committed
242 243

-include $(top_srcdir)/git.mk