]> Pileus Git - ~andy/gtk/blob - gtk/Makefile.am
If major.minor of required and available glib versions are the same, add
[~andy/gtk] / gtk / Makefile.am
1 # Makefile.am for gtk+/gtk
2
3 SUBDIRS=theme-bits
4
5 if OS_UNIX
6 SUBDIRS += xdgmime
7 endif
8
9 DIST_SUBDIRS=stock-icons theme-bits xdgmime
10
11 INCLUDES =                                              \
12         -DG_LOG_DOMAIN=\"Gtk\"                          \
13         -DGTK_LIBDIR=\"$(libdir)\"                      \
14         -DGTK_DATADIR=\"$(datadir)\"                    \
15         -DGTK_DATA_PREFIX=\"$(prefix)\"                 \
16         -DGTK_SYSCONFDIR=\"$(sysconfdir)\"              \
17         -DGTK_VERSION=\"$(GTK_VERSION)\"                \
18         -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\"  \
19         -DGTK_HOST=\"$(host)\"                          \
20         -DGTK_COMPILATION                               \
21         -I$(top_builddir)/gtk                           \
22         -I$(top_srcdir) -I../gdk                        \
23         -I$(top_srcdir)/gdk                             \
24         -I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf      \
25         -DGDK_PIXBUF_DISABLE_DEPRECATED                 \
26         -DGDK_DISABLE_DEPRECATED                        \
27         -DGTK_DISABLE_DEPRECATED                        \
28         -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED            \
29         $(GTK_DEBUG_FLAGS)                              \
30         $(GTK_DEP_CFLAGS)
31
32 gtarget=$(gdktarget)
33
34 if PLATFORM_WIN32
35 no_undefined = -no-undefined
36 endif
37
38 if OS_WIN32
39 gtk_def = gtk.def
40 gtk_win32_symbols = -export-symbols $(gtk_def)
41
42 gtk_win32_res = gtk-win32-res.o
43 gtk_win32_res_ldflag = -Wl,$(gtk_win32_res)
44
45 gtk-win32-res.o : gtk-win32.rc
46         $(WINDRES) gtk-win32.rc $@
47
48 install-def-file: gtk.def
49         $(INSTALL) $(gtk_def) $(DESTDIR)$(libdir)/gtk-win32-2.0.def
50 uninstall-def-file:
51         -rm $(DESTDIR)$(libdir)/gtk-win32-2.0.def
52 else
53 install-def-file:
54 uninstall-def-file:
55 endif
56
57 if MS_LIB_AVAILABLE
58 noinst_DATA = gtk-win32-$(GTK_API_VERSION).lib
59
60 gtk-win32-$(GTK_API_VERSION).lib: libgtk-win32-$(GTK_API_VERSION).la gtk.def
61         lib -name:libgtk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gtk.def -out:$@
62
63 install-ms-lib:
64         $(INSTALL) gtk-win32-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
65
66 uninstall-ms-lib:
67         -rm $(DESTDIR)$(libdir)/gtk-win32-$(GTK_API_VERSION).lib
68 else
69 install-ms-lib:
70 uninstall-ms-lib:
71 endif
72
73 gtk.def: gtk.symbols
74         (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gtk.symbols | sed -e '/^$$/d' -e 's/^/    /' -e 's/G_GNUC_[^ ]*//g') > gtk.def
75
76 gtkalias.h: gtk.symbols
77           $(PERL) $(srcdir)/makegtkalias.pl < $(srcdir)/gtk.symbols > gtkalias.h
78 gtkaliasdef.c: gtk.symbols
79           $(PERL) $(srcdir)/makegtkalias.pl -def < $(srcdir)/gtk.symbols > gtkaliasdef.c
80
81 if OS_LINUX
82 TESTS = abicheck.sh
83 endif
84
85 # libtool stuff: set version and export symbols for resolving
86 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
87 # we use the general approach here
88 libgtkincludedir = $(includedir)/gtk-2.0/gtk
89 libadd =                                                                \
90         $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la  \
91         $(top_builddir)/gdk/$(gdktargetlib)                             \
92         $(GTK_DEP_LIBS)
93
94 if OS_UNIX
95 libadd += xdgmime/libxdgmime.la
96 endif
97
98 # common options for the various packages.
99 libtool_opts =                                                  \
100   -version-info $(LT_VERSION_INFO)                              \
101   -export-dynamic $(no_undefined) $(LIBTOOL_EXPORT_OPTIONS)     \
102   -rpath $(libdir) $(libgtk_target_ldflags)
103
104
105 #
106 # setup source file variables
107 #
108
109 # GTK+ header files for public installation (non-generated, or generated
110 # by configure)
111 gtk_public_h_sources =          \
112         gtk.h                   \
113         gtkaboutdialog.h        \
114         gtkaccelgroup.h         \
115         gtkaccellabel.h         \
116         gtkaccelmap.h           \
117         gtkaccessible.h         \
118         gtkaction.h             \
119         gtkactiongroup.h        \
120         gtkadjustment.h         \
121         gtkalignment.h          \
122         gtkarrow.h              \
123         gtkaspectframe.h        \
124         gtkassistant.h          \
125         gtkbbox.h               \
126         gtkbin.h                \
127         gtkbindings.h           \
128         gtkbox.h                \
129         gtkbutton.h             \
130         gtkcalendar.h           \
131         gtkcelleditable.h       \
132         gtkcelllayout.h         \
133         gtkcellrenderer.h       \
134         gtkcellrendereraccel.h  \
135         gtkcellrenderercombo.h  \
136         gtkcellrendererpixbuf.h \
137         gtkcellrendererprogress.h \
138         gtkcellrenderertext.h   \
139         gtkcellrenderertoggle.h \
140         gtkcellview.h           \
141         gtkcheckbutton.h        \
142         gtkcheckmenuitem.h      \
143         gtkclipboard.h          \
144         gtkclist.h              \
145         gtkclipboard.h          \
146         gtkcolorbutton.h        \
147         gtkcolorsel.h           \
148         gtkcolorseldialog.h     \
149         gtkcombo.h              \
150         gtkcombobox.h           \
151         gtkcomboboxentry.h      \
152         gtkcontainer.h          \
153         gtkctree.h              \
154         gtkcurve.h              \
155         gtkdebug.h              \
156         gtkdialog.h             \
157         gtkdnd.h                \
158         gtkdrawingarea.h        \
159         gtkeditable.h           \
160         gtkentry.h              \
161         gtkentrycompletion.h    \
162         gtkenums.h              \
163         gtkeventbox.h           \
164         gtkexpander.h           \
165         gtkfilechooser.h        \
166         gtkfilechooserbutton.h  \
167         gtkfilechooserdialog.h  \
168         gtkfilechooserwidget.h  \
169         gtkfilefilter.h         \
170         gtkfilesel.h            \
171         gtkfixed.h              \
172         gtkfontbutton.h         \
173         gtkfontsel.h            \
174         gtkframe.h              \
175         gtkgamma.h              \
176         gtkgc.h                 \
177         gtkhandlebox.h          \
178         gtkhbbox.h              \
179         gtkhbox.h               \
180         gtkhpaned.h             \
181         gtkhruler.h             \
182         gtkhscale.h             \
183         gtkhscrollbar.h         \
184         gtkhseparator.h         \
185         gtkiconfactory.h        \
186         gtkicontheme.h          \
187         gtkiconview.h           \
188         gtkimage.h              \
189         gtkimagemenuitem.h      \
190         gtkimcontext.h          \
191         gtkimcontextsimple.h    \
192         gtkimmodule.h           \
193         gtkimmulticontext.h     \
194         gtkinputdialog.h        \
195         gtkinvisible.h          \
196         gtkitem.h               \
197         gtkitemfactory.h        \
198         gtklabel.h              \
199         gtklayout.h             \
200         gtklinkbutton.h         \
201         gtklist.h               \
202         gtklistitem.h           \
203         gtkliststore.h          \
204         gtkmain.h               \
205         gtkmenu.h               \
206         gtkmenubar.h            \
207         gtkmenuitem.h           \
208         gtkmenushell.h          \
209         gtkmenutoolbutton.h     \
210         gtkmessagedialog.h      \
211         gtkmisc.h               \
212         gtkmodules.h            \
213         gtknotebook.h           \
214         gtkobject.h             \
215         gtkoldeditable.h        \
216         gtkoptionmenu.h         \
217         gtkpaned.h              \
218         gtkpixmap.h             \
219         gtkplug.h               \
220         gtkpreview.h            \
221         gtkprivate.h            \
222         gtkprogress.h           \
223         gtkprogressbar.h        \
224         gtkradioaction.h        \
225         gtkradiobutton.h        \
226         gtkradiomenuitem.h      \
227         gtkradiotoolbutton.h    \
228         gtkrange.h              \
229         gtkrc.h                 \
230         gtkruler.h              \
231         gtkscale.h              \
232         gtkscrollbar.h          \
233         gtkscrolledwindow.h     \
234         gtkselection.h          \
235         gtkseparator.h          \
236         gtkseparatormenuitem.h  \
237         gtkseparatortoolitem.h  \
238         gtksettings.h           \
239         gtksignal.h             \
240         gtksizegroup.h          \
241         gtksocket.h             \
242         gtkspinbutton.h         \
243         gtkstatusbar.h          \
244         gtkstatusicon.h         \
245         gtkstock.h              \
246         gtkstyle.h              \
247         gtktable.h              \
248         gtktearoffmenuitem.h    \
249         gtktext.h               \
250         gtktextbuffer.h         \
251         gtktextchild.h          \
252         gtktextdisplay.h        \
253         gtktextiter.h           \
254         gtktextmark.h           \
255         gtktexttag.h            \
256         gtktexttagtable.h       \
257         gtktextview.h           \
258         gtktipsquery.h          \
259         gtktoggleaction.h       \
260         gtktogglebutton.h       \
261         gtktoggletoolbutton.h   \
262         gtktoolbar.h            \
263         gtktoolbutton.h         \
264         gtktoolitem.h           \
265         gtktooltips.h           \
266         gtktree.h               \
267         gtktreednd.h            \
268         gtktreeitem.h           \
269         gtktreemodel.h          \
270         gtktreemodelfilter.h    \
271         gtktreemodelsort.h      \
272         gtktreeselection.h      \
273         gtktreesortable.h       \
274         gtktreestore.h          \
275         gtktreeview.h           \
276         gtktreeviewcolumn.h     \
277         gtktypeutils.h          \
278         gtkuimanager.h          \
279         gtkvbbox.h              \
280         gtkvbox.h               \
281         gtkviewport.h           \
282         gtkvpaned.h             \
283         gtkvruler.h             \
284         gtkvscale.h             \
285         gtkvscrollbar.h         \
286         gtkvseparator.h         \
287         gtkwidget.h             \
288         gtkwindow.h
289
290 # Installed header files without compatibility guarantees
291 # that are not include in gtk/gtk.h
292 gtk_semi_private_h_sources =    \
293         gtktextlayout.h         \
294         gtkfilesystem.h
295
296 # GTK+ header files that don't get installed
297 gtk_private_h_sources =         \
298         gtkdndcursors.h         \
299         gtkentryprivate.h       \
300         gtkfilechooserembed.h   \
301         gtkfilechooserentry.h   \
302         gtkfilechooserdefault.h \
303         gtkfilechooserprivate.h \
304         gtkfilechooserutils.h   \
305         gtkfilesystemunix.h     \
306         gtkfilesystemmodel.h    \
307         gtkiconcache.h          \
308         gtkpathbar.h            \
309         gtkplugprivate.h        \
310         gtkrbtree.h             \
311         gtksequence.h           \
312         gtksocketprivate.h      \
313         gtktextbtree.h          \
314         gtktextchildprivate.h   \
315         gtktextsegment.h        \
316         gtktexttypes.h          \
317         gtktextutil.h           \
318         gtktextiterprivate.h    \
319         gtktextmarkprivate.h    \
320         gtktexttagprivate.h     \
321         gtkthemes.h             \
322         gtktreedatalist.h       \
323         gtktreeprivate.h        \
324         gtkwindow-decorate.h    \
325         gtktoggleactionprivate.h
326
327 # GTK+ C sources to build the library from
328 gtk_c_sources =                 \
329         fnmatch.c               \
330         gtkaboutdialog.c        \
331         gtkaccelgroup.c         \
332         gtkaccellabel.c         \
333         gtkaccelmap.c           \
334         gtkaccessible.c         \
335         gtkaction.c             \
336         gtkactiongroup.c        \
337         gtkadjustment.c         \
338         gtkalignment.c          \
339         gtkarrow.c              \
340         gtkaspectframe.c        \
341         gtkassistant.c          \
342         gtkbbox.c               \
343         gtkbin.c                \
344         gtkbindings.c           \
345         gtkbox.c                \
346         gtkbutton.c             \
347         gtkcalendar.c           \
348         gtkcelleditable.c       \
349         gtkcelllayout.c         \
350         gtkcellrenderer.c       \
351         gtkcellrendereraccel.c  \
352         gtkcellrenderercombo.c  \
353         gtkcellrendererpixbuf.c \
354         gtkcellrendererprogress.c \
355         gtkcellrenderertext.c   \
356         gtkcellrenderertoggle.c \
357         gtkcellview.c           \
358         gtkcheckbutton.c        \
359         gtkcheckmenuitem.c      \
360         gtkclipboard.c          \
361         gtkclist.c              \
362         gtkcolorbutton.c        \
363         gtkcolorsel.c           \
364         gtkcolorseldialog.c     \
365         gtkcombo.c              \
366         gtkcombobox.c           \
367         gtkcomboboxentry.c      \
368         gtkcontainer.c          \
369         gtkctree.c              \
370         gtkcurve.c              \
371         gtkdialog.c             \
372         gtkdnd.c                \
373         gtkdrawingarea.c        \
374         gtkeditable.c           \
375         gtkentry.c              \
376         gtkentrycompletion.c    \
377         gtkeventbox.c           \
378         gtkexpander.c           \
379         gtkfilechooser.c        \
380         gtkfilechooserbutton.c  \
381         gtkfilechooserdialog.c  \
382         gtkfilechooserembed.c   \
383         gtkfilechooserentry.c   \
384         gtkfilechooserdefault.c \
385         gtkfilechooserutils.c   \
386         gtkfilechooserwidget.c  \
387         gtkfilefilter.c         \
388         gtkfilesel.c            \
389         gtkfilesystem.c         \
390         gtkfilesystemmodel.c    \
391         gtkfixed.c              \
392         gtkfontbutton.c         \
393         gtkfontsel.c            \
394         gtkframe.c              \
395         gtkgamma.c              \
396         gtkgc.c                 \
397         gtkhandlebox.c          \
398         gtkhbbox.c              \
399         gtkhbox.c               \
400         gtkhpaned.c             \
401         gtkhruler.c             \
402         gtkhscale.c             \
403         gtkhscrollbar.c         \
404         gtkhseparator.c         \
405         gtkhsv.c                \
406         gtkhsv.h                \
407         gtkiconfactory.c        \
408         gtkiconcache.c          \
409         gtkicontheme.c          \
410         gtkiconview.c           \
411         gtkimage.c              \
412         gtkimagemenuitem.c      \
413         gtkimcontext.c          \
414         gtkimcontextsimple.c    \
415         gtkimmodule.c           \
416         gtkimmulticontext.c     \
417         gtkinputdialog.c        \
418         gtkintl.h               \
419         gtkinvisible.c          \
420         gtkitem.c               \
421         gtkitemfactory.c        \
422         gtkkeyhash.c            \
423         gtkkeyhash.h            \
424         gtklabel.c              \
425         gtklayout.c             \
426         gtklinkbutton.c         \
427         gtklist.c               \
428         gtklistitem.c           \
429         gtkliststore.c          \
430         gtkmain.c               \
431         gtkmarshal.c            \
432         gtkmarshalers.c         \
433         gtkmenu.c               \
434         gtkmenubar.c            \
435         gtkmenuitem.c           \
436         gtkmenushell.c          \
437         gtkmenutoolbutton.c     \
438         gtkmessagedialog.c      \
439         gtkmisc.c               \
440         gtkmnemonichash.c       \
441         gtkmnemonichash.h       \
442         gtkmodules.c            \
443         gtknotebook.c           \
444         gtkobject.c             \
445         gtkoldeditable.c        \
446         gtkoptionmenu.c         \
447         gtkpaned.c              \
448         gtkpathbar.c            \
449         gtkpixmap.c             \
450         gtkplug.c               \
451         gtkpreview.c            \
452         gtkprogress.c           \
453         gtkprogressbar.c        \
454         gtkradioaction.c        \
455         gtkradiobutton.c        \
456         gtkradiomenuitem.c      \
457         gtkradiotoolbutton.c    \
458         gtkrange.c              \
459         gtkrbtree.c             \
460         gtkrc.c                 \
461         gtkruler.c              \
462         gtkscale.c              \
463         gtkscrollbar.c          \
464         gtkscrolledwindow.c     \
465         gtksequence.c           \
466         gtkselection.c          \
467         gtkseparator.c          \
468         gtkseparatormenuitem.c  \
469         gtkseparatortoolitem.c  \
470         gtksettings.c           \
471         gtksignal.c             \
472         gtksizegroup.c          \
473         gtksocket.c             \
474         gtkspinbutton.c         \
475         gtkstatusbar.c          \
476         gtkstatusicon.c         \
477         gtkstock.c              \
478         gtkstyle.c              \
479         gtktable.c              \
480         gtktearoffmenuitem.c    \
481         gtktext.c               \
482         gtktextbtree.c          \
483         gtktextbuffer.c         \
484         gtktextchild.c          \
485         gtktextdisplay.c        \
486         gtktextiter.c           \
487         gtktextiterprivate.h    \
488         gtktextlayout.c         \
489         gtktextmark.c           \
490         gtktextmarkprivate.h    \
491         gtktextsegment.c        \
492         gtktexttag.c            \
493         gtktexttagtable.c       \
494         gtktexttypes.c          \
495         gtktextutil.c           \
496         gtktextview.c           \
497         gtkthemes.c             \
498         gtktipsquery.c          \
499         gtktoggleaction.c       \
500         gtktogglebutton.c       \
501         gtktoggletoolbutton.c   \
502         gtktoolbar.c            \
503         gtktoolbutton.c         \
504         gtktoolitem.c           \
505         gtktooltips.c           \
506         gtktree.c               \
507         gtktreedatalist.c       \
508         gtktreednd.c            \
509         gtktreeitem.c           \
510         gtktreemodel.c          \
511         gtktreemodelfilter.c    \
512         gtktreemodelsort.c      \
513         gtktreeselection.c      \
514         gtktreesortable.c       \
515         gtktreestore.c          \
516         gtktreeview.c           \
517         gtktreeviewcolumn.c     \
518         gtktypebuiltins.c       \
519         gtktypeutils.c          \
520         gtkuimanager.c          \
521         gtkvbbox.c              \
522         gtkvbox.c               \
523         gtkviewport.c           \
524         gtkvpaned.c             \
525         gtkvruler.c             \
526         gtkvscale.c             \
527         gtkvscrollbar.c         \
528         gtkvseparator.c         \
529         gtkwidget.c             \
530         gtkwindow-decorate.c    \
531         gtkwindow.c             \
532         xembed.h
533
534 if OS_UNIX
535 gtk_private_h_sources += gtkfilesystemunix.h
536 gtk_c_sources +=         gtkfilesystemunix.c
537 endif
538
539 if OS_WIN32
540 gtk_private_h_sources += gtkfilesystemwin32.h
541 gtk_c_sources +=         gtkfilesystemwin32.c
542 endif
543
544 if USE_X11
545 gtk_private_h_sources += gtkxembed.h gtktrayicon.h
546 gtk_c_sources += \
547         gtkplug-x11.c   \
548         gtksocket-x11.c \
549         gtkxembed.c     \
550         gtktrayicon-x11.c
551 else
552 if USE_WIN32
553 gtk_private_h_sources += gtkwin32embed.h
554 gtk_c_sources +=         gtkplug-win32.c gtksocket-win32.c gtkwin32embed.c
555 else
556 gtk_c_sources +=         gtkplug-stub.c gtksocket-stub.c
557 endif
558 endif
559
560 # we use our own built_sources variable rules to avoid automake's
561 # BUILT_SOURCES oddities
562 # we generate frequently rebuild files piggyback on a stamp file, so sources
563 # depending on them only get rebuild when the built source actually changed
564 # content
565
566 # built sources that get installed with the header files
567 gtk_built_public_sources =                      \
568         gtkmarshal.h                            \
569         gtktypebuiltins.h
570
571 # built sources that don't get installed
572 gtk_built_private_headers =                     \
573         gtkalias.h                              \
574         gtkmarshalers.h                         \
575         gtkbuiltincache.h
576
577 gtk_built_sources =                             \
578         gtkaliasdef.c                           \
579         gtktypebuiltins.c                       \
580         gtkmarshalers.c                         \
581         gtkmarshalers.h                         \
582         gtkmarshal.c                            \
583         ${gtk_built_private_headers}            \
584         ${gtk_built_public_sources}
585
586 stamp_files =                                   \
587         stamp-gtkmarshalers.h                   \
588         stamp-gtkmarshal.h                      \
589         stamp-gtktypebuiltins.h
590
591 # non-header sources (headers should be specified in the above variables)
592 # that don't serve as direct make target sources, i.e. they don't have
593 # their own .lo rules and don't get publically installed
594 gtk_extra_sources =                             \
595         gtk.symbols                             \
596         gtkversion.h.in                         \
597         gtkmarshalers.list                      \
598         gtkmarshal.list
599
600 #
601 # setup GTK+ sources and their dependencies
602 #
603 MAINTAINERCLEANFILES = $(gtk_built_sources) $(stamp_files)
604 EXTRA_HEADERS =
605 EXTRA_DIST = $(gtk_private_h_sources) $(gtk_extra_sources)
606 EXTRA_DIST += $(gtk_built_sources)
607
608 #
609 # rules to generate built sources
610 #
611 # setup autogeneration dependencies
612 gen_sources = xgen-gdef xgen-gtbh xgen-gtic xgen-gmh xgen-gmc xgen-gmlh xgen-gmlc
613 CLEANFILES = $(gen_sources)
614
615 BUILT_SOURCES = $(gtk_built_sources)
616
617 # all autogenerated files need to be generated in the srcdir,
618 # so old versions get remade and are not confused with newer
619 # versions in the build dir. thus a development setup requires
620 # srcdir to be writable, passing --disable-rebuilds to
621 # ../configure will supress all autogeneration rules.
622 gtkmarshalers.h: stamp-gtkmarshalers.h
623         @true
624 stamp-gtkmarshalers.h: @REBUILD@ gtkmarshalers.list
625         $(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --header >> xgen-gmlh \
626         && (cmp -s xgen-gmlh gtkmarshalers.h || cp xgen-gmlh gtkmarshalers.h) \
627         && rm -f xgen-gmlh \
628         && echo timestamp > $(@F)       
629 gtkmarshalers.c: @REBUILD@ gtkmarshalers.list
630         (echo "#include \"gtkalias.h\""; $(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body) >> xgen-gmlc \
631         && cp xgen-gmlc gtkmarshalers.c \
632         && rm -f xgen-gmlc
633
634 gtkmarshal.h: stamp-gtkmarshal.h
635         @true
636 stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list
637         echo "#ifndef GTK_DISABLE_DEPRECATED" > xgen-gmh                                        \
638         && $(GLIB_GENMARSHAL) --prefix=gtk_marshal $(srcdir)/gtkmarshal.list --header >> xgen-gmh \
639         && echo "#endif /* GTK_DISABLE_DEPRECATED */" >> xgen-gmh \
640         && (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \
641         && rm -f xgen-gmh \
642         && echo timestamp > $(@F)
643 gtkmarshal.c: @REBUILD@ gtkmarshal.list
644         (echo "#include \"gtkalias.h\""; $(GLIB_GENMARSHAL) --prefix=gtk_marshal $(srcdir)/gtkmarshal.list --body) >> xgen-gmc \
645         && cp xgen-gmc gtkmarshal.c \
646         && rm -f xgen-gmc 
647
648 gtktypebuiltins.h: stamp-gtktypebuiltins.h
649         @true
650 stamp-gtktypebuiltins.h: @REBUILD@ $(gtk_public_h_sources) Makefile
651         ( cd $(srcdir) && $(GLIB_MKENUMS) \
652                         --fhead "#ifndef __GTK_TYPE_BUILTINS_H__\n#define __GTK_TYPE_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
653                         --fprod "/* enumerations from \"@filename@\" */\n" \
654                         --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
655                         --ftail "G_END_DECLS\n\n#endif /* __GTK_TYPE_BUILTINS_H__ */" \
656                 $(gtk_public_h_sources) ) >> xgen-gtbh \
657         && (cmp -s xgen-gtbh gtktypebuiltins.h || cp xgen-gtbh gtktypebuiltins.h ) \
658         && rm -f xgen-gtbh \
659         && echo timestamp > $(@F)
660 gtktypebuiltins.c: @REBUILD@ $(gtk_public_h_sources) Makefile
661         ( cd $(srcdir) && $(GLIB_MKENUMS) \
662                         --fhead "#undef GTK_DISABLE_DEPRECATED\n#define GTK_ENABLE_BROKEN\n#include \"gtk.h\"\n#include \"gtkprivate.h\"\n#include \"gtkalias.h\"\n" \
663                         --ftail "#define __GTK_TYPE_BUILTINS_C__\n#include \"gtkaliasdef.c\"\n" \
664                         --fprod "\n/* enumerations from \"@filename@\" */" \
665                         --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
666                         --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
667                         --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n  }\n  return etype;\n}\n" \
668                 $(gtk_public_h_sources) ) > xgen-gtbc \
669         && cp xgen-gtbc gtktypebuiltins.c  \
670         && rm -f xgen-gtbc
671
672 # target platform:
673 lib_LTLIBRARIES = $(gtktargetlib)
674
675 gtkincludedir = $(includedir)/gtk-2.0/gtk
676 gtkinclude_HEADERS = $(gtk_public_h_sources) $(gtk_semi_private_h_sources) $(gtk_built_public_sources) gtkversion.h
677
678 libgtk_x11_2_0_la_SOURCES = $(gtk_c_sources)
679 libgtk_linux_fb_2_0_la_SOURCES = $(gtk_c_sources)
680 libgtk_win32_2_0_la_SOURCES = $(gtk_c_sources)
681 libgtk_quartz_2_0_la_SOURCES = $(gtk_c_sources)
682
683 libgtk_x11_2_0_la_LDFLAGS = $(libtool_opts)
684 libgtk_linux_fb_2_0_la_LDFLAGS = $(libtool_opts)
685 libgtk_win32_2_0_la_LDFLAGS = $(libtool_opts)
686 libgtk_quartz_2_0_la_LDFLAGS = $(libtool_opts)
687
688 libgtk_x11_2_0_la_LIBADD = $(libadd)
689 libgtk_linux_fb_2_0_la_LIBADD = $(libadd)
690 libgtk_win32_2_0_la_LIBADD = $(libadd) -lole32 -lgdi32
691 libgtk_win32_2_0_la_DEPENDENCIES = $(gtk_def) $(gtk_win32_res)
692 libgtk_quartz_2_0_la_LIBADD = $(libadd)
693
694 if USE_WIN32
695 libgtk_target_ldflags = $(gtk_win32_res_ldflag) $(gtk_win32_symbols)
696 endif
697 EXTRA_LTLIBRARIES = libgtk-x11-2.0.la libgtk-linux-fb-2.0.la libgtk-win32-2.0.la libgtk-quartz-2.0.la
698
699 install-exec-hook: 
700 if DISABLE_EXPLICIT_DEPS
701         $(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/$(gtktargetlib)
702 endif
703
704 # Install a RC file for the default GTK+ theme, and key themes
705 install-data-local: install-ms-lib install-def-file
706         $(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Raleigh/gtk-2.0
707         $(INSTALL_DATA) $(srcdir)/gtkrc.default $(DESTDIR)$(datadir)/themes/Raleigh/gtk-2.0/gtkrc
708         $(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key
709         $(INSTALL_DATA) $(srcdir)/gtkrc.key.default $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key/gtkrc
710         $(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key
711         $(INSTALL_DATA) $(srcdir)/gtkrc.key.emacs $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key/gtkrc
712
713 uninstall-local: uninstall-ms-lib uninstall-def-file
714         rm -f $(DESTDIR)$(datadir)/themes/Raleigh/gtk-2.0/gtkrc
715         rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key/gtkrc
716         rm -f $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key/gtkrc
717
718 # if srcdir!=builddir, clean out maintainer-clean files from builddir
719 # this allows dist to pass.
720 distclean-local:
721         if test $(srcdir) != .; then \
722           rm -f $(MAINTAINERCLEANFILES); \
723         fi
724
725 DEPS = $(gtktargetlib) $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la $(top_builddir)/gdk/$(gdktargetlib)
726
727 TEST_DEPS = $(DEPS) gtk.immodules
728
729 LDADDS =                                                                \
730         $(gtktargetlib)                                                 \
731         $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la  \
732         $(top_builddir)/gdk/$(gdktargetlib)
733
734 #
735 # Installed tools
736 #
737 bin_PROGRAMS = gtk-query-immodules-2.0 gtk-update-icon-cache
738
739 gtk_query_immodules_2_0_DEPENDENCIES = $(DEPS)
740 gtk_query_immodules_2_0_LDADD = $(LDADDS)
741
742 gtk_query_immodules_2_0_SOURCES = queryimmodules.c
743
744 gtk_update_icon_cache_LDADD = $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
745
746 gtk_update_icon_cache_SOURCES = updateiconcache.c
747
748 .PHONY: files test test-debug
749
750 files:
751         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
752           echo $$p; \
753         done
754
755 STOCK_ICONS = \
756         stock-icons/16/gtk-about.png                    \
757         stock-icons/16/gtk-add.png                      \
758         stock-icons/16/gtk-cdrom.png                    \
759         stock-icons/16/gtk-connect.png                  \
760         stock-icons/16/gtk-convert.png                  \
761         stock-icons/16/gtk-copy.png                     \
762         stock-icons/16/gtk-cut.png                      \
763         stock-icons/16/gtk-delete.png                   \
764         stock-icons/16/gtk-directory.png                \
765         stock-icons/16/gtk-disconnect.png               \
766         stock-icons/16/gtk-edit.png                     \
767         stock-icons/16/gtk-execute.png                  \
768         stock-icons/16/gtk-file.png                     \
769         stock-icons/16/gtk-find-and-replace.png         \
770         stock-icons/16/gtk-find.png                     \
771         stock-icons/16/gtk-floppy.png                   \
772         stock-icons/16/gtk-fullscreen.png               \
773         stock-icons/16/gtk-go-back-ltr.png              \
774         stock-icons/16/gtk-go-down.png                  \
775         stock-icons/16/gtk-go-forward-ltr.png           \
776         stock-icons/16/gtk-goto-bottom.png              \
777         stock-icons/16/gtk-goto-first-ltr.png           \
778         stock-icons/16/gtk-goto-last-ltr.png            \
779         stock-icons/16/gtk-goto-top.png                 \
780         stock-icons/16/gtk-go-up.png                    \
781         stock-icons/16/gtk-harddisk.png                 \
782         stock-icons/16/gtk-help.png                     \
783         stock-icons/16/gtk-home.png                     \
784         stock-icons/16/gtk-indent-ltr.png               \
785         stock-icons/16/gtk-indent-rtl.png               \
786         stock-icons/16/gtk-index.png                    \
787         stock-icons/16/gtk-info.png                     \
788         stock-icons/16/gtk-jump-to-ltr.png              \
789         stock-icons/16/gtk-jump-to-rtl.png              \
790         stock-icons/16/gtk-justify-center.png           \
791         stock-icons/16/gtk-justify-fill.png             \
792         stock-icons/16/gtk-justify-left.png             \
793         stock-icons/16/gtk-justify-right.png            \
794         stock-icons/16/gtk-leave-fullscreen.png         \
795         stock-icons/16/gtk-media-forward-ltr.png        \
796         stock-icons/16/gtk-media-next-ltr.png           \
797         stock-icons/16/gtk-media-pause.png              \
798         stock-icons/16/gtk-media-play-ltr.png           \
799         stock-icons/16/gtk-media-play-rtl.png           \
800         stock-icons/16/gtk-media-previous-ltr.png       \
801         stock-icons/16/gtk-media-record.png             \
802         stock-icons/16/gtk-media-rewind-ltr.png         \
803         stock-icons/16/gtk-media-stop.png               \
804         stock-icons/16/gtk-missing-image.png            \
805         stock-icons/16/gtk-network.png                  \
806         stock-icons/16/gtk-new.png                      \
807         stock-icons/16/gtk-open.png                     \
808         stock-icons/16/gtk-paste.png                    \
809         stock-icons/16/gtk-preferences.png              \
810         stock-icons/16/gtk-print.png                    \
811         stock-icons/16/gtk-print-preview.png            \
812         stock-icons/16/gtk-properties.png               \
813         stock-icons/16/gtk-quit.png                     \
814         stock-icons/16/gtk-redo-ltr.png                 \
815         stock-icons/16/gtk-redo-rtl.png                 \
816         stock-icons/16/gtk-refresh.png                  \
817         stock-icons/16/gtk-remove.png                   \
818         stock-icons/16/gtk-revert-to-saved-ltr.png      \
819         stock-icons/16/gtk-revert-to-saved-rtl.png      \
820         stock-icons/16/gtk-save-as.png                  \
821         stock-icons/16/gtk-select-all.png               \
822         stock-icons/16/gtk-select-font.png              \
823         stock-icons/16/gtk-sort-ascending.png           \
824         stock-icons/16/gtk-sort-descending.png          \
825         stock-icons/16/gtk-spell-check.png              \
826         stock-icons/16/gtk-stop.png                     \
827         stock-icons/16/gtk-strikethrough.png            \
828         stock-icons/16/gtk-font.png                     \
829         stock-icons/16/gtk-undelete-ltr.png             \
830         stock-icons/16/gtk-undelete-rtl.png             \
831         stock-icons/16/gtk-underline.png                \
832         stock-icons/16/gtk-undo-ltr.png                 \
833         stock-icons/16/gtk-undo-rtl.png                 \
834         stock-icons/16/gtk-unindent-ltr.png             \
835         stock-icons/16/gtk-unindent-rtl.png             \
836         stock-icons/16/gtk-zoom-100.png                 \
837         stock-icons/16/gtk-zoom-fit.png                 \
838         stock-icons/16/gtk-zoom-in.png                  \
839         stock-icons/16/gtk-zoom-out.png                 \
840         stock-icons/16/gtk-italic.png                   \
841         stock-icons/16/gtk-bold.png                     \
842         stock-icons/20/gtk-apply.png                    \
843         stock-icons/20/gtk-cancel.png                   \
844         stock-icons/20/gtk-close.png                    \
845         stock-icons/20/gtk-no.png                       \
846         stock-icons/20/gtk-ok.png                       \
847         stock-icons/20/gtk-yes.png                      \
848         stock-icons/24/gtk-about.png                    \
849         stock-icons/24/gtk-add.png                      \
850         stock-icons/24/gtk-bold.png                     \
851         stock-icons/24/gtk-cdrom.png                    \
852         stock-icons/24/gtk-clear.png                    \
853         stock-icons/24/gtk-close.png                    \
854         stock-icons/24/gtk-color-picker.png             \
855         stock-icons/24/gtk-connect.png                  \
856         stock-icons/24/gtk-convert.png                  \
857         stock-icons/24/gtk-copy.png                     \
858         stock-icons/24/gtk-cut.png                      \
859         stock-icons/24/gtk-directory.png                \
860         stock-icons/24/gtk-disconnect.png               \
861         stock-icons/24/gtk-edit.png                     \
862         stock-icons/24/gtk-execute.png                  \
863         stock-icons/24/gtk-file.png                     \
864         stock-icons/24/gtk-find-and-replace.png         \
865         stock-icons/24/gtk-find.png                     \
866         stock-icons/24/gtk-font.png                     \
867         stock-icons/24/gtk-fullscreen.png               \
868         stock-icons/24/gtk-go-back-ltr.png              \
869         stock-icons/24/gtk-goto-top.png                 \
870         stock-icons/24/gtk-go-down.png                  \
871         stock-icons/24/gtk-goto-bottom.png              \
872         stock-icons/24/gtk-goto-first-ltr.png           \
873         stock-icons/24/gtk-goto-last-ltr.png            \
874         stock-icons/24/gtk-go-up.png                    \
875         stock-icons/24/gtk-harddisk.png                 \
876         stock-icons/24/gtk-help.png                     \
877         stock-icons/24/gtk-home.png                     \
878         stock-icons/24/gtk-indent-ltr.png               \
879         stock-icons/24/gtk-indent-rtl.png               \
880         stock-icons/24/gtk-index.png                    \
881         stock-icons/24/gtk-info.png                     \
882         stock-icons/24/gtk-italic.png                   \
883         stock-icons/24/gtk-jump-to-ltr.png              \
884         stock-icons/24/gtk-jump-to-rtl.png              \
885         stock-icons/24/gtk-justify-center.png           \
886         stock-icons/24/gtk-justify-fill.png             \
887         stock-icons/24/gtk-justify-left.png             \
888         stock-icons/24/gtk-justify-right.png            \
889         stock-icons/24/gtk-leave-fullscreen.png         \
890         stock-icons/24/gtk-media-forward-ltr.png        \
891         stock-icons/24/gtk-media-next-ltr.png           \
892         stock-icons/24/gtk-media-pause.png              \
893         stock-icons/24/gtk-media-play-ltr.png           \
894         stock-icons/24/gtk-media-play-rtl.png           \
895         stock-icons/24/gtk-media-previous-ltr.png       \
896         stock-icons/24/gtk-media-record.png             \
897         stock-icons/24/gtk-media-rewind-ltr.png         \
898         stock-icons/24/gtk-media-stop.png               \
899         stock-icons/24/gtk-missing-image.png            \
900         stock-icons/24/gtk-network.png                  \
901         stock-icons/24/gtk-new.png                      \
902         stock-icons/24/gtk-open.png                     \
903         stock-icons/24/gtk-paste.png                    \
904         stock-icons/24/gtk-preferences.png              \
905         stock-icons/24/gtk-print.png                    \
906         stock-icons/24/gtk-print-preview.png            \
907         stock-icons/24/gtk-properties.png               \
908         stock-icons/24/gtk-quit.png                     \
909         stock-icons/24/gtk-redo-ltr.png                 \
910         stock-icons/24/gtk-redo-rtl.png                 \
911         stock-icons/24/gtk-refresh.png                  \
912         stock-icons/24/gtk-remove.png                   \
913         stock-icons/24/gtk-revert-to-saved-ltr.png      \
914         stock-icons/24/gtk-revert-to-saved-rtl.png      \
915         stock-icons/24/gtk-select-font.png              \
916         stock-icons/24/gtk-save-as.png                  \
917         stock-icons/24/gtk-floppy.png                   \
918         stock-icons/24/gtk-select-all.png               \
919         stock-icons/24/gtk-select-color.png             \
920         stock-icons/24/gtk-sort-ascending.png           \
921         stock-icons/24/gtk-sort-descending.png          \
922         stock-icons/24/gtk-spell-check.png              \
923         stock-icons/24/gtk-stop.png                     \
924         stock-icons/24/gtk-strikethrough.png            \
925         stock-icons/24/gtk-delete.png                   \
926         stock-icons/24/gtk-undelete-ltr.png             \
927         stock-icons/24/gtk-undelete-rtl.png             \
928         stock-icons/24/gtk-underline.png                \
929         stock-icons/24/gtk-undo-ltr.png                 \
930         stock-icons/24/gtk-undo-rtl.png                 \
931         stock-icons/24/gtk-unindent-ltr.png             \
932         stock-icons/24/gtk-unindent-rtl.png             \
933         stock-icons/24/gtk-zoom-100.png                 \
934         stock-icons/24/gtk-zoom-fit.png                 \
935         stock-icons/24/gtk-zoom-in.png                  \
936         stock-icons/24/gtk-zoom-out.png                 \
937         stock-icons/24/gtk-go-forward-ltr.png           \
938         stock-icons/32/gtk-dnd-multiple.png             \
939         stock-icons/32/gtk-dnd.png                      \
940         stock-icons/48/gtk-dialog-authentication.png    \
941         stock-icons/48/gtk-dialog-error.png             \
942         stock-icons/48/gtk-dialog-info.png              \
943         stock-icons/48/gtk-dialog-question.png          \
944         stock-icons/48/gtk-dialog-warning.png
945
946 GENERATED_ICONS = \
947         stock-icons/16/gtk-go-back-rtl.png              \
948         stock-icons/16/gtk-go-forward-rtl.png           \
949         stock-icons/16/gtk-goto-first-rtl.png           \
950         stock-icons/16/gtk-goto-last-rtl.png            \
951         stock-icons/16/gtk-media-forward-rtl.png        \
952         stock-icons/16/gtk-media-next-rtl.png           \
953         stock-icons/16/gtk-media-previous-rtl.png       \
954         stock-icons/16/gtk-media-rewind-rtl.png         \
955         stock-icons/16/gtk-save.png                     \
956         stock-icons/24/gtk-go-back-rtl.png              \
957         stock-icons/24/gtk-go-forward-rtl.png           \
958         stock-icons/24/gtk-goto-first-rtl.png           \
959         stock-icons/24/gtk-goto-last-rtl.png            \
960         stock-icons/24/gtk-media-forward-rtl.png        \
961         stock-icons/24/gtk-media-next-rtl.png           \
962         stock-icons/24/gtk-media-previous-rtl.png       \
963         stock-icons/24/gtk-media-rewind-rtl.png         \
964         stock-icons/24/gtk-save.png
965
966 stamp-icons: $(STOCK_ICONS)
967         for i in 16 24; do                                                      \
968            (cd $(srcdir)/stock-icons/$$i                                        \
969            && rm -f gtk-go-back-rtl.png                                         \
970            && $(LN_S) gtk-go-forward-ltr.png gtk-go-back-rtl.png                \
971            && rm -f gtk-go-forward-rtl.png                                      \
972            && $(LN_S) gtk-go-back-ltr.png gtk-go-forward-rtl.png                \
973            && rm -f gtk-goto-first-rtl.png                                      \
974            && $(LN_S) gtk-goto-last-ltr.png gtk-goto-first-rtl.png              \
975            && rm -f gtk-goto-last-rtl.png                                       \
976            && $(LN_S) gtk-goto-first-ltr.png gtk-goto-last-rtl.png              \
977            && rm -f gtk-media-forward-rtl.png                                   \
978            && $(LN_S) gtk-media-rewind-ltr.png gtk-media-forward-rtl.png        \
979            && rm -f gtk-media-next-rtl.png                                      \
980            && $(LN_S) gtk-media-previous-ltr.png gtk-media-next-rtl.png         \
981            && rm -f gtk-media-previous-rtl.png                                  \
982            && $(LN_S) gtk-media-next-ltr.png gtk-media-previous-rtl.png         \
983            && rm -f gtk-media-rewind-rtl.png                                    \
984            && $(LN_S) gtk-media-forward-ltr.png gtk-media-rewind-rtl.png        \
985            && rm -f gtk-save.png                                                \
986            && $(LN_S) gtk-floppy.png gtk-save.png)                              \
987         done                                                                    \
988         && touch stamp-icons
989
990 gtkbuiltincache.h: @REBUILD@ gtk-update-icon-cache$(EXEEXT) stamp-icons
991         ./gtk-update-icon-cache --force --ignore-theme-index    \
992            --source builtin_icons stock-icons > gtkbuiltincache.h
993
994 MAINTAINERCLEANFILES += stamp-icons
995
996 EXTRA_DIST +=                   \
997         $(STOCK_ICONS)          \
998         $(GENERATED_ICONS)      \
999         line-arrow.xbm          \
1000         line-wrap.xbm           \
1001         tree_plus.xbm           \
1002         tree_minus.xbm          \
1003         tree_minus.xpm          \
1004         tree_plus.xpm           \
1005         gtk.def                 \
1006         gtk-win32.rc            \
1007         gtk-win32.rc.in         \
1008         gtkwin32embed.h         \
1009         gtkfilesystemwin32.h    \
1010         gtkfilesystemwin32.c    \
1011         gtkrc.default           \
1012         gtkrc.key.default       \
1013         gtkrc.key.emacs         \
1014         makefile.msc            \
1015         makefile.msc.in         \
1016         makegtkalias.pl         \
1017         abicheck.sh
1018
1019 install-data-local: