]> Pileus Git - ~andy/gtk/blob - gdk/makefile.msc
Update.
[~andy/gtk] / gdk / makefile.msc
1 ## Makefile for building the GDK DLL with Microsoft C
2 ## Use: nmake -f makefile.msc
3
4 ## You must first build the Win32-dependent sources in the win32 subdirectory.
5
6 ## There is no install target, you have to decide where and 
7 ## how to install for yourself.
8
9 TOP = ../..
10 !INCLUDE $(TOP)/build/win32/make.msc
11
12 # Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
13 # definition should possibly go to build/win32/module.def, too.
14 WTKIT = ..\..\wtkit126
15
16 ###############################################################
17
18 # Nothing much configurable below
19
20 !IFNDEF DEBUG
21 # Full optimization:
22 OPTIMIZE = -Ox -MD -Zi
23 LINKDEBUG = /nodefaultlib:libc.lib
24 !ELSE
25 # Debugging:
26 OPTIMIZE = -Zi -MDd
27 LINKDEBUG = /nodefaultlib:libcd.lib /nodefaultlib:libc.lib /debug
28 !ENDIF
29
30 # cl -? describes the options
31 CC = cl -G5 -GF $(OPTIMIZE) -W3 -nologo
32
33 LDFLAGS = /link $(LINKDEBUG)
34
35 # overwrite version?
36 GTK_VER=1.3
37
38 CFLAGS = -I . -I .. $(GLIB_CFLAGS) $(PANGO_CFLAGS) -I ../gdk-pixbuf \
39                 -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
40 EXTRALIBS = $(WTKIT)\lib\i386\wntab32x.lib $(GLIB_LIBS) \
41                 ..\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib $(PANGOWIN32_LIBS)
42
43 all: \
44         ..\config.h \
45         gdkconfig.h \
46         gdk-$(GTK_VER).dll \
47         testgdk.exe
48
49 gdk_OBJECTS = \
50         gdk.obj \
51         gdkcolor.obj \
52         gdkcursor.obj \
53         gdkdraw.obj \
54         gdkevents.obj \
55         gdkfont.obj \
56         gdkgc.obj \
57         gdkglobals.obj \
58         gdkimage.obj \
59         gdkkeyuni.obj \
60         gdkpango.obj \
61         gdkpixmap.obj \
62         gdkregion-generic.obj \
63         gdkpixbuf-render.obj \
64         gdkpolyreg-generic.obj \
65         gdkrgb.obj \
66         gdkrectangle.obj \
67         gdkwindow.obj
68
69 ..\config.h : ..\config.h.win32
70         copy ..\config.h.win32 ..\config.h
71
72 gdkconfig.h : gdkconfig.h.win32
73         copy gdkconfig.h.win32 gdkconfig.h
74
75 gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32\gdk-win32.lib
76         $(CC) $(CFLAGS) -LD -Fegdk-$(GTK_VER).dll $(gdk_OBJECTS) win32\gdk-win32.lib $(EXTRALIBS) gdi32.lib user32.lib imm32.lib shell32.lib ole32.lib uuid.lib win32\gdk.res $(LDFLAGS) /def:gdk.def
77
78 testgdk.exe : gdk-$(GTK_VER).dll testgdk.obj
79         $(CC) -Fetestgdk.exe testgdk.obj gdk-$(GTK_VER).lib $(EXTRALIBS) $(LDFLAGS)
80
81 .c.obj :
82         $(CC) $(CFLAGS) -GD -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
83
84 clean:
85         del *.dll
86         del *.obj
87         del *.lib
88         del *.err
89         del *.res