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 \
24 # libtool stuff: set version and export symbols for resolving
25 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
26 # we use the general approach here
27 libgtkincludedir = $(includedir)/gtk-2.0/gtk
28 LDFLAGS = @STRIP_BEGIN@ \
29 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
32 @LIBTOOL_EXPORT_OPTIONS@ \
33 $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la \
34 $(top_builddir)/gdk/@gdktargetlib@ \
39 # setup source file variables
42 # GTK+ header files for public installation (non-generated, or generated
44 gtk_public_h_sources = @STRIP_BEGIN@ \
62 gtkseparatormenuitem.h \
72 gtkcellrenderertext.h \
73 gtkcellrenderertextpixbuf.h \
74 gtkcellrenderertoggle.h \
75 gtkcellrendererpixbuf.h \
104 gtkimmulticontext.h \
140 gtkscrolledwindow.h \
151 gtktearoffmenuitem.h \
175 gtktreeviewcolumn.h \
188 # GTK+ header files that don't get installed
189 gtk_private_h_sources = @STRIP_BEGIN@ \
192 gtktextchildprivate.h \
195 gtktextiterprivate.h \
196 gtktextmarkprivate.h \
197 gtktexttagprivate.h \
201 gtkwindow-decorate.h \
203 # GTK+ C sources to build the library from
204 gtk_c_sources = @STRIP_BEGIN@ \
220 gtkcellrenderertext.c \
221 gtkcellrenderertextpixbuf.c \
222 gtkcellrenderertoggle.c \
223 gtkcellrendererpixbuf.c \
226 gtkseparatormenuitem.c \
230 gtkcolorseldialog.c \
260 gtkimcontextsimple.c \
261 gtkimcontextsimple.h \
263 gtkimmulticontext.c \
299 gtkscrolledwindow.c \
309 gtktearoffmenuitem.c \
316 gtktextiterprivate.h \
319 gtktextmarkprivate.h \
340 gtktreeviewcolumn.c \
352 gtkwindow-decorate.c \
359 gtk_plug_c_sources = @STRIP_BEGIN@ \
365 # we use our own built_sources variable rules to avoid automake's
366 # BUILT_SOURCES oddities
367 # we generate frequently rebuild files piggyback on a stamp file, so sources
368 # depending on them only get rebuild when the built source actually changed
371 # built sources that get installed with the header files
372 gtk_built_public_sources = @STRIP_BEGIN@ \
376 # built sources that don't get installed
377 gtk_built_sources = @STRIP_BEGIN@ \
379 stamp-gtktypebuiltins.h \
381 gtktypebuiltins_vars.c \
382 gtktypebuiltins_ids.c \
383 gtktypebuiltins_evals.c \
386 ${gtk_built_public_sources} \
388 # non-header sources (headers should be specified in the above variables)
389 # that don't serve as direct make target sources, i.e. they don't have
390 # their own .lo rules and don't get publically installed
391 gtk_extra_sources = @STRIP_BEGIN@ \
402 # setup GTK+ sources and their dependancies
404 gtk_target_headers = $(gtk_public_h_sources) $(gtk_built_public_sources) gtkcompat.h
405 gtk_target_sources = $(gtk_c_sources) $(gtk_plug_c_sources)
406 MAINTAINERCLEANFILES += $(gtk_built_sources)
408 EXTRA_DIST += $(gtk_private_h_sources) $(gtk_extra_sources)
409 EXTRA_DIST += $(gtk_built_sources)
412 # rules to generate built sources
414 # setup autogeneration dependancies
415 gen_sources = xgen-gdef xgen-gtbh xgen-gtbvc xgen-gtbic xgen-gtbec xgen-gmh xgen-gmc
416 CLEANFILES += $(gen_sources)
417 Makefile: oldest-source-stamp # oh boy, does automake SUCK!
418 oldest-source-stamp: $(gtk_built_sources)
419 $(OBJECTS): oldest-source-stamp ${gtk_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
420 # initial creation of the real stamp-* files
421 gtk.defs gtkmarshal.h gtktypebuiltins.h: # never add deps here
422 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
423 # normal autogeneration rules
424 # all autogenerated files need to be generated in the srcdir,
425 # so old versions get remade and are not confused with newer
426 # versions in the build dir. thus a development setup requires
427 # srcdir to be writable, passing --disable-rebuilds to
428 # ../configure will supress all autogeneration rules.
429 $(srcdir)/stamp-gtk.defs: @REBUILD@ gtk.defs gtk-boxed.defs $(gtk_public_h_sources)
431 && glib-mkenums --comments ";; @comment@" \
432 --fprod "; enumerations from \"@filename@\"\n " \
433 --vhead "(define-@type@ @EnumName@" \
434 --vprod " (@valuenick@ @VALUENAME@)" \
436 $(gtk_public_h_sources) > xgen-gdef \
437 && cat gtk-boxed.defs >> xgen-gdef \
438 && (cmp -s xgen-gdef gtk.defs || cp xgen-gdef gtk.defs) \
440 && echo timestamp > $(@F)
441 $(srcdir)/stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list gtkmarshal.h
443 && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >> xgen-gmh \
444 && (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \
445 && rm -f xgen-gmh xgen-gmh~ \
446 && echo timestamp > $(@F)
447 $(srcdir)/gtkmarshal.c: @REBUILD@ $(srcdir)/stamp-gtkmarshal.h
449 && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --body >> xgen-gmc \
450 && cp xgen-gmc gtkmarshal.c \
451 && rm -f xgen-gmc xgen-gmc~
452 $(srcdir)/stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk stamp-gtk.defs gtktypebuiltins.h
454 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs macros > xgen-gtbh \
455 && (cmp -s xgen-gtbh gtktypebuiltins.h || cp xgen-gtbh gtktypebuiltins.h) \
457 && echo timestamp > $(@F)
458 $(srcdir)/gtktypebuiltins_vars.c: @REBUILD@ maketypes.awk stamp-gtk.defs
460 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs variables > xgen-gtbvc \
461 && cp xgen-gtbvc $(@F) \
463 $(srcdir)/gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs
465 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs entries > xgen-gtbic \
466 && cp xgen-gtbic $(@F) \
468 $(srcdir)/gtktypebuiltins_evals.c: @REBUILD@ $(gtk_public_h_sources)
471 --fprod "\n/* enumerations from \"@filename@\" */" \
472 --vhead "static const GtkEnumValue _@enum_name@_values[] = {" \
473 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
474 --vtail " { 0, NULL, NULL }\n};" \
475 $(gtk_public_h_sources) > xgen-gtbec \
476 && cp xgen-gtbec $(@F) \
481 lib_ltlibraries = @gtktargetlib@
482 # now define the real one to workaround automake's mishandling
483 lib_LTLIBRARIES = $(lib_ltlibraries)
485 libgtk_x11_includedir = $(includedir)/gtk-2.0/gtk
486 libgtk_x11_include_HEADERS = $(gtk_target_headers)
487 libgtk_x11_1_3_la_SOURCES = $(gtk_target_sources)
490 libgtk_nanox_includedir = $(includedir)/gtk-2.0/gtk
491 libgtk_nanox_include_HEADERS = $(gtk_target_headers)
492 libgtk_nanox_1_3_la_SOURCES = $(gtk_target_sources)
495 libgtk_linux_fb_includedir = $(includedir)/gtk-2.0/gtk
496 libgtk_linux_fb_include_HEADERS = $(gtk_target_headers)
497 libgtk_linux_fb_1_3_la_SOURCES = $(gtk_target_sources)
499 EXTRA_LTLIBRARIES = libgtk-x11-1.3.la libgtk-nanox-1.3.la libgtk-linux-fb-1.3.la
502 # We create a dummy theme for the default GTK+ theme
504 $(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0
505 echo "# Empty gtkrc for default theme" > $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
506 rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
508 DEPS = @gtktargetlib@ $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la $(top_builddir)/gdk/@gdktargetlib@
509 TEST_DEPS = $(DEPS) gtk.immodules
511 LDADDS = @STRIP_BEGIN@ \
513 $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la \
514 $(top_builddir)/gdk/@gdktargetlib@ \
520 bin_PROGRAMS = gtk-query-immodules-2.0
522 gtk_query_immodules_2_0_DEPENDENCIES = $(DEPS)
523 gtk_query_immodules_2_0_LDADD = $(LDADDS)
525 gtk_query_immodules_2_0_SOURCES = queryimmodules.c
527 .PHONY: files test test-debug
530 @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
534 EXTRA_DIST += @STRIP_BEGIN@ \
535 oldest-source-stamp \