1 # Makefile.am for gtk+/gtk
5 INCLUDES = @STRIP_BEGIN@ \
6 -DG_LOG_DOMAIN=\"Gtk\" \
7 -DGTK_DISABLE_COMPAT_H \
8 -DGTK_LIBDIR=\"$(libdir)\" \
9 -DGTK_DATA_PREFIX=\"$(prefix)\" \
10 -DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
11 -DGTK_LOCALEDIR=\"$(gtklocaledir)\" \
12 -DGTK_VERSION=\"@GTK_VERSION@\" \
13 -DTESTGTK_RCFILE=\"`pwd`/$(srcdir)/testgtkrc\" \
14 -DG_DISABLE_CONST_RETURNS \
15 -I$(top_builddir)/gtk \
16 -I$(top_srcdir) -I../gdk \
18 -I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf \
28 # libtool stuff: set version and export symbols for resolving
29 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
30 # we use the general approach here
31 libgtkincludedir = $(includedir)/gtk-2.0/gtk
32 LDFLAGS = @STRIP_BEGIN@ \
33 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
36 @LIBTOOL_EXPORT_OPTIONS@ \
45 # setup source file variables
48 # GTK+ header files for public installation (non-generated, or generated
50 gtk_public_h_sources = @STRIP_BEGIN@ \
67 gtkseparatormenuitem.h \
77 gtkcellrenderertext.h \
78 gtkcellrenderertextpixbuf.h \
79 gtkcellrenderertoggle.h \
80 gtkcellrendererpixbuf.h \
109 gtkimmulticontext.h \
145 gtkscrolledwindow.h \
156 gtktearoffmenuitem.h \
180 gtktreeviewcolumn.h \
193 # GTK+ header files that don't get installed
194 gtk_private_h_sources = @STRIP_BEGIN@ \
197 gtktextchildprivate.h \
200 gtktextiterprivate.h \
201 gtktextmarkprivate.h \
202 gtktexttagprivate.h \
206 gtkwindow-decorate.h \
208 # GTK+ C sources to build the library from
209 gtk_c_sources = @STRIP_BEGIN@ \
224 gtkcellrenderertext.c \
225 gtkcellrenderertextpixbuf.c \
226 gtkcellrenderertoggle.c \
227 gtkcellrendererpixbuf.c \
230 gtkseparatormenuitem.c \
234 gtkcolorseldialog.c \
264 gtkimcontextsimple.c \
265 gtkimcontextsimple.h \
267 gtkimmulticontext.c \
303 gtkscrolledwindow.c \
313 gtktearoffmenuitem.c \
320 gtktextiterprivate.h \
323 gtktextmarkprivate.h \
344 gtktreeviewcolumn.c \
356 gtkwindow-decorate.c \
363 gtk_plug_c_sources = @STRIP_BEGIN@ \
369 # we use our own built_sources variable rules to avoid automake's
370 # BUILT_SOURCES oddities
371 # we generate frequently rebuild files piggyback on a stamp file, so sources
372 # depending on them only get rebuild when the built source actually changed
375 # built sources that get installed with the header files
376 gtk_built_public_sources = @STRIP_BEGIN@ \
380 # built sources that don't get installed
381 gtk_built_sources = @STRIP_BEGIN@ \
383 stamp-gtktypebuiltins.h \
385 gtktypebuiltins_vars.c \
386 gtktypebuiltins_ids.c \
387 gtktypebuiltins_evals.c \
390 ${gtk_built_public_sources} \
392 # non-header sources (headers should be specified in the above variables)
393 # that don't serve as direct make target sources, i.e. they don't have
394 # their own .lo rules and don't get publically installed
395 gtk_extra_sources = @STRIP_BEGIN@ \
406 # setup GTK+ sources and their dependancies
408 gtk_target_headers = $(gtk_public_h_sources) $(gtk_built_public_sources) gtkcompat.h
409 gtk_target_sources = $(gtk_c_sources) $(gtk_plug_c_sources)
410 MAINTAINERCLEANFILES += $(gtk_built_sources)
412 EXTRA_DIST += $(gtk_private_h_sources) $(gtk_extra_sources)
413 EXTRA_DIST += $(gtk_built_sources)
416 # rules to generate built sources
418 # setup autogeneration dependancies
419 gen_sources = xgen-gdef xgen-gtbh xgen-gtbvc xgen-gtbic xgen-gtbec xgen-gmh xgen-gmc
420 CLEANFILES += $(gen_sources)
421 Makefile: oldest-source-stamp # oh boy, does automake SUCK!
422 oldest-source-stamp: $(gtk_built_sources)
423 $(OBJECTS): oldest-source-stamp ${gtk_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
424 # initial creation of the real stamp-* files
425 gtk.defs gtkmarshal.h gtktypebuiltins.h: # never add deps here
426 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
427 # normal autogeneration rules
428 # all autogenerated files need to be generated in the srcdir,
429 # so old versions get remade and are not confused with newer
430 # versions in the build dir. thus a development setup requires
431 # srcdir to be writable, passing --disable-rebuilds to
432 # ../configure will supress all autogeneration rules.
433 $(srcdir)/stamp-gtk.defs: @REBUILD@ gtk.defs gtk-boxed.defs $(gtk_public_h_sources)
435 && glib-mkenums --comments ";; @comment@" \
436 --fprod "; enumerations from \"@filename@\"\n " \
437 --vhead "(define-@type@ @EnumName@" \
438 --vprod " (@valuenick@ @VALUENAME@)" \
440 $(gtk_public_h_sources) > xgen-gdef \
441 && cat gtk-boxed.defs >> xgen-gdef \
442 && (cmp -s xgen-gdef gtk.defs || cp xgen-gdef gtk.defs) \
444 && echo timestamp > $(@F)
445 $(srcdir)/stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list gtkmarshal.h
447 && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >> xgen-gmh \
448 && (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \
449 && rm -f xgen-gmh xgen-gmh~ \
450 && echo timestamp > $(@F)
451 $(srcdir)/gtkmarshal.c: @REBUILD@ $(srcdir)/stamp-gtkmarshal.h
453 && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --body >> xgen-gmc \
454 && cp xgen-gmc gtkmarshal.c \
455 && rm -f xgen-gmc xgen-gmc~
456 $(srcdir)/stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk stamp-gtk.defs gtktypebuiltins.h
458 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs macros > xgen-gtbh \
459 && (cmp -s xgen-gtbh gtktypebuiltins.h || cp xgen-gtbh gtktypebuiltins.h) \
461 && echo timestamp > $(@F)
462 $(srcdir)/gtktypebuiltins_vars.c: @REBUILD@ maketypes.awk stamp-gtk.defs
464 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs variables > xgen-gtbvc \
465 && cp xgen-gtbvc $(@F) \
467 $(srcdir)/gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs
469 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs entries > xgen-gtbic \
470 && cp xgen-gtbic $(@F) \
472 $(srcdir)/gtktypebuiltins_evals.c: @REBUILD@ $(gtk_public_h_sources)
475 --fprod "\n/* enumerations from \"@filename@\" */" \
476 --vhead "static const GtkEnumValue _@enum_name@_values[] = {" \
477 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
478 --vtail " { 0, NULL, NULL }\n};" \
479 $(gtk_public_h_sources) > xgen-gtbec \
480 && cp xgen-gtbec $(@F) \
485 lib_ltlibraries = @gtktargetlib@
486 # now define the real one to workaround automake's mishandling
487 lib_LTLIBRARIES = $(lib_ltlibraries)
489 libgtk_x11_includedir = $(includedir)/gtk-2.0/gtk
490 libgtk_x11_include_HEADERS = $(gtk_target_headers)
491 libgtk_x11_1_3_la_SOURCES = $(gtk_target_sources)
494 libgtk_nanox_includedir = $(includedir)/gtk-2.0/gtk
495 libgtk_nanox_include_HEADERS = $(gtk_target_headers)
496 libgtk_nanox_1_3_la_SOURCES = $(gtk_target_sources)
499 libgtk_linux_fb_includedir = $(includedir)/gtk-2.0/gtk
500 libgtk_linux_fb_include_HEADERS = $(gtk_target_headers)
501 libgtk_linux_fb_1_3_la_SOURCES = $(gtk_target_sources)
503 EXTRA_LTLIBRARIES = libgtk-x11-1.3.la libgtk-nanox-1.3.la libgtk-linux-fb-1.3.la
506 # We create a dummy theme for the default GTK+ theme
508 $(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0
509 echo "# Empty gtkrc for default theme" > $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
510 rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
512 DEPS = @gtktargetlib@ $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la $(top_builddir)/gdk/@gdktargetlib@
513 TEST_DEPS = $(DEPS) gtk.immodules
515 LDADDS = @STRIP_BEGIN@ \
517 $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la \
518 $(top_builddir)/gdk/@gdktargetlib@ \
531 bin_PROGRAMS = gtk-query-immodules-2.0
533 gtk_query_immodules_2_0_DEPENDENCIES = $(DEPS)
534 gtk_query_immodules_2_0_LDADD = $(LDADDS)
536 gtk_query_immodules_2_0_SOURCES = queryimmodules.c
538 .PHONY: files test test-debug
541 @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
545 EXTRA_DIST += @STRIP_BEGIN@ \
546 oldest-source-stamp \