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 \
29 # libtool stuff: set version and export symbols for resolving
30 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
31 # we use the general approach here
32 libgtkincludedir = $(includedir)/gtk-2.0/gtk
33 LDFLAGS = @STRIP_BEGIN@ \
34 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
37 @LIBTOOL_EXPORT_OPTIONS@ \
46 # setup source file variables
49 # GTK+ header files for public installation (non-generated, or generated
51 gtk_public_h_sources = @STRIP_BEGIN@ \
68 gtkseparatormenuitem.h \
78 gtkcellrenderertext.h \
79 gtkcellrenderertextpixbuf.h \
80 gtkcellrenderertoggle.h \
81 gtkcellrendererpixbuf.h \
110 gtkimmulticontext.h \
146 gtkscrolledwindow.h \
157 gtktearoffmenuitem.h \
181 gtktreeviewcolumn.h \
194 # GTK+ header files that don't get installed
195 gtk_private_h_sources = @STRIP_BEGIN@ \
198 gtktextchildprivate.h \
201 gtktextiterprivate.h \
202 gtktextmarkprivate.h \
203 gtktexttagprivate.h \
207 gtkwindow-decorate.h \
209 # GTK+ C sources to build the library from
210 gtk_c_sources = @STRIP_BEGIN@ \
225 gtkcellrenderertext.c \
226 gtkcellrenderertextpixbuf.c \
227 gtkcellrenderertoggle.c \
228 gtkcellrendererpixbuf.c \
231 gtkseparatormenuitem.c \
235 gtkcolorseldialog.c \
265 gtkimcontextsimple.c \
266 gtkimcontextsimple.h \
268 gtkimmulticontext.c \
304 gtkscrolledwindow.c \
314 gtktearoffmenuitem.c \
321 gtktextiterprivate.h \
324 gtktextmarkprivate.h \
345 gtktreeviewcolumn.c \
357 gtkwindow-decorate.c \
364 gtk_plug_c_sources = @STRIP_BEGIN@ \
370 # we use our own built_sources variable rules to avoid automake's
371 # BUILT_SOURCES oddities
372 # we generate frequently rebuild files piggyback on a stamp file, so sources
373 # depending on them only get rebuild when the built source actually changed
376 # built sources that get installed with the header files
377 gtk_built_public_sources = @STRIP_BEGIN@ \
381 # built sources that don't get installed
382 gtk_built_sources = @STRIP_BEGIN@ \
384 stamp-gtktypebuiltins.h \
386 gtktypebuiltins_vars.c \
387 gtktypebuiltins_ids.c \
388 gtktypebuiltins_evals.c \
391 ${gtk_built_public_sources} \
393 # non-header sources (headers should be specified in the above variables)
394 # that don't serve as direct make target sources, i.e. they don't have
395 # their own .lo rules and don't get publically installed
396 gtk_extra_sources = @STRIP_BEGIN@ \
409 # setup GTK+ sources and their dependancies
411 gtk_target_headers = $(gtk_public_h_sources) $(gtk_built_public_sources) gtkcompat.h
412 gtk_target_sources = $(gtk_c_sources) $(gtk_plug_c_sources)
413 MAINTAINERCLEANFILES += $(gtk_built_sources)
415 EXTRA_DIST += $(gtk_private_h_sources) $(gtk_extra_sources)
416 EXTRA_DIST += $(gtk_built_sources)
419 # rules to generate built sources
421 # setup autogeneration dependancies
422 gen_sources = xgen-gdef xgen-gtbh xgen-gtbvc xgen-gtbic xgen-gtbec xgen-gmh xgen-gmc
423 CLEANFILES += $(gen_sources)
424 Makefile: oldest-source-stamp # oh boy, does automake SUCK!
425 oldest-source-stamp: $(gtk_built_sources)
426 $(OBJECTS): oldest-source-stamp ${gtk_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
427 # initial creation of the real stamp-* files
428 gtk.defs gtkmarshal.h gtktypebuiltins.h: # never add deps here
429 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
430 # normal autogeneration rules
431 # all autogenerated files need to be generated in the srcdir,
432 # so old versions get remade and are not confused with newer
433 # versions in the build dir. thus a development setup requires
434 # srcdir to be writable, passing --disable-rebuilds to
435 # ../configure will supress all autogeneration rules.
436 $(srcdir)/stamp-gtk.defs: @REBUILD@ makeenums.pl gtk.defs gtk-boxed.defs $(gtk_public_h_sources)
438 && $(PERL) makeenums.pl defs $(gtk_public_h_sources) > xgen-gdef \
439 && cat gtk-boxed.defs >> xgen-gdef \
440 && (cmp -s xgen-gdef gtk.defs || cp xgen-gdef gtk.defs) \
442 && echo timestamp > $(@F)
443 $(srcdir)/stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list gtkmarshal.h
445 && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >> xgen-gmh \
446 && (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \
447 && rm -f xgen-gmh xgen-gmh~ \
448 && echo timestamp > $(@F)
449 $(srcdir)/gtkmarshal.c: @REBUILD@ $(srcdir)/stamp-gtkmarshal.h
451 && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --body >> xgen-gmc \
452 && cp xgen-gmc gtkmarshal.c \
453 && rm -f xgen-gmc xgen-gmc~
454 $(srcdir)/stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk stamp-gtk.defs gtktypebuiltins.h
456 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs macros > xgen-gtbh \
457 && (cmp -s xgen-gtbh gtktypebuiltins.h || cp xgen-gtbh gtktypebuiltins.h) \
459 && echo timestamp > $(@F)
460 $(srcdir)/gtktypebuiltins_vars.c: @REBUILD@ maketypes.awk stamp-gtk.defs
462 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs variables > xgen-gtbvc \
463 && cp xgen-gtbvc $(@F) \
465 $(srcdir)/gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs
467 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs entries > xgen-gtbic \
468 && cp xgen-gtbic $(@F) \
470 $(srcdir)/gtktypebuiltins_evals.c: @REBUILD@ makeenums.pl $(gtk_public_h_sources)
472 && $(PERL) makeenums.pl arrays $(gtk_public_h_sources) > xgen-gtbec \
473 && cp xgen-gtbec $(@F) \
478 lib_ltlibraries = @gtktargetlib@
479 # now define the real one to workaround automake's mishandling
480 lib_LTLIBRARIES = $(lib_ltlibraries)
482 libgtk_x11_includedir = $(includedir)/gtk-2.0/gtk
483 libgtk_x11_include_HEADERS = $(gtk_target_headers)
484 libgtk_x11_1_3_la_SOURCES = $(gtk_target_sources)
487 libgtk_nanox_includedir = $(includedir)/gtk-2.0/gtk
488 libgtk_nanox_include_HEADERS = $(gtk_target_headers)
489 libgtk_nanox_1_3_la_SOURCES = $(gtk_target_sources)
492 libgtk_linux_fb_includedir = $(includedir)/gtk-2.0/gtk
493 libgtk_linux_fb_include_HEADERS = $(gtk_target_headers)
494 libgtk_linux_fb_1_3_la_SOURCES = $(gtk_target_sources)
496 EXTRA_LTLIBRARIES = libgtk-x11-1.3.la libgtk-nanox-1.3.la libgtk-linux-fb-1.3.la
499 # We create a dummy theme for the default GTK+ theme
501 $(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0
502 echo "# Empty gtkrc for default theme" > $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
503 rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
505 DEPS = @gtktargetlib@ $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la $(top_builddir)/gdk/@gdktargetlib@
506 TEST_DEPS = $(DEPS) gtk.immodules
508 LDADDS = @STRIP_BEGIN@ \
510 $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la \
511 $(top_builddir)/gdk/@gdktargetlib@ \
524 bin_PROGRAMS = gtk-query-immodules-2.0
526 gtk_query_immodules_2_0_DEPENDENCIES = $(DEPS)
527 gtk_query_immodules_2_0_LDADD = $(LDADDS)
529 gtk_query_immodules_2_0_SOURCES = queryimmodules.c
531 .PHONY: files test test-debug
534 @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
538 EXTRA_DIST += @STRIP_BEGIN@ \
539 oldest-source-stamp \