]> Pileus Git - ~andy/gtk/blob - gdk/Makefile.am
[broadway] Cancel key events after seeing them
[~andy/gtk] / gdk / Makefile.am
1 ## Makefile.am for gtk+/gdk
2 include $(top_srcdir)/Makefile.decl
3 -include $(INTROSPECTION_MAKEFILE)
4 INTROSPECTION_GIRS =
5 INTROSPECTION_SCANNER_ARGS = \
6         --add-include-path=../gdk \
7         --warn-all
8 INTROSPECTION_COMPILER_ARGS = \
9    --includedir=$(srcdir) \
10    --includedir=.
11
12 SUBDIRS = $(GDK_BACKENDS) . tests
13
14 DIST_SUBDIRS = win32 x11 quartz broadway tests
15
16 CLEANFILES =
17
18 EXTRA_DIST +=                   \
19         keynames.txt            \
20         keyname-table.h         \
21         gdkkeynames.c           \
22         gen-keyname-table.pl    \
23         gdkconfig.h.win32       \
24         gdkkeysyms-update.pl    \
25         gdk.def                 \
26         gdkmarshalers.list      \
27         gdkwindowimpl.h         \
28         makeenums.pl            \
29         makefile.msc            \
30         gdk.symbols             \
31         gdkenumtypes.c.template \
32         gdkenumtypes.h.template \
33         abicheck.sh
34
35 INCLUDES =                              \
36         -DG_LOG_DOMAIN=\"Gdk\"          \
37         -DGDK_COMPILATION               \
38         -I$(top_srcdir)                 \
39         -I$(top_builddir)               \
40         -I$(top_builddir)/gdk           \
41         $(GTK_DEBUG_FLAGS)              \
42         $(GDK_DEP_CFLAGS)
43
44 if PLATFORM_WIN32
45 no_undefined = -no-undefined
46 endif
47
48 # libtool stuff: set version and export symbols for resolving
49 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
50 # we use the general approach here
51 LDADD =                                         \
52         $(GTK_LINK_FLAGS)                       \
53         -version-info $(LT_VERSION_INFO)        \
54         -export-dynamic                         \
55         -rpath $(libdir)                        \
56         $(no_undefined)                         \
57         $(LIBTOOL_EXPORT_OPTIONS)
58
59 #
60 # setup source file variables
61 #
62 #
63 # GDK header files for public installation (non-generated)
64 #
65 gdk_public_h_sources =                          \
66         gdk.h                                   \
67         gdkapplaunchcontext.h                   \
68         gdkcairo.h                              \
69         gdkcolor.h                              \
70         gdkcursor.h                             \
71         gdkdevice.h                             \
72         gdkdevicemanager.h                      \
73         gdkdisplay.h                            \
74         gdkdisplaymanager.h                     \
75         gdkdnd.h                                \
76         gdkevents.h                             \
77         gdkkeys.h                               \
78         gdkkeysyms.h                            \
79         gdkkeysyms-compat.h                     \
80         gdkmain.h                               \
81         gdkpango.h                              \
82         gdkpixbuf.h                             \
83         gdkprivate.h                            \
84         gdkproperty.h                           \
85         gdkrectangle.h                          \
86         gdkrgba.h                               \
87         gdkscreen.h                             \
88         gdkselection.h                          \
89         gdktestutils.h                          \
90         gdkthreads.h                            \
91         gdktypes.h                              \
92         gdkvisual.h                             \
93         gdkwindow.h
94
95 gdk_private_headers =                           \
96         gdkapplaunchcontextprivate.h            \
97         gdkcursorprivate.h                      \
98         gdkdevicemanagerprivate.h               \
99         gdkdeviceprivate.h                      \
100         gdkdisplaymanagerprivate.h              \
101         gdkdisplayprivate.h                     \
102         gdkdndprivate.h                         \
103         gdkscreenprivate.h                      \
104         gdkinternals.h                          \
105         gdkintl.h                               \
106         gdkkeysprivate.h                        \
107         gdkvisualprivate.h                      \
108         gdkx.h
109
110 gdk_c_sources =                                 \
111         gdk.c                                   \
112         gdkapplaunchcontext.c                   \
113         gdkcairo.c                              \
114         gdkcolor.c                              \
115         gdkcursor.c                             \
116         gdkdevice.c                             \
117         gdkdevicemanager.c                      \
118         gdkdisplay.c                            \
119         gdkdisplaymanager.c                     \
120         gdkdnd.c                                \
121         gdkevents.c                             \
122         gdkglobals.c                            \
123         gdkkeys.c                               \
124         gdkkeyuni.c                             \
125         gdkoffscreenwindow.c                    \
126         gdkpango.c                              \
127         gdkpixbuf-drawable.c                    \
128         gdkrectangle.c                          \
129         gdkrgba.c                               \
130         gdkscreen.c                             \
131         gdkselection.c                          \
132         gdkvisual.c                             \
133         gdkwindow.c                             \
134         gdkwindowimpl.c
135
136 gdk_built_sources =                             \
137         gdkenumtypes.c                          \
138         gdkmarshalers.h                         \
139         gdkmarshalers.c                         \
140         gdkenumtypes.h
141
142 #
143 # setup GDK sources and their dependencies
144 #
145
146 gdkincludedir = $(includedir)/gtk-3.0/gdk
147 gdkinclude_HEADERS = $(gdk_public_h_sources) gdkenumtypes.h
148 nodist_gdkinclude_HEADERS = gdkconfig.h
149
150 common_sources =                \
151         $(gdk_private_headers)  \
152         $(gdk_c_sources)        \
153         gdkenumtypes.c          \
154         gdkmarshalers.c         \
155         gdkmarshalers.h
156
157 libgdk_3_la_SOURCES = $(common_sources)
158 libgdk_3_la_LIBADD = $(GDK_DEP_LIBS)
159 libgdk_3_la_LDFLAGS = $(LDADD)
160
161 if USE_X11
162 libgdk_3_la_LIBADD += x11/libgdk-x11.la
163 endif # USE_X11
164
165 if USE_QUARTZ
166 libgdk_3_la_LIBADD += quartz/libgdk-quartz.la
167 endif # USE_QUARTZ
168
169 if USE_WIN32
170 libgdk_3_la_SOURCES += gdkkeynames.c
171 libgdk_3_la_LIBADD += win32/libgdk-win32.la
172 libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
173 libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def
174 endif # USE_WIN32
175
176 if USE_BROADWAY
177 libgdk_3_la_LIBADD += broadway/libgdk-broadway.la
178 endif # USE_BROADWAY
179
180 if HAVE_INTROSPECTION
181
182 introspection_files =           \
183         $(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources))      \
184         $(gdk_c_sources)        \
185         gdkenumtypes.c          \
186         gdkenumtypes.h
187
188 Gdk-3.0.gir: libgdk-3.la Makefile
189 Gdk_3_0_gir_SCANNERFLAGS =      \
190         --c-include="gdk/gdk.h"
191 Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0
192 Gdk_3_0_gir_LIBS = libgdk-3.la
193 Gdk_3_0_gir_FILES = $(introspection_files)
194 Gdk_3_0_gir_CFLAGS = $(INCLUDES)
195 Gdk_3_0_gir_EXPORT_PACKAGES = gdk-3.0
196 INTROSPECTION_GIRS += Gdk-3.0.gir
197
198 if USE_X11
199 x11_introspection_files =               \
200         x11/checksettings.c             \
201         x11/gdkapplaunchcontext-x11.c   \
202         x11/gdkasync.c                  \
203         x11/gdkcursor-x11.c             \
204         x11/gdkdevice-core-x11.c        \
205         x11/gdkdevicemanager-core-x11.c \
206         x11/gdkdevicemanager-x11.c      \
207         x11/gdkdevicemanager-xi.c       \
208         x11/gdkdevicemanager-xi2.c      \
209         x11/gdkdevice-xi2.c             \
210         x11/gdkdevice-xi.c              \
211         x11/gdkdisplay-x11.c            \
212         x11/gdkdnd-x11.c                \
213         x11/gdkeventsource.c            \
214         x11/gdkeventtranslator.c        \
215         x11/gdkgeometry-x11.c           \
216         x11/gdkkeys-x11.c               \
217         x11/gdkmain-x11.c               \
218         x11/gdkproperty-x11.c           \
219         x11/gdkscreen-x11.c             \
220         x11/gdkselection-x11.c          \
221         x11/gdksettings.c               \
222         x11/gdktestutils-x11.c          \
223         x11/gdkvisual-x11.c             \
224         x11/gdkwindow-x11.c             \
225         x11/gdkxftdefaults.c            \
226         x11/gdkxid.c                    \
227         x11/xsettings-client.c          \
228         x11/xsettings-common.c          \
229         x11/gdkx.h                      \
230         x11/gdkx11cursor.h              \
231         x11/gdkx11display.h             \
232         x11/gdkx11property.h            \
233         x11/gdkx11screen.h              \
234         x11/gdkx11selection.h           \
235         x11/gdkx11utils.h               \
236         x11/gdkx11visual.h              \
237         x11/gdkx11window.h
238
239 GdkX11-3.0.gir: libgdk-3.la Gdk-3.0.gir Makefile
240 GdkX11_3_0_gir_SCANNERFLAGS =           \
241         --identifier-prefix=Gdk         \
242         --c-include="gdk/gdkx.h"        \
243         --include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir
244 GdkX11_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0
245 GdkX11_3_0_gir_LIBS = libgdk-3.la
246 GdkX11_3_0_gir_FILES = $(x11_introspection_files)
247 GdkX11_3_0_gir_CFLAGS = $(INCLUDES) -L$(top_builddir)/gdk
248 GdkX11_3_0_gir_EXPORT_PACKAGES = gdk-x11-3.0
249 INTROSPECTION_GIRS += GdkX11-3.0.gir
250
251 endif # USE_X11
252
253 girdir = $(datadir)/gir-1.0
254 gir_DATA = $(INTROSPECTION_GIRS)
255
256 typelibsdir = $(libdir)/girepository-1.0
257 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
258
259 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
260
261 endif # HAVE_INTROSPECTION
262
263 if OS_WIN32
264 install-def-file: gdk.def
265         mkdir -p $(DESTDIR)$(libdir)
266         $(INSTALL) $(srcdir)/gdk.def $(DESTDIR)$(libdir)/gdk-win32-3.0.def
267 uninstall-def-file:
268         -rm $(DESTDIR)$(libdir)/gdk-win32-3.0.def
269 else
270 install-def-file:
271 uninstall-def-file:
272 endif
273
274 if MS_LIB_AVAILABLE
275 noinst_DATA = gdk-win32-$(GTK_API_VERSION).lib
276
277 gdk-win32-$(GTK_API_VERSION).lib: libgdk-win32-$(GTK_API_VERSION).la gdk.def
278         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgdk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk.def -out:$@
279
280 install-ms-lib:
281         mkdir -p $(DESTDIR)$(libdir)
282         $(INSTALL) gdk-win32-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
283
284 uninstall-ms-lib:
285         -rm $(DESTDIR)$(libdir)/gdk-win32-$(GTK_API_VERSION).lib
286 else
287 install-ms-lib:
288 uninstall-ms-lib:
289 endif
290
291 # This places the generated .def file in srcdir, since it is expected to be there.
292 # (The one from a tarball is)
293 gdk.def: gdk.symbols
294         $(AM_V_GEN) (echo -e EXPORTS; $(CPP) -P -DGDK_WINDOWING_WIN32 - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/       /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gdk.def
295
296 TESTS_ENVIRONMENT = srcdir="$(srcdir)"
297 if OS_LINUX
298 TESTS = abicheck.sh
299 endif
300
301 lib_LTLIBRARIES = libgdk-3.la
302
303 MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
304 EXTRA_DIST += $(gdk_built_sources)
305
306 install-exec-hook:
307 if DISABLE_EXPLICIT_DEPS
308         $(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/libgdk-3.la
309 endif
310
311 BUILT_SOURCES = \
312         $(gdk_built_sources)                    \
313         gdkconfig.h
314
315 gdkenumtypes.h: stamp-gdkenumtypes.h
316         @true
317 stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.h.template
318         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \
319                 $(gdk_public_h_sources) ) >> xgen-geth \
320         && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \
321         && rm -f xgen-geth \
322         && echo timestamp > $(@F)
323 gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.c.template
324         $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \
325                 $(gdk_public_h_sources) ) > xgen-getc \
326         && cp xgen-getc gdkenumtypes.c  \
327         && rm -f xgen-getc
328
329 #
330 # Marshaller generation
331 #
332 gdkmarshalers.h: @REBUILD@ gdkmarshalers.list
333         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
334         && mv gdkmarshalers-h.tmp gdkmarshalers.h \
335         || ( rm -f gdkmarshalers-h.tmp && exit 1)
336 gdkmarshalers.c: @REBUILD@ gdkmarshalers.list
337         $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body > gdkmarshalers-c.tmp  \
338         && mv gdkmarshalers-c.tmp gdkmarshalers.c \
339         || ( rm -f gdkmarshalers-c.tmp && exit 1 )
340
341 gdkconfig.h: stamp-gc-h
342         $(AM_V_GEN) if test -f gdkconfig.h; then :; \
343         else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
344 stamp-gc-h: $(top_builddir)/config.status
345         $(AM_V_at) cd $(top_builddir) && $(SHELL) ./config.status gdk/gdkconfig.h
346         echo timestamp > stamp-gc-h
347
348 dist-hook: ../build/win32/vs9/gdk.vcproj
349
350 ../build/win32/vs9/gdk.vcproj: ../build/win32/vs9/gdk.vcprojin
351         for F in $(libgdk_3_la_SOURCES); do \
352                 case $$F in \
353                 *.c) echo '   <File RelativePath="..\..\..\gdk\'$$F'" />' \
354                      ;; \
355                 esac; \
356         done >libgdk.sourcefiles
357         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gdk.vcprojin >$@
358         rm libgdk.sourcefiles
359
360 DISTCLEANFILES = gdkconfig.h stamp-gc-h
361
362 install-data-local: install-ms-lib install-def-file
363
364 uninstall-local: uninstall-ms-lib uninstall-def-file
365         rm -f $(DESTDIR)$(configexecincludedir)/gdkconfig.h
366
367 # if srcdir!=builddir, clean out maintainer-clean files from builddir
368 # this allows dist to pass.
369 distclean-local:
370         if test $(srcdir) != .; then \
371           rm -f $(MAINTAINERCLEANFILES); \
372         fi
373
374 .PHONY: files
375
376 files:
377         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
378           echo $$p; \
379         done
380
381 -include $(top_srcdir)/git.mk