]> Pileus Git - ~andy/gtk/blob - gdk/makefile.msc
Add gdkkeys.
[~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         gdkkeys.obj \
60         gdkkeyuni.obj \
61         gdkpango.obj \
62         gdkpixmap.obj \
63         gdkregion-generic.obj \
64         gdkpixbuf-render.obj \
65         gdkpolyreg-generic.obj \
66         gdkrgb.obj \
67         gdkrectangle.obj \
68         gdkwindow.obj
69
70 ..\config.h : ..\config.h.win32
71         copy ..\config.h.win32 ..\config.h
72
73 gdkconfig.h : gdkconfig.h.win32
74         copy gdkconfig.h.win32 gdkconfig.h
75
76 gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32\gdk-win32.lib
77         $(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
78
79 testgdk.exe : gdk-$(GTK_VER).dll testgdk.obj
80         $(CC) -Fetestgdk.exe testgdk.obj gdk-$(GTK_VER).lib $(EXTRALIBS) $(LDFLAGS)
81
82 .c.obj :
83         $(CC) $(CFLAGS) -GD -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
84
85 clean:
86         del *.dll
87         del *.obj
88         del *.lib
89         del *.err
90         del *.res