]> Pileus Git - ~andy/gtk/blob - gdk/win32/makefile.msc
Copy our gdkprivate.h and gdkx.h to a gdk subdirectory, so that
[~andy/gtk] / gdk / win32 / makefile.msc
1 ## Makefile for building the GDK DLL with Microsoft C
2 ## Use: nmake -f makefile.msc
3
4 # Change this to wherever you want to install the DLLs. This directory
5 # should be in your PATH.
6 BIN = C:\bin
7
8 # Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
9 WTKIT = ..\..\..\wtkit126
10
11 # Full optimization:
12 OPTIMIZE = -Ox
13 # Debugging:
14 #OPTIMIZE = -Zi
15
16 ################################################################
17
18 # Nothing much configurable below
19
20 # cl -? describes the options
21 CC = cl -G5 -GF $(OPTIMIZE) -W3 -MD -nologo
22
23 LDFLAGS = /link /machine:ix86 # /debug
24 INSTALL = copy
25 TOUCH = copy makefile.msc+nul
26
27 GLIB_VER=1.3
28 GTK_VER=1.3
29
30 GLIB = ..\..\..\glib
31 CFLAGS = -I. -I..\.. -I$(WTKIT)\include -I$(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
32
33 all: \
34         gdk\gdkprivate.h \
35         gdk\gdkx.h      \
36         ..\..\config.h  \
37         gdk-$(GTK_VER).dll
38         $(TOUCH) all
39
40 install : all
41         $(INSTALL) gdk-$(GTK_VER).dll $(BIN)
42         $(TOUCH) install
43
44 gdk_OBJECTS = \
45         gdk.obj         \
46         gdkcc.obj       \
47         gdkcolor.obj    \
48         gdkcursor.obj   \
49         gdkdnd.obj      \
50         gdkdraw.obj     \
51         gdkevents.obj   \
52         gdkfont.obj     \
53         gdkgc.obj       \
54         gdkglobals.obj  \
55         gdkim.obj       \
56         gdkimage.obj    \
57         gdkinput.obj    \
58         gdkpixmap.obj   \
59         gdkproperty.obj \
60         gdkrgb.obj      \
61         gdkrectangle.obj\
62         gdkregion.obj   \
63         gdkselection.obj\
64         gdkvisual.obj   \
65         gdkwindow.obj   \
66         gdkxid.obj
67
68 # We must have copies of gdkx.h and gdkprivate.h in the gdk
69 # subdirectory, so that application sources which want to be
70 # compilable with both GTk+ 1.2 (where there are no separate backend
71 # gdk directories) and this 1.3 version (where the Win32 backend is in
72 # the directory of *this* file you are reading right now) can use
73 # #include <gdk/gdkprivate.h>.
74
75 # Applications that depend on GTk+ 1.3 or later should include
76 # gdkprivate.h and gdkx.h without the gdk/ prefix. The CFLAGS should
77 # include an -I switch pointing to the backend-specific directory
78 # (*this* directory in the Win32 case).
79
80 gdk\gdkprivate.h : gdkprivate.h
81         -md gdk
82         copy gdkprivate.h gdk
83
84 gdk\gdkx.h : gdkx.h
85         -md gdk
86         copy gdkx.h gdk
87
88 ..\..\config.h : ..\..\config.h.win32
89         copy ..\..\config.h.win32 ..\..\config.h
90
91 gdk.res : rc\gdk.rc
92         rc -r -fo gdk.res rc\gdk.rc
93
94 gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def gdk.res
95         $(CC) $(CFLAGS) -LD -Fegdk-$(GTK_VER).dll $(gdk_OBJECTS) $(GLIB)\glib-$(GLIB_VER).lib gdi32.lib user32.lib shell32.lib ole32.lib uuid.lib $(WTKIT)\lib\i386\wntab32x.lib $(LDFLAGS) gdk.res /def:gdk.def
96
97 .c.obj :
98         $(CC) $(CFLAGS) -GD -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
99
100 gdkrgb.c : ..\gdkrgb.c
101         copy ..\gdkrgb.c .
102
103 gdkrectangle.c : ..\gdkrectangle.c
104         copy ..\gdkrectangle.c .
105
106
107 testgdk.exe : testgdk.obj gdk-$(GTK_VER).dll
108         $(CC) $(CFLAGS) testgdk.obj gdk-$(GTK_VER).lib $(GLIB)\glib-$(GLIB_VER).lib $(LDFLAGS)
109
110 testgdk.obj : testgdk.c
111         $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testgdk\" testgdk.c
112
113 clean:
114         del *.exe
115         del *.obj
116         del *.dll
117         del *.lib
118         del *.exp
119         del *.err
120         del *.map
121         del *.sym
122         del *.lk1
123         del *.mk1
124         del *.res
125         del *.pdb
126         del *.ilk