Makefile.am 17.2 KB
Newer Older
Owen Taylor's avatar
Owen Taylor committed
1
# Makefile.am for gtk+/gtk
Elliot Lee's avatar
Elliot Lee committed
2

3
SUBDIRS=stock-icons theme-bits
4

5 6 7 8 9 10
if OS_UNIX
SUBDIRS += xdgmime
endif

DIST_SUBDIRS=stock-icons theme-bits xdgmime

11
INCLUDES =						\
12
	-DG_LOG_DOMAIN=\"Gtk\"				\
13
	-DGTK_LIBDIR=\"$(libdir)\"			\
14
	-DGTK_DATADIR=\"$(datadir)\"			\
15 16
	-DGTK_DATA_PREFIX=\"$(prefix)\"			\
	-DGTK_SYSCONFDIR=\"$(sysconfdir)\"		\
17 18 19
	-DGTK_VERSION=\"$(GTK_VERSION)\"		\
	-DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\"	\
	-DGTK_HOST=\"$(host)\"				\
Tor Lillqvist's avatar
Tor Lillqvist committed
20
	-DGTK_COMPILATION				\
Owen Taylor's avatar
Owen Taylor committed
21
	-I$(top_builddir)/gtk				\
22 23
	-I$(top_srcdir) -I../gdk			\
	-I$(top_srcdir)/gdk				\
Owen Taylor's avatar
Owen Taylor committed
24
	-I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf	\
Manish Singh's avatar
Manish Singh committed
25 26
	-DG_DISABLE_DEPRECATED				\
	-DGDK_PIXBUF_DISABLE_DEPRECATED			\
Manish Singh's avatar
Manish Singh committed
27
	-DGDK_DISABLE_DEPRECATED			\
28
	-DGTK_DISABLE_DEPRECATED			\
29
	-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED		\
30 31
	$(GTK_DEBUG_FLAGS)				\
	$(GTK_DEP_CFLAGS)
32

33
gtarget=$(gdktarget)
Elliot Lee's avatar
Elliot Lee committed
34

Tor Lillqvist's avatar
Tor Lillqvist committed
35 36 37 38 39 40
if PLATFORM_WIN32
no_undefined = -no-undefined
endif

if OS_WIN32
gtk_def = gtk.def
41
gtk_win32_symbols = -export-symbols $(gtk_def)
Tor Lillqvist's avatar
Tor Lillqvist committed
42 43 44 45 46 47 48

gtk_win32res_lo = gtk-win32res.lo

gtk-win32res.lo : gtk-win32.rc
	$(top_srcdir)/build/win32/lt-compile-resource gtk-win32.rc gtk-win32res.lo

install-libtool-import-lib:
Owen Taylor's avatar
Owen Taylor committed
49
	$(INSTALL) .libs/libgtk-win32-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir)
Tor Lillqvist's avatar
Tor Lillqvist committed
50
uninstall-libtool-import-lib:
Owen Taylor's avatar
Owen Taylor committed
51
	-rm $(DESTDIR)$(libdir)/libtk-win32-$(GTK_API_VERSION).dll.a
Tor Lillqvist's avatar
Tor Lillqvist committed
52 53 54 55 56 57
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
endif

if MS_LIB_AVAILABLE
Owen Taylor's avatar
Owen Taylor committed
58
noinst_DATA = gtk-win32-$(GTK_API_VERSION).lib
Tor Lillqvist's avatar
Tor Lillqvist committed
59

Owen Taylor's avatar
Owen Taylor committed
60 61
gtk-win32-$(GTK_API_VERSION).lib: libgtk-win32-$(GTK_API_VERSION).la gtk.def
	lib -name:libgtk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gtk.def -out:$@
Tor Lillqvist's avatar
Tor Lillqvist committed
62 63

install-ms-lib:
Owen Taylor's avatar
Owen Taylor committed
64
	$(INSTALL) gtk-win32-$(GTK_API_VERSION).lib $(DESTDIR)$(libdir)
Tor Lillqvist's avatar
Tor Lillqvist committed
65 66

uninstall-ms-lib:
Owen Taylor's avatar
Owen Taylor committed
67
	-rm $(DESTDIR)$(libdir)/gtk-win32-$(GTK_API_VERSION).lib
Tor Lillqvist's avatar
Tor Lillqvist committed
68 69 70 71 72
else
install-ms-lib:
uninstall-ms-lib:
endif

73
# libtool stuff: set version and export symbols for resolving
74 75
# since automake doesn't support conditionalized libsomething_la_LDFLAGS
# we use the general approach here
76
libgtkincludedir = $(includedir)/gtk-2.0/gtk
77 78 79 80 81
libadd =								\
	$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la	\
	$(top_builddir)/gdk/$(gdktargetlib)				\
	$(GTK_DEP_LIBS)

82 83 84 85
if OS_UNIX
libadd += xdgmime/libxdgmime.la
endif

86 87 88 89 90 91
# common options for the various packages.
libtool_opts =							\
  -version-info $(LT_VERSION_INFO)				\
  -export-dynamic $(no_undefined) $(LIBTOOL_EXPORT_OPTIONS)	\
  -rpath $(libdir) $(libgtk_target_ldflags)

92

93 94 95
#
# setup source file variables
#
96

97 98
# GTK+ header files for public installation (non-generated, or generated
# by configure)
99
gtk_public_h_sources =          \
Elliot Lee's avatar
Elliot Lee committed
100
	gtk.h			\
Tim Janik's avatar
Tim Janik committed
101 102
	gtkaccelgroup.h		\
	gtkaccellabel.h		\
103
	gtkaccelmap.h		\
104
	gtkaccessible.h		\
105 106
	gtkaction.h		\
	gtkactiongroup.h	\
Elliot Lee's avatar
Elliot Lee committed
107 108 109
	gtkadjustment.h		\
	gtkalignment.h		\
	gtkarrow.h		\
110
	gtkaspectframe.h	\
111
	gtkbbox.h		\
Elliot Lee's avatar
Elliot Lee committed
112
	gtkbin.h		\
Tim Janik's avatar
Tim Janik committed
113
	gtkbindings.h		\
Elliot Lee's avatar
Elliot Lee committed
114 115
	gtkbox.h		\
	gtkbutton.h		\
116
	gtkcalendar.h		\
117
	gtkcelleditable.h	\
118
	gtkcelllayout.h		\
119 120 121 122
	gtkcellrenderer.h	\
	gtkcellrendererpixbuf.h	\
	gtkcellrenderertext.h	\
	gtkcellrenderertoggle.h	\
Elliot Lee's avatar
Elliot Lee committed
123 124
	gtkcheckbutton.h	\
	gtkcheckmenuitem.h	\
Owen Taylor's avatar
Owen Taylor committed
125
	gtkclipboard.h		\
126
	gtkclist.h		\
127 128
	gtkclipboard.h		\
	gtkcolorbutton.h	\
Elliot Lee's avatar
Elliot Lee committed
129
	gtkcolorsel.h		\
130
	gtkcolorseldialog.h	\
131
	gtkcombo.h		\
132 133
	gtkcombobox.h		\
	gtkcomboboxentry.h	\
Elliot Lee's avatar
Elliot Lee committed
134
	gtkcontainer.h		\
135
	gtkctree.h		\
Elliot Lee's avatar
Elliot Lee committed
136
	gtkcurve.h		\
137
	gtkdebug.h              \
Elliot Lee's avatar
Elliot Lee committed
138
	gtkdialog.h		\
139
	gtkdnd.h		\
Elliot Lee's avatar
Elliot Lee committed
140
	gtkdrawingarea.h	\
141
	gtkeditable.h           \
Elliot Lee's avatar
Elliot Lee committed
142
	gtkentry.h		\
143
	gtkentrycompletion.h	\
Elliot Lee's avatar
Elliot Lee committed
144 145
	gtkenums.h		\
	gtkeventbox.h		\
146
	gtkexpander.h		\
147 148 149 150
	gtkfilechooser.h        \
	gtkfilechooserdialog.h  \
	gtkfilechooserwidget.h  \
	gtkfilefilter.h		\
Elliot Lee's avatar
Elliot Lee committed
151 152
	gtkfilesel.h		\
	gtkfixed.h		\
153
	gtkfontbutton.h		\
154
	gtkfontsel.h		\
Elliot Lee's avatar
Elliot Lee committed
155 156 157
	gtkframe.h		\
	gtkgamma.h		\
	gtkgc.h			\
158
	gtkhandlebox.h		\
Elliot Lee's avatar
Elliot Lee committed
159 160 161 162 163 164 165
	gtkhbbox.h		\
	gtkhbox.h		\
	gtkhpaned.h		\
	gtkhruler.h		\
	gtkhscale.h		\
	gtkhscrollbar.h		\
	gtkhseparator.h		\
166
	gtkiconfactory.h	\
167
	gtkicontheme.h		\
Elliot Lee's avatar
Elliot Lee committed
168
	gtkimage.h		\
169
	gtkimagemenuitem.h	\
170
	gtkimcontext.h		\
171
	gtkimcontextsimple.h	\
Owen Taylor's avatar
Owen Taylor committed
172
	gtkimmodule.h		\
173
	gtkimmulticontext.h	\
Elliot Lee's avatar
Elliot Lee committed
174
	gtkinputdialog.h	\
175
	gtkinvisible.h		\
Elliot Lee's avatar
Elliot Lee committed
176
	gtkitem.h		\
Tim Janik's avatar
Tim Janik committed
177
	gtkitemfactory.h	\
Elliot Lee's avatar
Elliot Lee committed
178
	gtklabel.h		\
179
	gtklayout.h             \
Elliot Lee's avatar
Elliot Lee committed
180 181
	gtklist.h		\
	gtklistitem.h		\
182
	gtkliststore.h		\
Elliot Lee's avatar
Elliot Lee committed
183 184 185 186 187
	gtkmain.h		\
	gtkmenu.h		\
	gtkmenubar.h		\
	gtkmenuitem.h		\
	gtkmenushell.h		\
188
	gtkmessagedialog.h	\
Elliot Lee's avatar
Elliot Lee committed
189 190 191
	gtkmisc.h		\
	gtknotebook.h		\
	gtkobject.h		\
192
	gtkoldeditable.h	\
Elliot Lee's avatar
Elliot Lee committed
193 194 195
	gtkoptionmenu.h		\
	gtkpaned.h		\
	gtkpixmap.h		\
196
	gtkplug.h		\
Elliot Lee's avatar
Elliot Lee committed
197
	gtkpreview.h		\
198
	gtkprivate.h		\
199
	gtkprogress.h		\
Elliot Lee's avatar
Elliot Lee committed
200
	gtkprogressbar.h	\
201
	gtkradioaction.h	\
Elliot Lee's avatar
Elliot Lee committed
202 203
	gtkradiobutton.h	\
	gtkradiomenuitem.h	\
204
	gtkradiotoolbutton.h	\
Elliot Lee's avatar
Elliot Lee committed
205 206 207 208 209 210 211 212
	gtkrange.h		\
	gtkrc.h			\
	gtkruler.h		\
	gtkscale.h		\
	gtkscrollbar.h		\
	gtkscrolledwindow.h	\
	gtkselection.h		\
	gtkseparator.h		\
213 214
	gtkseparatormenuitem.h	\
	gtkseparatortoolitem.h	\
215
	gtksettings.h		\
Elliot Lee's avatar
Elliot Lee committed
216
	gtksignal.h		\
217
	gtksizegroup.h		\
218
	gtksocket.h		\
219
	gtkspinbutton.h		\
Shawn Amundson's avatar
Shawn Amundson committed
220
	gtkstatusbar.h		\
221
	gtkstock.h		\
222
	gtkstyle.h		\
Elliot Lee's avatar
Elliot Lee committed
223
	gtktable.h		\
224
	gtktearoffmenuitem.h    \
225
	gtktext.h		\
226
	gtktextbuffer.h		\
227
	gtktextchild.h		\
228
	gtktextdisplay.h	\
229 230 231 232 233
	gtktextiter.h		\
	gtktextmark.h		\
	gtktexttag.h		\
	gtktexttagtable.h	\
	gtktextview.h		\
234
	gtktipsquery.h		\
235
	gtktoggleaction.h	\
Elliot Lee's avatar
Elliot Lee committed
236
	gtktogglebutton.h	\
237
	gtktoggletoolbutton.h	\
238
	gtktoolbar.h		\
239 240
	gtktoolbutton.h		\
	gtktoolitem.h		\
Elliot Lee's avatar
Elliot Lee committed
241 242
	gtktooltips.h		\
	gtktree.h		\
243
	gtktreednd.h		\
Elliot Lee's avatar
Elliot Lee committed
244
	gtktreeitem.h		\
245
	gtktreemodel.h		\
246
	gtktreemodelfilter.h	\
247
	gtktreemodelsort.h	\
248
	gtktreeselection.h	\
Havoc Pennington's avatar
Havoc Pennington committed
249
	gtktreesortable.h	\
250 251 252
	gtktreestore.h		\
	gtktreeview.h		\
	gtktreeviewcolumn.h	\
Elliot Lee's avatar
Elliot Lee committed
253
	gtktypeutils.h		\
254
	gtkuimanager.h		\
Elliot Lee's avatar
Elliot Lee committed
255 256 257 258 259 260 261 262 263
	gtkvbbox.h		\
	gtkvbox.h		\
	gtkviewport.h		\
	gtkvpaned.h		\
	gtkvruler.h		\
	gtkvscale.h		\
	gtkvscrollbar.h		\
	gtkvseparator.h		\
	gtkwidget.h		\
264 265
	gtkwindow.h

266 267 268 269 270 271
# Installed header files without compatibility guarantees
# that are not include in gtk/gtk.h
gtk_semi_private_h_sources =    \
	gtktextlayout.h		\
	gtkfilesystem.h

272
# GTK+ header files that don't get installed
273
gtk_private_h_sources =         \
274
	gtkcellrendererseptext.h\
275 276
	gtkcellview.h		\
	gtkcellviewmenuitem.h	\
277
	gtkentryprivate.h	\
278 279 280 281 282 283
	gtkfilechooserentry.h	\
	gtkfilechooserdefault.h	\
	gtkfilechooserprivate.h	\
	gtkfilechooserutils.h	\
	gtkfilesystemunix.h	\
	gtkfilesystemmodel.h	\
284
	gtkrbtree.h 		\
285
	gtktextbtree.h		\
286
	gtktextchildprivate.h   \
287 288
	gtktextsegment.h	\
	gtktexttypes.h		\
289
	gtktextutil.h		\
290 291
	gtktextiterprivate.h	\
	gtktextmarkprivate.h	\
292
	gtktexttagprivate.h	\
Owen Taylor's avatar
Owen Taylor committed
293
	gtkthemes.h		\
Owen Taylor's avatar
Owen Taylor committed
294
	gtktreedatalist.h	\
295
	gtktreeprivate.h	\
296 297
	gtkwindow-decorate.h	\
	gtktoggleactionprivate.h
298

299
# GTK+ C sources to build the library from
300
gtk_c_sources =                 \
Soeren Sandmann's avatar
Soeren Sandmann committed
301
	fnmatch.c		\
302 303
	gtkaccelgroup.c		\
	gtkaccellabel.c		\
Soeren Sandmann's avatar
Soeren Sandmann committed
304 305
	gtkaccelmap.c		\
	gtkaccessible.c		\
306 307
	gtkaction.c		\
	gtkactiongroup.c	\
308 309 310 311
	gtkadjustment.c		\
	gtkalignment.c		\
	gtkarrow.c		\
	gtkaspectframe.c	\
Soeren Sandmann's avatar
Soeren Sandmann committed
312
	gtkbbox.c		\
313 314 315 316 317
	gtkbin.c		\
	gtkbindings.c		\
	gtkbox.c		\
	gtkbutton.c		\
	gtkcalendar.c		\
Soeren Sandmann's avatar
Soeren Sandmann committed
318
	gtkcelleditable.c	\
319
	gtkcelllayout.c		\
320
	gtkcellrenderer.c	\
Soeren Sandmann's avatar
Soeren Sandmann committed
321
	gtkcellrendererpixbuf.c	\
322
	gtkcellrendererseptext.c\
323 324
	gtkcellrenderertext.c	\
	gtkcellrenderertoggle.c	\
325 326
	gtkcellview.c		\
	gtkcellviewmenuitem.c	\
327 328
	gtkcheckbutton.c	\
	gtkcheckmenuitem.c	\
Owen Taylor's avatar
Owen Taylor committed
329
	gtkclipboard.c		\
330
	gtkclist.c		\
331
	gtkcolorbutton.c	\
332
	gtkcolorsel.c		\
333
	gtkcolorseldialog.c	\
334
	gtkcombo.c		\
335 336
	gtkcombobox.c		\
	gtkcomboboxentry.c	\
337 338 339 340 341 342 343 344
	gtkcontainer.c		\
	gtkctree.c		\
	gtkcurve.c		\
	gtkdialog.c		\
	gtkdnd.c		\
	gtkdrawingarea.c	\
	gtkeditable.c           \
	gtkentry.c		\
345
	gtkentrycompletion.c	\
346
	gtkeventbox.c		\
347
	gtkexpander.c		\
348 349 350 351 352 353 354
	gtkfilechooser.c	\
	gtkfilechooserdialog.c	\
	gtkfilechooserentry.c	\
	gtkfilechooserdefault.c	\
	gtkfilechooserutils.c	\
	gtkfilechooserwidget.c	\
	gtkfilefilter.c		\
355
	gtkfilesel.c		\
356 357
	gtkfilesystem.c		\
	gtkfilesystemmodel.c	\
358
	gtkfixed.c		\
359
	gtkfontbutton.c         \
360 361 362 363 364 365 366 367 368 369 370 371
	gtkfontsel.c            \
	gtkframe.c		\
	gtkgamma.c		\
	gtkgc.c			\
	gtkhandlebox.c		\
	gtkhbbox.c		\
	gtkhbox.c		\
	gtkhpaned.c		\
	gtkhruler.c		\
	gtkhscale.c		\
	gtkhscrollbar.c		\
	gtkhseparator.c		\
372
	gtkhsv.c		\
373
	gtkhsv.h		\
374
	gtkiconfactory.c	\
375 376 377
	gtkicontheme.c		\
	gtkiconthemeparser.c	\
	gtkiconthemeparser.h	\
378
	gtkimage.c		\
379
	gtkimagemenuitem.c	\
380 381
	gtkimcontext.c		\
	gtkimcontextsimple.c	\
Owen Taylor's avatar
Owen Taylor committed
382
	gtkimmodule.c		\
383
	gtkimmulticontext.c	\
384 385 386 387 388
	gtkinputdialog.c	\
	gtkintl.h		\
	gtkinvisible.c		\
	gtkitem.c		\
	gtkitemfactory.c	\
389 390
	gtkkeyhash.c		\
	gtkkeyhash.h		\
391 392 393 394
	gtklabel.c		\
	gtklayout.c		\
	gtklist.c		\
	gtklistitem.c		\
395
	gtkliststore.c		\
396
	gtkmain.c		\
397
	gtkmarshal.c		\
Soeren Sandmann's avatar
Soeren Sandmann committed
398
	gtkmarshalers.c		\
399 400 401 402
	gtkmenu.c		\
	gtkmenubar.c		\
	gtkmenuitem.c		\
	gtkmenushell.c		\
403
	gtkmessagedialog.c	\
404 405 406
	gtkmisc.c		\
	gtknotebook.c		\
	gtkobject.c		\
Owen Taylor's avatar
Owen Taylor committed
407
	gtkoldeditable.c	\
408 409 410 411 412 413
	gtkoptionmenu.c		\
	gtkpaned.c		\
	gtkpixmap.c		\
	gtkpreview.c		\
	gtkprogress.c		\
	gtkprogressbar.c	\
414
	gtkradioaction.c	\
415 416
	gtkradiobutton.c	\
	gtkradiomenuitem.c	\
Soeren Sandmann's avatar
Soeren Sandmann committed
417
	gtkradiotoolbutton.c	\
418
	gtkrange.c		\
419
	gtkrbtree.c 		\
420 421 422 423 424 425 426
	gtkrc.c			\
	gtkruler.c		\
	gtkscale.c		\
	gtkscrollbar.c		\
	gtkscrolledwindow.c	\
	gtkselection.c		\
	gtkseparator.c		\
Soeren Sandmann's avatar
Soeren Sandmann committed
427 428
	gtkseparatormenuitem.c	\
	gtkseparatortoolitem.c	\
429
	gtksettings.c		\
430
	gtksignal.c		\
431
	gtksizegroup.c		\
432
	gtkspinbutton.c		\
Soeren Sandmann's avatar
Soeren Sandmann committed
433
	gtkstatusbar.c		\
434
	gtkstock.c		\
435 436 437 438
	gtkstyle.c		\
	gtktable.c		\
	gtktearoffmenuitem.c    \
	gtktext.c		\
439 440 441 442 443 444 445 446 447 448 449 450 451
	gtktextbtree.c		\
	gtktextbuffer.c		\
	gtktextchild.c		\
	gtktextdisplay.c	\
	gtktextiter.c		\
	gtktextiterprivate.h	\
	gtktextlayout.c		\
	gtktextmark.c		\
	gtktextmarkprivate.h	\
	gtktextsegment.c	\
	gtktexttag.c		\
	gtktexttagtable.c	\
	gtktexttypes.c		\
452
	gtktextutil.c		\
453
	gtktextview.c		\
454 455
	gtkthemes.c		\
	gtktipsquery.c		\
456
	gtktoggleaction.c	\
457
	gtktogglebutton.c	\
Soeren Sandmann's avatar
Soeren Sandmann committed
458 459 460 461
	gtktoggletoolbutton.c	\
	gtktoolbar.c		\
	gtktoolbutton.c		\
	gtktoolitem.c		\
462 463
	gtktooltips.c		\
	gtktree.c		\
464
	gtktreedatalist.c	\
465
	gtktreednd.c		\
Soeren Sandmann's avatar
Soeren Sandmann committed
466
	gtktreeitem.c		\
467
	gtktreemodel.c		\
468
	gtktreemodelfilter.c	\
469
	gtktreemodelsort.c	\
470
	gtktreeselection.c	\
471
	gtktreesortable.c	\
472 473 474
	gtktreestore.c		\
	gtktreeview.c		\
	gtktreeviewcolumn.c	\
475
	gtktypebuiltins.c	\
476
	gtktypeutils.c		\
477
	gtkuimanager.c		\
478 479 480 481 482 483 484 485 486
	gtkvbbox.c		\
	gtkvbox.c		\
	gtkviewport.c		\
	gtkvpaned.c		\
	gtkvruler.c		\
	gtkvscale.c		\
	gtkvscrollbar.c		\
	gtkvseparator.c		\
	gtkwidget.c		\
487
	gtkwindow-decorate.c    \
Soeren Sandmann's avatar
Soeren Sandmann committed
488
	gtkwindow.c		\
489
	xembed.h
490

491 492 493 494 495
if OS_UNIX
gtk_private_h_sources += gtkfilesystemunix.h
gtk_c_sources +=         gtkfilesystemunix.c
endif

496
gtk_plug_c_sources =            \
497
	gtkplug.c		\
498 499 500
	gtksocket.c		\
	gtkxembed.c		\
	gtkxembed.h
501

502 503 504 505 506
# we use our own built_sources variable rules to avoid automake's
# BUILT_SOURCES oddities
# we generate frequently rebuild files piggyback on a stamp file, so sources
# depending on them only get rebuild when the built source actually changed
# content
507 508

# built sources that get installed with the header files
509 510 511 512 513 514 515
gtk_built_public_sources =			\
	gtkmarshal.h				\
	gtktypebuiltins.h

gtk_built_private_headers =			\
	gtkmarshalers.h

516
# built sources that don't get installed
517
gtk_built_sources =				\
518 519 520 521 522
	gtktypebuiltins.c			\
	gtkmarshalers.c				\
	gtkmarshalers.h				\
	gtkmarshal.c				\
	${gtk_built_private_headers}		\
523 524 525 526 527 528 529
	${gtk_built_public_sources}

stamp_files =					\
	stamp-gtkmarshalers.h			\
	stamp-gtkmarshal.h			\
	stamp-gtktypebuiltins.h

530 531 532
# non-header sources (headers should be specified in the above variables)
# that don't serve as direct make target sources, i.e. they don't have
# their own .lo rules and don't get publically installed
533 534 535 536
gtk_extra_sources =				\
	gtkversion.h.in				\
	gtkmarshalers.list			\
	gtkmarshal.list
537

538
#
Kristian Rietveld's avatar
Kristian Rietveld committed
539
# setup GTK+ sources and their dependencies
540
#
Owen Taylor's avatar
Owen Taylor committed
541
MAINTAINERCLEANFILES = $(gtk_built_sources) $(stamp_files)
Matt Wilson's avatar
Matt Wilson committed
542 543
EXTRA_HEADERS =
EXTRA_DIST = $(gtk_private_h_sources) $(gtk_extra_sources)
544
EXTRA_DIST += $(gtk_built_sources)
545 546 547 548

#
# rules to generate built sources
#
Kristian Rietveld's avatar
Kristian Rietveld committed
549
# setup autogeneration dependencies
550
gen_sources = xgen-gdef xgen-gtbh xgen-gtic xgen-gmh xgen-gmc xgen-gmlh xgen-gmlc
Matt Wilson's avatar
Matt Wilson committed
551
CLEANFILES = $(gen_sources)
552

553
BUILT_SOURCES = $(gtk_built_sources)
554

555
# all autogenerated files need to be generated in the srcdir,
Owen Taylor's avatar
Owen Taylor committed
556 557 558 559
# so old versions get remade and are not confused with newer
# versions in the build dir. thus a development setup requires
# srcdir to be writable, passing --disable-rebuilds to
# ../configure will supress all autogeneration rules.
560
gtkmarshalers.h: stamp-gtkmarshalers.h
561 562
	@true
stamp-gtkmarshalers.h: @REBUILD@ gtkmarshalers.list
563 564 565
	$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --header >> xgen-gmlh \
	&& (cmp -s xgen-gmlh gtkmarshalers.h || cp xgen-gmlh gtkmarshalers.h) \
	&& rm -f xgen-gmlh \
566
	&& echo timestamp > $(@F)	
567 568 569
gtkmarshalers.c: @REBUILD@ gtkmarshalers.list
	$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body >> xgen-gmlc \
	&& cp xgen-gmlc gtkmarshalers.c \
570 571
	&& rm -f xgen-gmlc

572
gtkmarshal.h: stamp-gtkmarshal.h
573 574
	@true
stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list
575 576 577 578 579
	echo "#ifndef GTK_DISABLE_DEPRECATED" > xgen-gmh					\
        && $(GLIB_GENMARSHAL) --prefix=gtk_marshal $(srcdir)/gtkmarshal.list --header >> xgen-gmh \
	&& echo "#endif /* GTK_DISABLE_DEPRECATED */" >> xgen-gmh \
	&& (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \
	&& rm -f xgen-gmh \
580
	&& echo timestamp > $(@F)
581 582 583
gtkmarshal.c: @REBUILD@ gtkmarshal.list
	$(GLIB_GENMARSHAL) --prefix=gtk_marshal $(srcdir)/gtkmarshal.list --body >> xgen-gmc \
	&& cp xgen-gmc gtkmarshal.c \
584
	&& rm -f xgen-gmc 
585

586
gtktypebuiltins.h: stamp-gtktypebuiltins.h
587 588 589 590 591 592 593 594
	@true
stamp-gtktypebuiltins.h: @REBUILD@ $(gtk_public_h_sources) Makefile
	( cd $(srcdir) && glib-mkenums \
			--fhead "#ifndef __GTK_TYPE_BUILTINS_H__\n#define __GTK_TYPE_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
			--fprod "/* enumerations from \"@filename@\" */\n" \
			--vhead "GType @enum_name@_get_type (void);\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
			--ftail "G_END_DECLS\n\n#endif /* __GTK_TYPE_BUILTINS_H__ */" \
		$(gtk_public_h_sources) ) >> xgen-gtbh \
595
	&& (cmp -s xgen-gtbh gtktypebuiltins.h || cp xgen-gtbh gtktypebuiltins.h ) \
596
	&& rm -f xgen-gtbh \
Owen Taylor's avatar
Owen Taylor committed
597
	&& echo timestamp > $(@F)
598
gtktypebuiltins.c: @REBUILD@ $(gtk_public_h_sources) Makefile
599
	( cd $(srcdir) && glib-mkenums \
600
			--fhead "#undef GTK_DISABLE_DEPRECATED\n#define GTK_ENABLE_BROKEN\n#include \"gtk.h\"\n#include \"gtkprivate.h\"" \
601
			--fprod "\n/* enumerations from \"@filename@\" */" \
602 603 604 605
			--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[] = {" \
			--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
			--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		$(gtk_public_h_sources) ) > xgen-gtbc \
606
	&& cp xgen-gtbc gtktypebuiltins.c  \
607
	&& rm -f xgen-gtbc
608

609
# target platform:
610 611 612
lib_LTLIBRARIES = $(gtktargetlib)

gtkincludedir = $(includedir)/gtk-2.0/gtk
613
gtkinclude_HEADERS = $(gtk_public_h_sources) $(gtk_semi_private_h_sources) $(gtk_built_public_sources) gtkversion.h
614

Owen Taylor's avatar
Owen Taylor committed
615 616 617
libgtk_x11_2_0_la_SOURCES = $(gtk_c_sources) $(gtk_plug_c_sources)
libgtk_linux_fb_2_0_la_SOURCES = $(gtk_c_sources)
libgtk_win32_2_0_la_SOURCES = $(gtk_c_sources)
618

619 620 621 622 623 624 625
libgtk_x11_2_0_la_LDFLAGS = $(libtool_opts)
libgtk_linux_fb_2_0_la_LDFLAGS = $(libtool_opts)
libgtk_win32_2_0_la_LDFLAGS = $(libtool_opts)

libgtk_x11_2_0_la_LIBADD = $(libadd)
libgtk_linux_fb_2_0_la_LIBADD = $(libadd)
libgtk_win32_2_0_la_LIBADD = $(libadd) $(gtk_win32res_lo)
626
libgtk_win32_2_0_la_DEPENDENCIES = $(gtk_def) $(gtk_win32res_lo)
627 628 629

if USE_WIN32
libgtk_target_ldflags = $(gtk_win32_symbols) -lwsock32
Tor Lillqvist's avatar
Tor Lillqvist committed
630
endif
Owen Taylor's avatar
Owen Taylor committed
631
EXTRA_LTLIBRARIES = libgtk-x11-2.0.la libgtk-linux-fb-2.0.la libgtk-win32-2.0.la
632

633
install-exec-hook: 
634 635 636 637
if DISABLE_EXPLICIT_DEPS
	$(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/$(gtktargetlib)
endif

638
# Install a RC file for the default GTK+ theme, and key themes
639
install-data-local: install-ms-lib install-libtool-import-lib
640
	$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0
641
	$(INSTALL_DATA) $(srcdir)/gtkrc.default $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
642
	$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key
643
	$(INSTALL_DATA) $(srcdir)/gtkrc.key.default $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key/gtkrc
644
	$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key
645
	$(INSTALL_DATA) $(srcdir)/gtkrc.key.emacs $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key/gtkrc
646

Tor Lillqvist's avatar
Tor Lillqvist committed
647
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
648
	rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
649 650
	rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key/gtkrc
	rm -f $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key/gtkrc
Tor Lillqvist's avatar
Tor Lillqvist committed
651

652 653 654 655 656 657 658
# if srcdir!=builddir, clean out maintainer-clean files from builddir
# this allows dist to pass.
distclean-local:
	if test $(srcdir) != .; then \
	  rm -f $(MAINTAINERCLEANFILES); \
	fi

Owen Taylor's avatar
Owen Taylor committed
659
DEPS = $(gtktargetlib) $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la $(top_builddir)/gdk/$(gdktargetlib)
660

Owen Taylor's avatar
Owen Taylor committed
661 662
TEST_DEPS = $(DEPS) gtk.immodules

663
LDADDS =								\
Owen Taylor's avatar
Owen Taylor committed
664 665
	$(gtktargetlib)							\
	$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la	\
666
	$(top_builddir)/gdk/$(gdktargetlib)
667

Owen Taylor's avatar
Owen Taylor committed
668 669 670 671 672 673 674 675 676 677
#
# Installed tools
#
bin_PROGRAMS = gtk-query-immodules-2.0

gtk_query_immodules_2_0_DEPENDENCIES = $(DEPS)
gtk_query_immodules_2_0_LDADD = $(LDADDS)

gtk_query_immodules_2_0_SOURCES = queryimmodules.c

678
.PHONY: files test test-debug
Elliot Lee's avatar
Elliot Lee committed
679 680 681 682 683

files:
	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
	  echo $$p; \
	done
684

685
EXTRA_DIST +=                   \
686 687 688 689 690 691 692
	line-arrow.xbm 		\
	line-wrap.xbm 		\
	tree_plus.xbm		\
	tree_minus.xbm          \
	tree_minus.xpm		\
	tree_plus.xpm		\
	gtk.def			\
693 694
	gtk-win32.rc		\
	gtk-win32.rc.in		\
695
	gtkrc.default		\
696 697
	gtkrc.key.default	\
	gtkrc.key.emacs		\
698
	makefile.msc		\
699
	makefile.msc.in
Owen Taylor's avatar
Owen Taylor committed
700

701 702
install-data-local: