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