1 ## Makefile.am for gtk+/gtk
5 INCLUDES = @STRIP_BEGIN@ \
6 -DG_LOG_DOMAIN=\"Gtk\" \
7 -DGTK_DISABLE_COMPAT_H \
8 -DGTK_EXE_PREFIX=\"$(exec_prefix)\" \
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 -I$(top_srcdir) -I../gdk \
16 -I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf \
27 # libtool stuff: set version and export symbols for resolving
28 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
29 # we use the general approach here
30 libgtkincludedir = $(includedir)/gtk-2.0/gtk
31 LDFLAGS = @STRIP_BEGIN@ \
32 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
44 # setup source file variables
47 # GTK+ header files for public installation (non-generated, or generated
49 gtk_public_h_sources = @STRIP_BEGIN@ \
76 gtkcellrenderertext.h \
77 gtkcellrenderertextpixbuf.h \
78 gtkcellrenderertoggle.h \
79 gtkcellrendererpixbuf.h \
107 gtkimmulticontext.h \
131 gdk-pixbuf-loader.h \
145 gtkscrolledwindow.h \
155 gtktearoffmenuitem.h \
177 gtktreeviewcolumn.h \
190 # GTK+ header files that don't get installed
191 gtk_private_h_sources = @STRIP_BEGIN@ \
194 gtktextchildprivate.h \
197 gtktextiterprivate.h \
198 gtktextmarkprivate.h \
199 gtktexttagprivate.h \
202 # GTK+ C sources to build the library from
203 gtk_c_sources = @STRIP_BEGIN@ \
218 gtkcellrenderertext.c \
219 gtkcellrenderertextpixbuf.c \
220 gtkcellrenderertoggle.c \
221 gtkcellrendererpixbuf.c \
227 gtkcolorseldialog.c \
257 gtkimcontextsimple.c \
258 gtkimcontextsimple.h \
259 gtkimmulticontext.c \
297 gtkscrolledwindow.c \
307 gtktearoffmenuitem.c \
314 gtktextiterprivate.h \
317 gtktextmarkprivate.h \
335 gtktreeviewcolumn.c \
349 gdk-pixbuf-loader.c \
351 # Extra headers that are used for enum type array/id generation
352 gdk_headers = @STRIP_BEGIN@ \
357 ../gdk/gdkdrawable.h \
365 ../gdk/gdkproperty.h \
368 ../gdk/gdkselection.h \
374 # we use our own built_sources variable rules to avoid automake's
375 # BUILT_SOURCES oddities
376 # we generate frequently rebuild files piggyback on a stamp file, so sources
377 # depending on them only get rebuild when the built source actually changed
380 # built sources that get installed with the header files
381 gtk_built_public_sources = @STRIP_BEGIN@ \
385 # built sources that don't get installed
386 gtk_built_sources = @STRIP_BEGIN@ \
388 stamp-gtktypebuiltins.h \
390 gtktypebuiltins_vars.c \
391 gtktypebuiltins_ids.c \
392 gtktypebuiltins_evals.c \
395 ${gtk_built_public_sources} \
397 # non-header sources (headers should be specified in the above variables)
398 # that don't serve as direct make target sources, i.e. they don't have
399 # their own .lo rules and don't get publically installed
400 gtk_extra_sources = @STRIP_BEGIN@ \
413 # setup GTK+ sources and their dependancies
415 gtk_target_headers = $(gtk_public_h_sources) $(gtk_built_public_sources)
416 gtk_target_sources = $(gtk_c_sources)
417 MAINTAINERCLEANFILES += $(gtk_built_sources)
419 EXTRA_DIST += $(gtk_private_h_sources) $(gtk_extra_sources)
420 EXTRA_DIST += $(gtk_built_sources)
423 # rules to generate built sources
425 # setup autogeneration dependancies
426 gen_sources = xgen-gdef xgen-gtbh xgen-gtbvc xgen-gtbic xgen-gtbec xgen-gmh xgen-gmc
427 CLEANFILES += $(gen_sources)
428 Makefile: oldest-source-stamp # oh boy, does automake SUCK!
429 oldest-source-stamp: $(gtk_built_sources)
430 $(OBJECTS): oldest-source-stamp ${gtk_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
431 # initial creation of the real stamp-* files
432 gtk.defs gtkmarshal.h gtktypebuiltins.h: # never add deps here
433 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
434 # normal autogeneration rules
435 # all autogenerated files need to be generated in the srcdir,
436 # so old versions get remade and are not confused with newer
437 # versions in the build dir. thus a development setup requires
438 # srcdir to be writable, passing --disable-rebuilds to
439 # ../configure will supress all autogeneration rules.
440 $(srcdir)/stamp-gtk.defs: @REBUILD@ makeenums.pl gtk.defs gtk-boxed.defs $(gtk_public_h_sources) $(gdk_headers)
442 && $(PERL) makeenums.pl defs $(gtk_public_h_sources) $(gdk_headers) > xgen-gdef \
443 && cat gtk-boxed.defs >> xgen-gdef \
444 && (cmp -s xgen-gdef gtk.defs || cp xgen-gdef gtk.defs) \
446 && echo timestamp > $(@F)
447 $(srcdir)/stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list gtkmarshal.h
449 && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >> xgen-gmh \
450 && (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \
451 && rm -f xgen-gmh xgen-gmh~ \
452 && echo timestamp > $(@F)
453 $(srcdir)/gtkmarshal.c: $(srcdir)/stamp-gtkmarshal.h
455 && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --body >> xgen-gmc \
456 && cp xgen-gmc gtkmarshal.c \
457 && rm -f xgen-gmc xgen-gmc~
458 $(srcdir)/stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk stamp-gtk.defs gtktypebuiltins.h
460 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs macros > xgen-gtbh \
461 && (cmp -s xgen-gtbh gtktypebuiltins.h || cp xgen-gtbh gtktypebuiltins.h) \
463 && echo timestamp > $(@F)
464 $(srcdir)/gtktypebuiltins_vars.c: @REBUILD@ maketypes.awk stamp-gtk.defs
466 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs variables > xgen-gtbvc \
467 && cp xgen-gtbvc $(@F) \
469 $(srcdir)/gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs
471 && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs entries > xgen-gtbic \
472 && cp xgen-gtbic $(@F) \
474 $(srcdir)/gtktypebuiltins_evals.c: @REBUILD@ makeenums.pl $(gtk_public_h_sources) $(gdk_headers)
476 && $(PERL) makeenums.pl arrays $(gtk_public_h_sources) $(gdk_headers) > xgen-gtbec \
477 && cp xgen-gtbec $(@F) \
482 lib_ltlibraries = @gtktargetlib@
483 # now define the real one to workaround automake's mishandling
484 lib_LTLIBRARIES = $(lib_ltlibraries)
486 libgtk_x11_includedir = $(includedir)/gtk-2.0/gtk
487 libgtk_x11_include_HEADERS = $(gtk_target_headers)
488 libgtk_x11_1_3_la_SOURCES = $(gtk_target_sources)
491 libgtk_nanox_includedir = $(includedir)/gtk-2.0/gtk
492 libgtk_nanox_include_HEADERS = $(gtk_target_headers)
493 libgtk_nanox_1_3_la_SOURCES = $(gtk_target_sources)
496 libgtk_linux_fb_includedir = $(includedir)/gtk-2.0/gtk
497 libgtk_linux_fb_include_HEADERS = $gtk_target_headers)
498 libgtk_linux_fb_1_3_la_SOURCES = $(gtk_target_sources)
500 EXTRA_LTLIBRARIES = libgtk-x11-1.3.la libgtk-nanox-1.3.la libgtk-linux-fb-1.3.la
503 gtkconfdir = $(sysconfdir)/gtk-2.0
504 gtkconf_DATA = gtkrc.el gtkrc.eo gtkrc.he gtkrc.hy gtkrc.ja \
505 gtkrc.ko gtkrc.ru gtkrc.tr gtkrc.th gtkrc.uk gtkrc.iso-8859-2 \
506 gtkrc.iso-8859-5 gtkrc.iso-8859-13 gtkrc.iso-8859-14 \
507 gtkrc.iso-8859-15 gtkrc.zh_CN gtkrc.zh_TW.Big5 \
508 gtkrc.ka_GE.georgianacademy gtkrc.ka_GE.georgianps \
509 gtkrc.vi_VN.tcvn gtkrc.vi_VN.viscii \
512 # We create a dummy theme for the default GTK+ theme
514 $(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0
515 echo "# Empty gtkrc for default theme" > $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
516 $(mkinstalldirs) $(DESTDIR)$(gtkconfdir)
517 cd $(DESTDIR)$(gtkconfdir) \
518 && for i in cs hr hu pl ro sk sl sq sr ; do \
520 ln -s gtkrc.iso-8859-2 gtkrc.$$i ; \
522 && for i in bg_BG.iso88595 mk sp ru_RU.iso88595 ; do \
524 ln -s gtkrc.iso-8859-5 gtkrc.$$i ; \
526 && rm -f gtkrc.lt gtkrc.lv gtkrc.cy gtkrc.ga gtkrc.et gtkrc.ka \
527 gtkrc.vi_VN.viscii111 gtkrc.vi_VN.tcvn5712 gtkrc.vi \
529 && ln -s gtkrc.iso-8859-13 gtkrc.lt \
530 && ln -s gtkrc.iso-8859-13 gtkrc.lv \
531 && ln -s gtkrc.iso-8859-14 gtkrc.cy \
532 && ln -s gtkrc.iso-8859-14 gtkrc.ga \
533 && ln -s gtkrc.iso-8859-15 gtkrc.et \
534 && ln -s gtkrc.ka_GE.georgianacademy gtkrc.ka \
535 && ln -s gtkrc.vi_VN.viscii gtkrc.vi_VN.viscii111 \
536 && ln -s gtkrc.vi_VN.tcvn gtkrc.vi_VN.tcvn5712 \
537 && ln -s gtkrc.vi_VN.tcvn5712 gtkrc.vi \
538 && ln -s gtkrc.cp1251 gtkrc.be \
539 && ln -s gtkrc.cp1251 gtkrc.bg
541 rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
544 # test programs, not to be installed
546 noinst_PROGRAMS = testgtk testcalendar testinput testselection testrgb testdnd testtext simple treestoretest testtextbuffer # testthreads
547 DEPS = @gtktargetlib@ $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la $(top_builddir)/gdk/@gdktargetlib@
548 LDADDS = @STRIP_BEGIN@ \
550 $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la \
551 $(top_builddir)/gdk/@gdktargetlib@ \
560 testgtk_DEPENDENCIES = $(DEPS)
561 testcalendar_DEPENDENCIES = $(DEPS)
562 testinput_DEPENDENCIES = $(DEPS)
563 testselection_DEPENDENCIES = $(DEPS)
564 testrgb_DEPENDENCIES = $(DEPS)
565 testtext_DEPENDENCIES = $(DEPS)
566 treestoretest_DEPENDENCIES = $(DEPS)
567 testdnd_DEPENDENCIES = $(DEPS)
568 simple_DEPENDENCIES = $(DEPS)
569 #testthreads_DEPENDENCIES = $(DEPS)
570 testcalendar_LDADD = $(LDADDS)
571 testgtk_LDADD = $(LDADDS)
572 testinput_LDADD = $(LDADDS)
573 testselection_LDADD = $(LDADDS)
574 testtext_LDADD = $(LDADDS)
575 treestoretest_LDADD = $(LDADDS)
576 testtextbuffer_LDADD = $(LDADDS)
577 testrgb_LDADD = $(LDADDS)
578 testdnd_LDADD = $(LDADDS)
579 simple_LDADD = $(LDADDS)
580 #testthreads_LDADD = $(LDADDS)
582 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gtk/makefile.mingw.in
583 cd $(top_builddir) && CONFIG_FILES=gtk/$@ CONFIG_HEADERS= $(SHELL) ./config.status
585 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gtk/makefile.msc.in
586 cd $(top_builddir) && CONFIG_FILES=gtk/$@ CONFIG_HEADERS= $(SHELL) ./config.status
588 .PHONY: files test test-debug
591 @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
596 builddir=`pwd`; cd $(top_builddir); top_builddir=`pwd`; \
597 cd $$builddir; cd $(srcdir); \
598 $(SHELL) $$top_builddir/libtool --mode=execute $$builddir/testgtk
601 builddir=`pwd`; cd $(top_builddir); top_builddir=`pwd`; \
602 cd $$builddir; cd $(srcdir); \
603 $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtk
605 EXTRA_DIST += @STRIP_BEGIN@ \
606 oldest-source-stamp \