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
|
## 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)/build/win32/make.msc
################################################################
# Possibly override versions from build/win32/module.defs
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
GDK_PIXBUF_VER = @GDK_PIXBUF_MAJOR@.@GDK_PIXBUF_MINOR@
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
# 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 = -I . -I .. -I ../gdk -I ../gdk-pixbuf
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS)
LDFLAGS = /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 = -DGTK_DISABLE_COMPAT_H -DG_LOG_DOMAIN=\"Gtk\" -Dnear=xxnear -DGTK_VERSION=\"$(GTK_VER)\"
TOUCH = copy makefile.msc+nul
GTK_VER=1.3
all : \
..\config.h \
generated \
gtk-win32-$(GTK_VER).dll \
testcalendar.exe \
testdnd.exe \
testgtk.exe \
testinput.exe \
testrgb.exe \
testselection.exe \
testtext.exe \
testtextbuffer.exe \
simple.exe
gtk_OBJECTS = \
fnmatch.obj \
# gdk-pixbuf-loader.obj \
gtkaccelgroup.obj \
gtkaccellabel.obj \
gtkadjustment.obj \
gtkalignment.obj \
gtkarg.obj \
gtkarrow.obj \
gtkaspectframe.obj \
gtkbin.obj \
gtkbindings.obj \
gtkbbox.obj \
gtkbox.obj \
gtkbutton.obj \
gtkcalendar.obj \
gtkcellrenderer.obj \
gtkcellrenderertext.obj \
gtkcellrenderertextpixbuf.obj \
gtkcellrenderertoggle.obj \
gtkcellrendererpixbuf.obj \
gtkcheckbutton.obj \
gtkcheckmenuitem.obj \
gtkclipboard.obj \
gtkclist.obj \
gtkcolorsel.obj \
gtkcolorseldialog.obj \
gtkcombo.obj \
gtkcontainer.obj \
gtkctree.obj \
gtkcurve.obj \
gtkdata.obj \
gtkdialog.obj \
gtkdnd.obj \
gtkdrawingarea.obj \
gtkeditable.obj \
gtkentry.obj \
gtkeventbox.obj \
gtkfilesel.obj \
gtkfixed.obj \
gtkfontsel.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 \
gtkiconfactory.obj \
gtkimage.obj \
gtkimagemenuitem.obj \
gtkimcontext.obj \
gtkimcontextsimple.obj \
gtkimmodule.obj \
gtkimmulticontext.obj \
gtkinputdialog.obj \
gtkinvisible.obj \
gtkitem.obj \
gtkitemfactory.obj \
gtklabel.obj \
gtklayout.obj \
gtklist.obj \
gtklistitem.obj \
gtkliststore.obj \
gtkmain.obj \
gtkmenu.obj \
gtkmenubar.obj \
gtkmenufactory.obj \
gtkmenuitem.obj \
gtkmenushell.obj \
gtkmessagedialog.obj \
gtkmisc.obj \
gtknotebook.obj \
gtkobject.obj \
gtkoldeditable.obj \
gtkoptionmenu.obj \
gtkpacker.obj \
gtkpaned.obj \
gtkpixmap.obj \
gtkplug.obj \
gtkpreview.obj \
gtkprogress.obj \
gtkprogressbar.obj \
gtkradiobutton.obj \
gtkradiomenuitem.obj \
gtkrange.obj \
gtkrbtree.obj \
gtkrc.obj \
gtkruler.obj \
gtkscale.obj \
gtkscrollbar.obj \
gtkscrolledwindow.obj \
gtkselection.obj \
gtkseparator.obj \
gtkseparatormenuitem.obj \
gtksettings.obj \
gtksignal.obj \
gtksocket.obj \
gtkspinbutton.obj \
gtkstyle.obj \
gtkstatusbar.obj \
gtkstock.obj \
gtktable.obj \
gtktearoffmenuitem.obj \
gtktext.obj \
gtktextbtree.obj \
gtktextbuffer.obj \
gtktextchild.obj \
gtktextdisplay.obj \
gtktextiter.obj \
gtktextlayout.obj \
gtktextmark.obj \
gtktextsegment.obj \
gtktexttag.obj \
gtktexttagtable.obj \
gtktexttypes.obj \
gtktextview.obj \
gtkthemes.obj \
gtktipsquery.obj \
gtktogglebutton.obj \
gtktoolbar.obj \
gtktooltips.obj \
gtktree.obj \
gtktreedatalist.obj \
gtktreednd.obj \
gtktreeitem.obj \
gtktreemodel.obj \
# gtktreemodelsimple.obj \
gtktreemodelsort.obj \
gtktreeselection.obj \
gtktreesortable.obj \
gtktreestore.obj \
gtktreeview.obj \
gtktreeviewcolumn.obj \
gtktypeutils.obj \
gtkvbbox.obj \
gtkvbox.obj \
gtkviewport.obj \
gtkvpaned.obj \
gtkvruler.obj \
gtkvscale.obj \
gtkvscrollbar.obj \
gtkvseparator.obj \
gtkwidget.obj \
gtkwindow.obj \
gtkwindow-decorate.obj
# Source headers which are non-autogenerated headers
gtk_public_h_sources = \
gtk.h \
gtkaccelgroup.h \
gtkaccellabel.h \
gtkadjustment.h \
gtkalignment.h \
gtkarg.h \
gtkarrow.h \
gtkaspectframe.h \
gtkbin.h \
gtkbindings.h \
gtkbbox.h \
gtkbox.h \
gtkbutton.h \
gtkcalendar.h \
gtkcheckbutton.h \
gtkcheckmenuitem.h \
gtkclist.h \
gtkclipboard.h \
gtkcolorsel.h \
gtkcolorseldialog.h \
gtkcombo.h \
gtkcompat.h \
gtkcontainer.h \
gtkctree.h \
gtkcurve.h \
gtkcellrenderer.h \
gtkcellrenderertext.h \
gtkcellrenderertextpixbuf.h \
gtkcellrenderertoggle.h \
gtkcellrendererpixbuf.h \
gtkdata.h \
gtkdebug.h \
gtkdialog.h \
gtkdnd.h \
gtkdrawingarea.h \
gtkeditable.h \
gtkentry.h \
gtkenums.h \
gtkeventbox.h \
gtkfilesel.h \
gtkfixed.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 \
gtkhsv.h \
gtkiconfactory.h \
gtkimage.h \
gtkimcontext.h \
gtkimmodule.h \
gtkimmulticontext.h \
gtkinputdialog.h \
gtkinvisible.h \
gtkitem.h \
gtkitemfactory.h \
gtklabel.h \
gtklayout.h \
gtklist.h \
gtklistitem.h \
gtkliststore.h \
gtkmain.h \
gtkmenu.h \
gtkmenubar.h \
gtkmenufactory.h \
gtkmenuitem.h \
gtkmenushell.h \
gtkmessagedialog.h \
gtkmisc.h \
gtknotebook.h \
gtkoldeditable.h \
gtkobject.h \
gtkoptionmenu.h \
gtkpacker.h \
gtkpaned.h \
# gdk-pixbuf-loader.h \
gtkpixmap.h \
gtkplug.h \
gtkpreview.h \
gtkprivate.h \
gtkprogress.h \
gtkprogressbar.h \
gtkradiobutton.h \
gtkradiomenuitem.h \
gtkrange.h \
gtkrc.h \
gtkruler.h \
gtkscale.h \
gtkscrollbar.h \
gtkscrolledwindow.h \
gtkselection.h \
gtkseparator.h \
gtksignal.h \
gtksocket.h \
gtkspinbutton.h \
gtkstyle.h \
gtkstatusbar.h \
gtkstock.h \
gtktable.h \
gtktearoffmenuitem.h \
gtktextbuffer.h \
gtktextchild.h \
gtktextdisplay.h \
gtktextiter.h \
gtktextlayout.h \
gtktextmark.h \
gtktexttag.h \
gtktexttagtable.h \
gtktextview.h \
gtktext.h \
gtktipsquery.h \
gtktogglebutton.h \
gtktoolbar.h \
gtktooltips.h \
gtktree.h \
gtktreeitem.h \
gtktreemodel.h \
gtktreemodelsimple.h \
gtktreemodelsort.h \
gtktreeselection.h \
gtktreesortable.h \
gtktreestore.h \
gtktreeview.h \
gtktreeviewcolumn.h \
gtktypeutils.h \
gtkvbbox.h \
gtkvbox.h \
gtkviewport.h \
gtkvpaned.h \
gtkvruler.h \
gtkvscale.h \
gtkvscrollbar.h \
gtkvseparator.h \
gtkwidget.h \
gtkwindow.h
# More headers to use when autogenerating.
gdk_headers = \
..\gdk\gdkcolor.h \
..\gdk\gdkcursor.h \
..\gdk\gdkdnd.h \
..\gdk\gdkdrawable.h \
..\gdk\gdkevents.h \
..\gdk\gdkfont.h \
..\gdk\gdkgc.h \
..\gdk\gdkimage.h \
..\gdk\gdkinput.h \
..\gdk\gdkpixmap.h \
..\gdk\gdkproperty.h \
..\gdk\gdkregion.h \
..\gdk\gdkrgb.h \
..\gdk\gdkselection.h \
..\gdk\gdktypes.h \
..\gdk\gdkvisual.h \
..\gdk\gdkwindow.h
..\config.h : ..\config.h.win32
copy ..\config.h.win32 ..\config.h
GENERATED = gtk.defs gtktypebuiltins.h gtktypebuiltins_vars.c gtktypebuiltins_ids.c gtktypebuiltins_evals.c gtkmarshal.h gtkmarshal.c
#
# Generated source files:
#
generated : $(GENERATED)
$(TOUCH) generated
gtk.defs : makeenums.pl gtk-boxed.defs $(gtk_public_h_sources) $(gdk_headers)
$(PERL) makeenums.pl defs $(gtk_public_h_sources) $(gdk_headers) >gd.tmp
copy gd.tmp+gtk-boxed.defs gtk.defs
@erase gd.tmp
# generate type identifier header (GTK_TYPE_WIDGET_FLAGS)
gtktypebuiltins.h: gtk.defs maketypes.awk
$(AWK) -f maketypes.awk gtk.defs macros >gtktypebuiltins.h
# generate type identifier variables (GTK_TYPE_WIDGET_FLAGS)
gtktypebuiltins_vars.c: gtk.defs maketypes.awk
$(AWK) -f maketypes.awk gtk.defs variables >gtktypebuiltins_vars.c
# generate type entries for type-id registration
gtktypebuiltins_ids.c: gtk.defs maketypes.awk
$(AWK) -f maketypes.awk gtk.defs entries >gtktypebuiltins_ids.c
# generate enum value arrays
gtktypebuiltins_evals.c: makeenums.pl gtk.defs
$(PERL) makeenums.pl arrays $(gtk_public_h_sources) $(gdk_headers) >gtktypebuiltins_evals.c
gtkmarshal.h : gtkmarshal.list
$(GLIB)\gobject\glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >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
#
# Linking:
#
gtk-win32-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
$(CC) $(CFLAGS) -LD -Fegtk-win32-$(GTK_VER).dll $(gtk_OBJECTS) $(GDK_LIBS) $(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) -GD -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" $<
#
# Test programs:
#
testcalendar.exe : gtk-win32-$(GTK_VER).dll testcalendar.obj
$(CC) $(CFLAGS) testcalendar.obj $(GTK_LIBS) $(GDK_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
# Must have separate rules for these objects that don't go in the DLL
testcalendar.obj : testcalendar.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testcalendar\" testcalendar.c
testdnd.exe : gtk-win32-$(GTK_VER).dll testdnd.obj
$(CC) $(CFLAGS) testdnd.obj $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testdnd.obj : testdnd.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testdnd\" testdnd.c
testgtk.exe : gtk-win32-$(GTK_VER).dll testgtk.obj
$(CC) $(CFLAGS) testgtk.obj $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LDFLAGS)
testgtk.obj : testgtk.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testgtk\" testgtk.c
testinput.exe : gtk-win32-$(GTK_VER).dll testinput.obj
$(CC) $(CFLAGS) testinput.obj $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testinput.obj : testinput.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testinput\" testinput.c
testrgb.exe : gtk-win32-$(GTK_VER).dll testrgb.obj
$(CC) $(CFLAGS) testrgb.obj $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testrgb.obj : testrgb.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testrgb\" testrgb.c
testselection.exe : gtk-win32-$(GTK_VER).dll testselection.obj
$(CC) $(CFLAGS) testselection.obj $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testselection.obj : testselection.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testselection\" testselection.c
testtext.exe : gtk-win32-$(GTK_VER).dll testtext.obj
$(CC) $(CFLAGS) testtext.obj $(PANGO_LIBS) $(GDK_PIXBUF_LIBS) $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testtext.obj : testtext.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testtext\" testtext.c
testtextbuffer.exe : gtk-win32-$(GTK_VER).dll testtextbuffer.obj
$(CC) $(CFLAGS) testtextbuffer.obj $(GDK_PIXBUF_LIBS) $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
testtextbuffer.obj : testtextbuffer.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testtextbuffer\" testtextbuffer.c
testthreads.exe : gtk-win32-$(GTK_VER).dll testthreads.obj
$(CC) $(CFLAGS) testthreads.obj $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(PTHREAD_LIBS) $(LDFLAGS)
testthreads.obj : testthreads.c
$(CC) $(CFLAGS) $(PTHREAD_CFLAGS) -c -DG_LOG_DOMAIN=\"testthreads\" -DUSE_PTHREADS=1 testthreads.c
simple.exe : gtk-win32-$(GTK_VER).dll simple.obj
$(CC) $(CFLAGS) simple.obj $(GTK_LIBS) $(GDK_LIBS) $(GLIB_LIBS) $(LDFLAGS)
simple.obj : simple.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"simple\" simple.c
$(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)
makefile.msc: makefile.msc.in
sed -e s,@GTK[_]MAJOR_VERSION@,@GTK_MAJOR_VERSION@, \
-e s,@GTK[_]MINOR_VERSION@,@GTK_MINOR_VERSION@, \
-e 's,@GTK[_]VERSION@,@GTK_VERSION@,' \
-e 's,@GDK_PIXBUF[_]MAJOR@,@GDK_PIXBUF_MAJOR@,' \
-e 's,@GDK_PIXBUF[_]MINOR@,@GDK_PIXBUF_MINOR@,' <makefile.msc.in >$@
|