1 ## Makefile.am for gtk+/gdk
2 include $(top_srcdir)/Makefile.decl
3 -include $(INTROSPECTION_MAKEFILE)
5 INTROSPECTION_SCANNER_ARGS = \
6 --add-include-path=../gdk \
8 INTROSPECTION_COMPILER_ARGS = \
9 --includedir=$(srcdir) \
12 SUBDIRS = $(GDK_BACKENDS) . tests
14 DIST_SUBDIRS = win32 x11 quartz wayland tests
22 gen-keyname-table.pl \
24 gdkkeysyms-update.pl \
31 gdkenumtypes.c.template \
32 gdkenumtypes.h.template \
36 -DG_LOG_DOMAIN=\"Gdk\" \
40 -I$(top_builddir)/gdk \
45 no_undefined = -no-undefined
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
53 -version-info $(LT_VERSION_INFO) \
57 $(LIBTOOL_EXPORT_OPTIONS)
60 # setup source file variables
63 # GDK header files for public installation (non-generated)
65 gdk_public_h_sources = \
67 gdkapplaunchcontext.h \
95 gdk_built_public_sources = \
99 gdk_private_headers = \
100 gdkapplaunchcontextprivate.h \
102 gdkdevicemanagerprivate.h \
104 gdkdisplaymanagerprivate.h \
105 gdkdisplayprivate.h \
116 gdkapplaunchcontext.c \
123 gdkdisplaymanager.c \
129 gdkoffscreenwindow.c \
131 gdkpixbuf-drawable.c \
140 gdk_built_sources = \
144 $(gdk_built_public_sources)
147 # setup GDK sources and their dependencies
150 gdkincludedir = $(includedir)/gtk-3.0/gdk
151 gdkinclude_HEADERS = $(gdk_public_h_sources) $(gdk_built_public_sources)
154 $(gdk_private_headers) \
160 libgdk_3_0_la_SOURCES = $(common_sources)
161 libgdk_3_0_la_LIBADD = $(GDK_DEP_LIBS)
162 libgdk_3_0_la_LDFLAGS = $(LDADD)
165 libgdk_3_0_la_LIBADD += x11/libgdk-x11.la
169 libgdk_3_0_la_LIBADD += quartz/libgdk-quartz.la
173 libgdk_3_0_la_SOURCES += gdkkeynames.c
174 libgdk_3_0_la_LIBADD += win32/libgdk-win32.la
175 libgdk_3_0_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
176 libgdk_3_0_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def
180 libgdk_3_0_la_LIBADD += wayland/libgdk-wayland.la
183 if HAVE_INTROSPECTION
185 introspection_files = \
186 $(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources)) \
191 Gdk-3.0.gir: libgdk-3.0.la Makefile
192 Gdk_3_0_gir_SCANNERFLAGS = \
193 --c-include="gdk/gdk.h"
194 Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0
195 Gdk_3_0_gir_LIBS = libgdk-3.0.la
196 Gdk_3_0_gir_FILES = $(introspection_files)
197 Gdk_3_0_gir_CFLAGS = $(INCLUDES)
198 Gdk_3_0_gir_EXPORT_PACKAGES = gdk-3.0
199 INTROSPECTION_GIRS += Gdk-3.0.gir
202 x11_introspection_files = \
203 x11/checksettings.c \
204 x11/gdkapplaunchcontext-x11.c \
206 x11/gdkcursor-x11.c \
207 x11/gdkdevice-core-x11.c \
208 x11/gdkdevicemanager-core-x11.c \
209 x11/gdkdevicemanager-x11.c \
210 x11/gdkdevicemanager-xi.c \
211 x11/gdkdevicemanager-xi2.c \
212 x11/gdkdevice-xi2.c \
214 x11/gdkdisplay-x11.c \
216 x11/gdkeventsource.c \
217 x11/gdkeventtranslator.c \
218 x11/gdkgeometry-x11.c \
221 x11/gdkproperty-x11.c \
222 x11/gdkscreen-x11.c \
223 x11/gdkselection-x11.c \
225 x11/gdktestutils-x11.c \
226 x11/gdkvisual-x11.c \
227 x11/gdkwindow-x11.c \
228 x11/gdkxftdefaults.c \
230 x11/xsettings-client.c \
231 x11/xsettings-common.c \
234 x11/gdkx11display.h \
235 x11/gdkx11property.h \
237 x11/gdkx11selection.h \
242 GdkX11-3.0.gir: libgdk-3.0.la Gdk-3.0.gir Makefile
243 GdkX11_3_0_gir_SCANNERFLAGS = \
244 --identifier-prefix=Gdk \
245 --c-include="gdk/gdkx.h" \
246 --include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir
247 GdkX11_3_0_gir_INCLUDES = Gio-2.0 Gdk-3.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0
248 GdkX11_3_0_gir_LIBS = libgdk-3.0.la
249 GdkX11_3_0_gir_FILES = $(x11_introspection_files)
250 GdkX11_3_0_gir_CFLAGS = $(INCLUDES) -L$(top_builddir)/gdk
251 GdkX11_3_0_gir_EXPORT_PACKAGES = gdk-x11-3.0
252 INTROSPECTION_GIRS += GdkX11-3.0.gir
256 girdir = $(datadir)/gir-1.0
257 gir_DATA = $(INTROSPECTION_GIRS)
259 typelibsdir = $(libdir)/girepository-1.0
260 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
262 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
264 endif # HAVE_INTROSPECTION
267 install-def-file: gdk.def
268 mkdir -p $(DESTDIR)$(libdir)
269 $(INSTALL) $(srcdir)/gdk.def $(DESTDIR)$(libdir)/gdk-win32-3.0.def
271 -rm $(DESTDIR)$(libdir)/gdk-win32-3.0.def
278 noinst_DATA = gdk-win32-$(GTK_API_VERSION).lib
280 gdk-win32-$(GTK_API_VERSION).lib: libgdk-win32-$(GTK_API_VERSION).la gdk.def
281 lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgdk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk.def -out:$@
284 mkdir -p $(DESTDIR)$(libdir)
285 $(INSTALL) gdk-win32-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
288 -rm $(DESTDIR)$(libdir)/gdk-win32-$(GTK_API_VERSION).lib
294 # This places the generated .def file in srcdir, since it is expected to be there.
295 # (The one from a tarball is)
297 $(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
299 TESTS_ENVIRONMENT = srcdir="$(srcdir)"
304 lib_LTLIBRARIES = libgdk-3.0.la
306 MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
307 EXTRA_DIST += $(gdk_built_sources)
311 if DISABLE_EXPLICIT_DEPS
312 $(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/libgdk-3.0.la
315 #note: not gdkconfig.h
317 $(gdk_built_sources) \
320 gdkenumtypes.h: stamp-gdkenumtypes.h
322 stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.h.template
323 $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \
324 $(gdk_public_h_sources) ) >> xgen-geth \
325 && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \
327 && echo timestamp > $(@F)
328 gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.c.template
329 $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \
330 $(gdk_public_h_sources) ) > xgen-getc \
331 && cp xgen-getc gdkenumtypes.c \
335 # Marshaller generation
337 gdkmarshalers.h: @REBUILD@ gdkmarshalers.list
338 $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
339 && mv gdkmarshalers-h.tmp gdkmarshalers.h \
340 || ( rm -f gdkmarshalers-h.tmp && exit 1)
341 gdkmarshalers.c: @REBUILD@ gdkmarshalers.list
342 $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body > gdkmarshalers-c.tmp \
343 && mv gdkmarshalers-c.tmp gdkmarshalers.c \
344 || ( rm -f gdkmarshalers-c.tmp && exit 1 )
346 gdkconfig.h: stamp-gc-h
347 $(AM_V_GEN) if test -f gdkconfig.h; then :; \
348 else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
349 stamp-gc-h: $(top_builddir)/config.status
350 $(AM_V_at) cd $(top_builddir) && $(SHELL) ./config.status gdk/gdkconfig.h
351 echo timestamp > stamp-gc-h
353 dist-hook: ../build/win32/vs9/gdk.vcproj
355 ../build/win32/vs9/gdk.vcproj: ../build/win32/vs9/gdk.vcprojin
356 for F in $(libgdk_3_0_la_SOURCES); do \
358 *.c) echo ' <File RelativePath="..\..\..\gdk\'$$F'" />' \
361 done >libgdk.sourcefiles
362 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gdk.vcprojin >$@
363 rm libgdk.sourcefiles
365 DISTCLEANFILES = gdkconfig.h stamp-gc-h
367 install-data-local: install-ms-lib install-def-file
369 uninstall-local: uninstall-ms-lib uninstall-def-file
370 rm -f $(DESTDIR)$(configexecincludedir)/gdkconfig.h
372 # if srcdir!=builddir, clean out maintainer-clean files from builddir
373 # this allows dist to pass.
375 if test $(srcdir) != .; then \
376 rm -f $(MAINTAINERCLEANFILES); \
382 @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
386 -include $(top_srcdir)/git.mk