summaryrefslogtreecommitdiff
path: root/gtk/makefile.msc.in
blob: b4f5bf9d62f5c7936f5f3ca73c15eef7bb069574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
## Makefile for building the gtk DLL with Microsoft C
## Use: nmake -f makefile.msc

## There is no install target, you have to decide where and 
## how to install for yourself.

TOP = ..\..
!INCLUDE $(TOP)/glib/build/win32/make.msc

################################################################

# Not the real version but the one used in the DLL names
GTK_VER = 2.0
GDK_PIXBUF_VER = 2.0


GDK_LIBS = ../gdk/gdk-win32-$(GTK_VER).lib
GTK_LIBS = gtk-win32-$(GTK_VER).lib
GDK_PIXBUF_LIBS = ../gdk-pixbuf/gdk_pixbuf-$(GDK_PIXBUF_VER).lib
GTK_BINARY_VERSION = @GTK_BINARY_VERSION@

# Perl and awk are needed to generate some source files.
# These generated source files are distribuyted with the Win32 GTk+ source
# distributions, so don't worry if you don't have perl and awk.
PERL = perl
AWK = gawk

INCLUDES = -FImsvc_recommended_pragmas.h -I . -I .. -I ../gdk -I ../gdk-pixbuf
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) \
		$(INTL_CFLAGS) $(ATK_CFLAGS) $(CAIRO_CFLAGS)
LDFLAGS = $(ATK_LIBS) /link /machine:ix86 $(LINKDEBUG)
# Some files use near as an identifier
# Don't define GTK_COMPILATION here, because it's for gtk-x.x.dll only
DEFINES = \
	-DHAVE_CONFIG_H \
	$(G_DEBUGGING) -DGTK_DISABLE_COMPAT_H -DG_LOG_DOMAIN=\"Gtk\" -Dnear=xxnear \
	-DPANGO_ENABLE_BACKEND \
	-DGTK_VERSION=\"$(GTK_VER)\" -DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
	-DGTK_HOST=\"win32\" \
	-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED \
	-DGTK_PRINT_BACKENDS=\"file,lpr\"	\
	-DGTK_PRINT_PREVIEW_COMMAND="\"evince --unlink-tempfile --preview %f\"" \
	-DGTK_LIBDIR=\"/magic/path/replaced/at/runtime\"

TOUCH = copy makefile.msc+nul

gtkbuiltincache.h: gtk-update-icon-cache.exe
	cd stock-icons\16
	copy gtk-go-forward-ltr.png gtk-go-back-rtl.png
	copy gtk-go-back-ltr.png gtk-go-forward-rtl.png
	copy gtk-goto-last-ltr.png gtk-goto-first-rtl.png
	copy gtk-goto-first-ltr.png gtk-goto-last-rtl.png
	copy gtk-media-rewind-ltr.png gtk-media-forward-rtl.png
	copy gtk-media-previous-ltr.png gtk-media-next-rtl.png
	copy gtk-media-next-ltr.png gtk-media-previous-rtl.png
	copy gtk-media-forward-ltr.png gtk-media-rewind-rtl.png
	copy gtk-floppy.png gtk-save.png
	cd ..\24
	copy gtk-go-forward-ltr.png gtk-go-back-rtl.png
	copy gtk-go-back-ltr.png gtk-go-forward-rtl.png
	copy gtk-goto-last-ltr.png gtk-goto-first-rtl.png
	copy gtk-goto-first-ltr.png gtk-goto-last-rtl.png
	copy gtk-media-rewind-ltr.png gtk-media-forward-rtl.png
	copy gtk-media-previous-ltr.png gtk-media-next-rtl.png
	copy gtk-media-next-ltr.png gtk-media-previous-rtl.png
	copy gtk-media-forward-ltr.png gtk-media-rewind-rtl.png
	copy gtk-floppy.png gtk-save.png
	cd ..\..
	del gtkicontheme.obj
	gtk-update-icon-cache --force --ignore-theme-index 	\
	   --source builtin_icons stock-icons > gtkbuiltincache.h

GENERATED = \
	gtktypebuiltins.h gtktypebuiltins.c \
	gtkmarshal.h gtkmarshal.c gtkmarshalers.h gtkmarshalers.c \
	gtk.def gtkalias.h gtkaliasdef.c

all :						\
	..\config.h				\
	$(GENERATED)				\
	gtk-update-icon-cache.exe		\
	gtkbuiltincache.h			\
	libgtk-win32-$(GTK_VER)-0.dll		\
	gtk-query-immodules-$(GTK_VER).exe \
#	gtk-win32-$(GTK_VER)s.lib \
#	gtk-x11-$(GTK_VER).dll

gtk_OBJECTS = 					\
	fnmatch.obj				\
	gtkaboutdialog.obj	\
	gtkaccelgroup.obj			\
	gtkaccellabel.obj			\
	gtkaccelmap.obj	\
	gtkaccessible.obj \
	gtkaction.obj	\
	gtkactiongroup.obj	\
	gtkadjustment.obj			\
	gtkalignment.obj			\
	gtkarrow.obj				\
	gtkaspectframe.obj			\
	gtkassistant.obj	\
	gtkbin.obj				\
	gtkbindings.obj				\
	gtkbbox.obj				\
	gtkbox.obj				\
	gtkbuildable.obj	\
	gtkbuilder.obj		\
	gtkbuilderparser.obj	\
	gtkbutton.obj				\
	gtkcalendar.obj				\
	gtkcelleditable.obj			\
	gtkcelllayout.obj			\
	gtkcellrenderer.obj			\
	gtkcellrendereraccel.obj \
	gtkcellrenderercombo.obj \
	gtkcellrenderertext.obj			\
	gtkcellrenderertoggle.obj		\
	gtkcellrendererpixbuf.obj		\
	gtkcellrendererprogress.obj		\
	gtkcellrendererspin.obj	\
	gtkcellview.obj		\
	gtkcheckbutton.obj			\
	gtkcheckmenuitem.obj			\
	gtkclipboard.obj			\
	gtkclist.obj				\
	gtkcolorbutton.obj				\
	gtkcolorsel.obj				\
	gtkcolorseldialog.obj			\
	gtkcombo.obj				\
	gtkcombobox.obj			\
	gtkcomboboxentry.obj		\
	gtkcontainer.obj			\
	gtkctree.obj				\
	gtkcurve.obj				\
	gtkdialog.obj				\
	gtkdnd.obj				\
	gtkdrawingarea.obj			\
	gtkeditable.obj				\
	gtkentry.obj				\
	gtkentrycompletion.obj		\
	gtkeventbox.obj				\
	gtkexpander.obj			\
	gtkfilechooser.obj			\
	gtkfilechooserbutton.obj	\
	gtkfilechooserdefault.obj			\
	gtkfilechooserdialog.obj			\
	gtkfilechooserembed.obj		\
	gtkfilechooserentry.obj			\
	gtkfilechoosersettings.obj	\
	gtkfilechooserutils.obj			\
	gtkfilechooserwidget.obj			\
	gtkfilefilter.obj			\
	gtkfilesel.obj				\
	gtkfilesystem.obj				\
	gtkfilesystemmodel.obj				\
	gtkfilesystemwin32.obj				\
	gtkfixed.obj				\
	gtkfontsel.obj				\
	gtkfontbutton.obj				\
	gtkframe.obj				\
	gtkgamma.obj				\
	gtkgc.obj				\
	gtkhandlebox.obj			\
	gtkhbbox.obj				\
	gtkhbox.obj				\
	gtkhpaned.obj				\
	gtkhruler.obj				\
	gtkhscale.obj				\
	gtkhscrollbar.obj			\
	gtkhseparator.obj			\
	gtkhsv.obj				\
	gtkiconcache.obj			\
	gtkiconcachevalidator.obj	\
	gtkiconfactory.obj			\
	gtkicontheme.obj			\
	gtkiconview.obj			\
	gtkimage.obj				\
	gtkimagemenuitem.obj	\
	gtkimcontext.obj			\
	gtkimcontextsimple.obj			\
	gtkimmodule.obj				\
	gtkimmulticontext.obj			\
	gtkinputdialog.obj			\
	gtkinvisible.obj			\
	gtkitem.obj				\
	gtkitemfactory.obj			\
	gtkkeyhash.obj	\
	gtklabel.obj				\
	gtklayout.obj				\
	gtklinkbutton.obj	\
	gtklist.obj				\
	gtklistitem.obj				\
	gtkliststore.obj				\
	gtkmain.obj				\
	gtkmarshalers.obj		\
	gtkmarshal.obj		\
	gtkmenu.obj				\
	gtkmenubar.obj				\
	gtkmenuitem.obj				\
	gtkmenushell.obj			\
	gtkmenutoolbutton.obj	\
	gtkmessagedialog.obj			\
	gtkmisc.obj				\
	gtkmnemonichash.obj	\
	gtkmodules.obj	\
	gtknotebook.obj				\
	gtkobject.obj				\
	gtkoldeditable.obj			\
	gtkoptionmenu.obj			\
	gtkpagesetup.obj	\
	gtkpaned.obj				\
	gtkpapersize.obj	\
	gtkpathbar.obj				\
	gtkpixmap.obj				\
	gtkplug.obj				\
	gtkplug-win32.obj				\
	gtkpreview.obj	\
	gtkprint-win32.obj	\
	gtkprintcontext.obj	\
	gtkprintoperation.obj	\
	gtkprintoperationpreview.obj	\
	gtkprintoperation-win32.obj	\
	gtkprintsettings.obj	\
	gtkprintutils.obj	\
	gtkprogress.obj				\
	gtkprogressbar.obj			\
	gtkquery.obj	\
	gtkradioaction.obj			\
	gtkradiobutton.obj			\
	gtkradiotoolbutton.obj			\
	gtkradiomenuitem.obj			\
	gtkrange.obj				\
	gtkrbtree.obj	\
	gtkrc.obj				\
	gtkrecentaction.obj \
	gtkrecentchooserdefault.obj \
	gtkrecentchooserdialog.obj \
	gtkrecentchoosermenu.obj 	\
	gtkrecentchooserwidget.obj \
	gtkrecentchooserutils.obj \
	gtkrecentchooser.obj 	\
	gtkrecentfilter.obj 	\
	gtkrecentmanager.obj 	\
	gtkruler.obj				\
	gtkscale.obj				\
	gtkscalebutton.obj	\
	gtkscrollbar.obj			\
	gtkscrolledwindow.obj			\
	gtksearchengine.obj	\
	gtksearchenginebeagle.obj	\
	gtksearchenginesimple.obj	\
	gtksearchenginetracker.obj	\
	gtkselection.obj			\
	gtkseparator.obj			\
	gtkseparatormenuitem.obj \
	gtkseparatortoolitem.obj \
	gtksettings.obj \
	gtksignal.obj				\
	gtksizegroup.obj \
	gtksocket.obj				\
	gtksocket-win32.obj				\
	gtkspinbutton.obj			\
	gtkstatusicon.obj	\
	gtkstyle.obj				\
	gtkstatusbar.obj			\
	gtkstock.obj				\
	gtktable.obj				\
	gtktearoffmenuitem.obj			\
	gtktext.obj				\
	gtktextbtree.obj			\
	gtktextbuffer.obj			\
	gtktextbufferrichtext.obj	\
	gtktextbufferserialize.obj	\
	gtktextchild.obj			\
	gtktextdisplay.obj			\
	gtktextiter.obj				\
	gtktextlayout.obj			\
	gtktextmark.obj				\
	gtktextsegment.obj			\
	gtktexttag.obj				\
	gtktexttagtable.obj			\
	gtktexttypes.obj			\
	gtktextutil.obj	\
	gtktextview.obj				\
	gtkthemes.obj				\
	gtktipsquery.obj			\
	gtktoggleaction.obj			\
	gtktogglebutton.obj			\
	gtktoggletoolbutton.obj			\
	gtktoolbar.obj				\
	gtktoolbutton.obj				\
	gtktoolitem.obj				\
	gtktooltip.obj				\
	gtktooltips.obj				\
	gtktrayicon-win32.obj	\
	gtktree.obj				\
	gtktreedatalist.obj	\
	gtktreednd.obj				\
	gtktreeitem.obj				\
	gtktreemodel.obj			\
	gtktreemodelfilter.obj			\
	gtktreemodelsort.obj			\
	gtktreeselection.obj			\
	gtktreesortable.obj \
	gtktreestore.obj			\
	gtktreeview.obj			\
	gtktreeviewcolumn.obj			\
	gtktypeutils.obj			\
	gtktypebuiltins.obj \
	gtkuimanager.obj	\
	gtkvbbox.obj				\
	gtkvbox.obj				\
	gtkviewport.obj				\
	gtkvolumebutton.obj	\
	gtkvpaned.obj				\
	gtkvruler.obj				\
	gtkvscale.obj				\
	gtkvscrollbar.obj			\
	gtkvseparator.obj			\
	gtkwidget.obj				\
	gtkwin32embed.obj			\
	gtkwin32embedwidget.obj			\
	gtkwindow.obj				\
	gtkwindow-decorate.obj

# Source headers which are non-autogenerated headers
gtk_public_h_sources =		\
	gtk.h			\
	gtkaboutdialog.h	\
	gtkaccelgroup.h		\
	gtkaccellabel.h		\
	gtkaccelmap.h		\
	gtkaccessible.h		\
	gtkaction.h		\
	gtkactiongroup.h	\
	gtkadjustment.h		\
	gtkalignment.h		\
	gtkarrow.h		\
	gtkaspectframe.h	\
	gtkassistant.h		\
	gtkbbox.h		\
	gtkbin.h		\
	gtkbindings.h		\
	gtkbox.h		\
	gtkbuilder.h		\
	gtkbuildable.h		\
	gtkbutton.h		\
	gtkcalendar.h		\
	gtkcelleditable.h	\
	gtkcelllayout.h		\
	gtkcellrenderer.h	\
	gtkcellrendereraccel.h	\
	gtkcellrenderercombo.h	\
	gtkcellrendererpixbuf.h	\
	gtkcellrendererprogress.h \
	gtkcellrendererspin.h   \
	gtkcellrenderertext.h	\
	gtkcellrenderertoggle.h	\
	gtkcellview.h		\
	gtkcheckbutton.h	\
	gtkcheckmenuitem.h	\
	gtkclipboard.h		\
	gtkclist.h		\
	gtkcolorbutton.h	\
	gtkcolorsel.h		\
	gtkcolorseldialog.h	\
	gtkcombo.h		\
	gtkcombobox.h		\
	gtkcomboboxentry.h	\
	gtkcontainer.h		\
	gtkctree.h		\
	gtkcurve.h		\
	gtkdebug.h              \
	gtkdialog.h		\
	gtkdnd.h		\
	gtkdrawingarea.h	\
	gtkeditable.h           \
	gtkentry.h		\
	gtkentrycompletion.h	\
	gtkenums.h		\
	gtkeventbox.h		\
	gtkexpander.h		\
	gtkfilechooser.h        \
	gtkfilechooserbutton.h  \
	gtkfilechooserdialog.h  \
	gtkfilechooserwidget.h  \
	gtkfilefilter.h		\
	gtkfilesel.h		\
	gtkfixed.h		\
	gtkfontbutton.h		\
	gtkfontsel.h		\
	gtkframe.h		\
	gtkgamma.h		\
	gtkgc.h			\
	gtkhandlebox.h		\
	gtkhbbox.h		\
	gtkhbox.h		\
	gtkhpaned.h		\
	gtkhruler.h		\
	gtkhscale.h		\
	gtkhscrollbar.h		\
	gtkhseparator.h		\
	gtkiconfactory.h	\
	gtkicontheme.h		\
	gtkiconview.h		\
	gtkimage.h		\
	gtkimagemenuitem.h	\
	gtkimcontext.h		\
	gtkimcontextsimple.h	\
	gtkimmodule.h		\
	gtkimmulticontext.h	\
	gtkinputdialog.h	\
	gtkinvisible.h		\
	gtkitem.h		\
	gtkitemfactory.h	\
	gtklabel.h		\
	gtklayout.h             \
	gtklinkbutton.h		\
	gtklist.h		\
	gtklistitem.h		\
	gtkliststore.h		\
	gtkmain.h		\
	gtkmenu.h		\
	gtkmenubar.h		\
	gtkmenuitem.h		\
	gtkmenushell.h		\
	gtkmenutoolbutton.h	\
	gtkmessagedialog.h	\
	gtkmisc.h		\
	gtkmodules.h		\
	gtknotebook.h		\
	gtkobject.h		\
	gtkoldeditable.h	\
	gtkoptionmenu.h		\
	gtkpagesetup.h		\
	gtkpaned.h		\
	gtkpapersize.h		\
	gtkpixmap.h		\
	gtkplug.h		\
	gtkpreview.h		\
	gtkprintcontext.h	\
	gtkprintoperation.h	\
	gtkprintoperationpreview.h	\
	gtkprintsettings.h	\
	gtkprivate.h		\
	gtkprogress.h		\
	gtkprogressbar.h	\
	gtkradioaction.h	\
	gtkradiobutton.h	\
	gtkradiomenuitem.h	\
	gtkradiotoolbutton.h	\
	gtkrange.h		\
	gtkrc.h			\
	gtkrecentaction.h	\
	gtkrecentchooser.h 	\
	gtkrecentchooserdialog.h \
	gtkrecentchoosermenu.h 	\
	gtkrecentchooserwidget.h \
	gtkrecentfilter.h 	\
	gtkrecentmanager.h 	\
	gtkruler.h		\
	gtkscale.h		\
	gtkscalebutton.h	\
	gtkscrollbar.h		\
	gtkscrolledwindow.h	\
	gtkselection.h		\
	gtkseparator.h		\
	gtkseparatormenuitem.h	\
	gtkseparatortoolitem.h	\
	gtksettings.h		\
	gtksignal.h		\
	gtksizegroup.h		\
	gtksocket.h		\
	gtkspinbutton.h		\
	gtkstatusbar.h		\
	gtkstatusicon.h		\
	gtkstock.h		\
	gtkstyle.h		\
	gtktable.h		\
	gtktearoffmenuitem.h    \
	gtktext.h		\
	gtktextbuffer.h		\
	gtktextbufferrichtext.h	\
	gtktextchild.h		\
	gtktextdisplay.h	\
	gtktextiter.h		\
	gtktextmark.h		\
	gtktexttag.h		\
	gtktexttagtable.h	\
	gtktextview.h		\
	gtktipsquery.h		\
	gtktoggleaction.h	\
	gtktogglebutton.h	\
	gtktoggletoolbutton.h	\
	gtktoolbar.h		\
	gtktoolbutton.h		\
	gtktoolitem.h		\
	gtktooltip.h		\
	gtktooltips.h		\
	gtktree.h		\
	gtktreednd.h		\
	gtktreeitem.h		\
	gtktreemodel.h		\
	gtktreemodelfilter.h	\
	gtktreemodelsort.h	\
	gtktreeselection.h	\
	gtktreesortable.h	\
	gtktreestore.h		\
	gtktreeview.h		\
	gtktreeviewcolumn.h	\
	gtktypeutils.h		\
	gtkuimanager.h		\
	gtkvbbox.h		\
	gtkvbox.h		\
	gtkviewport.h		\
	gtkvolumebutton.h	\
	gtkvpaned.h		\
	gtkvruler.h		\
	gtkvscale.h		\
	gtkvscrollbar.h		\
	gtkvseparator.h		\
	gtkwidget.h		\
	gtkwindow.h

# these aren't use here, but listed for reference
gtk_extra_sources = \
	gtkversion.h		\
	gtk-boxed.defs		\
	gtkmarshal.list		\

..\config.h : ..\config.h.win32
	copy ..\config.h.win32 ..\config.h

gtk.def: gtk.symbols makefile.msc
	echo EXPORTS > gtk.def
	cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES \
		-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
		-DG_GNUC_PRINTF=;G_GNUC_PRINTF gtk.symbols >> gtk.def

gtkalias.h: gtk.symbols
	cl /EP -DG_OS_WIN32 -DGTK_WINDOWING_WIN32 -DINCLUDE_INTERNAL_SYMBOLS gtk.symbols | $(PERL) makegtkalias.pl > gtkalias.h

gtkaliasdef.c: gtk.symbols
	 perl makegtkalias.pl -def < gtk.symbols > gtkaliasdef.c

# generate type identifier header (GTK_TYPE_WIDGET_FLAGS)
# use 'echo' to work around 'command line too long'
gtktypebuiltins.h: $(gtk_public_h_sources) makefile.msc
	echo #ifndef __GTK_TYPE_BUILTINS_H__ > gtktypebuiltins.h
	echo #define __GTK_TYPE_BUILTINS_H__ >> gtktypebuiltins.h
	echo #include "glib-object.h" >> gtktypebuiltins.h
	echo G_BEGIN_DECLS >> gtktypebuiltins.h
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--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) >> gtktypebuiltins.h

gtktypebuiltins.c: $(gtk_public_h_sources) makefile.msc
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#define GTK_ENABLE_BROKEN\n#include \"gtk.h\"\n#include \"gtkprivate.h\"" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--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
	copy xgen-gtbc gtktypebuiltins.c

# private marshalers
gtkmarshalers.h : gtkmarshalers.list makefile.msc
	$(GLIB)\gobject\glib-genmarshal --prefix=_gtk_marshal gtkmarshalers.list --header >gtkmarshalers.h

gtkmarshalers.c : gtkmarshalers.list makefile.msc
	$(GLIB)\gobject\glib-genmarshal --prefix=_gtk_marshal gtkmarshalers.list --body >gtkmarshalers.c

# public, deprecated marshalers
gtkmarshal.h : gtkmarshal.list
	echo #ifndef GTK_DISABLE_DEPRECATED >gtkmarshal.h
	$(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >>gtkmarshal.h
	echo #endif /* GTK_DISABLE_DEPRECATED */ >>gtkmarshal.h

gtkmarshal.c : gtkmarshal.list
	$(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --body >gtkmarshal.c

gtksignal.obj : gtksignal.c gtkmarshal.c gtkmarshal.h
	$(CC) $(CFLAGS) -GD -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" gtksignal.c

gtk-win32.res : gtk-win32.rc
	rc -DBUILDNUMBER=0 -r -fo gtk-win32.res gtk-win32.rc

#
# Linking:
#
libgtk-win32-$(GTK_VER)-0.dll : $(gtk_OBJECTS) gtk.def gtk-win32.res
	$(CC) $(CFLAGS) -LD -Fm -Fe$@ $(gtk_OBJECTS) gtk-win32.res \
	$(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) \
	$(CAIRO_LIBS) $(PANGOCAIRO_LIBS) \
	gdi32.lib user32.lib advapi32.lib wsock32.lib shell32.lib ole32.lib comdlg32.lib winspool.lib comctl32.lib \
	$(LDFLAGS) /implib:gtk-win32-$(GTK_VER).lib /def:gtk.def

gtk-win32-$(GTK_VER)s.lib : $(gtk_OBJECTS)
	lib /out:gtk-win32-$(GTK_VER)s.lib $(gtk_OBJECTS)

gtk-query-immodules-$(GTK_VER).exe : queryimmodules.obj
	$(CC) $(CFLAGS) -Fe$@ queryimmodules.obj $(GTK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LDFLAGS)

gtk-update-icon-cache.exe : updateiconcache.obj
	$(CC) $(CFLAGS) -Fe$@ updateiconcache.obj $(GDK_PIXBUF_LIBS) $(GLIB_LIBS) $(INTL_LIBS) $(PANGO_LIBS) $(LDFLAGS)

gtk-x11-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
	$(CC) $(CFLAGS) -LD -Fm -Fegtk-x11-$(GTK_VER).dll $(gtk_OBJECTS) ../gdk/gdk-x11-$(GTK_VER).lib $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(INTL_LIBS) $(GLIB_LIBS) gdi32.lib user32.lib advapi32.lib $(LDFLAGS) /def:gtk.def

# General rule for compiling the objects into the DLL
.c.obj :
	$(CC) $(CFLAGS) -GF -Zm400 -GD -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" $<

$(EXAMPLE).obj : ..\examples\$(EXAMPLE)\$(EXAMPLE).c
	$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"$(EXAMPLE)\" ..\examples\$(EXAMPLE)\$(EXAMPLE).c

$(EXAMPLE).exe : $(EXAMPLE).obj
	$(CC) $(CFLAGS) $(EXAMPLE).obj $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)