]> Pileus Git - ~andy/gtk/blob - gdk/makefile.msc
API: Remove all GdkRegion API
[~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)/glib/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 !IFNDEF WTKIT
15 WTKIT = $(TOP)\wtkit126
16 !ENDIF
17
18 ###############################################################
19
20 # Nothing much configurable below
21 # overwrite version?
22 GTK_VER=2.0
23 GDK_PIXBUF_VER=$(GTK_VER)
24
25 !IFNDEF PERL
26 PERL = perl
27 !ENDIF
28
29 INCLUDES = -FImsvc_recommended_pragmas.h \
30         -I . -I .. \
31         $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(CAIRO_CFLAGS) -I ../gdk-pixbuf \
32
33 DEFINES = \
34         -DHAVE_CONFIG_H -DGDK_ENABLE_BROKEN \
35         -DGDK_VERSION=\"$(GTK_VER)\" \
36         -DG_LOG_DOMAIN=\"Gdk\" \
37         -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\"
38
39 EXTRALIBS = \
40         $(WTKIT)\lib\i386\wntab32x.lib \
41         $(GLIB_LIBS) \
42         ..\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib \
43         $(PANGOWIN32_LIBS) $(PANGOCAIRO_LIBS) $(INTL_LIBS) $(CAIRO_LIBS) \
44         $(PANGOCAIRO_LIBS)
45
46 gdk-win32-backend :
47         cd win32
48         nmake -nologo -f makefile.msc
49         cd ..
50         
51 all: \
52         ..\config.h \
53         gdkconfig.h \
54         gdkalias.h \
55         gdkaliasdef.c \
56         gdkenumtypes.h \
57         gdkenumtypes.c \
58         gdkmarshalers.h \
59         gdkmarshalers.c \
60         gdk-win32-backend \
61         libgdk-win32-$(GTK_VER)-0.dll \
62         testgdk.exe \
63         gdk-win32-$(GTK_VER)s.lib \
64 #       gdk-x11-$(GTK_VER).dll \
65
66 gdk_OBJECTS = \
67         gdk.obj \
68         gdkapplaunchcontext.obj \
69         gdkcairo.obj \
70         gdkcolor.obj \
71         gdkcursor.obj \
72         gdkdisplay.obj \
73         gdkdisplaymanager.obj \
74         gdkdnd.obj \
75         gdkdraw.obj \
76         gdkenumtypes.obj \
77         gdkevents.obj \
78         gdkgc.obj \
79         gdkglobals.obj \
80         gdkimage.obj \
81         gdkwindowimpl.obj \
82         gdkkeynames.obj \
83         gdkkeys.obj \
84         gdkkeyuni.obj \
85         gdkmarshalers.obj \
86         gdkoffscreenwindow.obj \
87         gdkpango.obj \
88         gdkpixbuf-drawable.obj \
89         gdkpixbuf-render.obj \
90         gdkpixmap.obj \
91         gdkrectangle.obj \
92         gdkrgb.obj \
93         gdkscreen.obj \
94         gdkselection.obj \
95         gdkvisual.obj \
96         gdkwindow.obj
97
98 gdk_public_h_sources = \
99         gdk.h           \
100         gdkcolor.h      \
101         gdkcursor.h     \
102         gdkdnd.h        \
103         gdkdrawable.h   \
104         gdkevents.h     \
105         gdkgc.h         \
106         gdkkeysyms.h    \
107         gdkimage.h      \
108         gdkinput.h      \
109         gdkkeys.h       \
110         gdkpango.h      \
111         gdkpixbuf.h     \
112         gdkpixmap.h     \
113         gdkproperty.h   \
114         gdkrgb.h        \
115         gdkselection.h  \
116         gdktypes.h      \
117         gdkvisual.h     \
118         gdkwindow.h     \
119
120 # private marshalers
121 gdkmarshalers.h : gdkmarshalers.list
122         $(GLIB)\gobject\glib-genmarshal --prefix=_gdk_marshal gdkmarshalers.list --header >>gdkmarshalers.h
123
124 gdkmarshalers.c : gdkmarshalers.list
125         $(GLIB)\gobject\glib-genmarshal --prefix=_gdk_marshal gdkmarshalers.list --body >gdkmarshalers.c
126
127 gdkenumtypes.h: $(gdk_public_h_sources) gdkenumtypes.h.template
128         $(PERL) $(GLIB)\gobject\glib-mkenums --template gdkenumtypes.h.template \
129                 $(gdk_public_h_sources) > gdkenumtypes.h
130
131 gdkenumtypes.c: $(gdk_public_h_sources) gdkenumtypes.c.template
132         $(PERL) $(GLIB)\gobject\glib-mkenums --template gdkenumtypes.c.template \
133                 $(gdk_public_h_sources) > gdkenumtypes.c
134
135 ..\config.h : ..\config.h.win32
136         copy ..\config.h.win32 ..\config.h
137
138 gdkconfig.h : gdkconfig.h.win32
139         copy gdkconfig.h.win32 gdkconfig.h
140
141 gdkalias.h: gdk.symbols
142         perl makegdkalias.pl < gdk.symbols > gdkalias.h
143
144 gdkaliasdef.c: gdk.symbols
145          perl makegdkalias.pl -def < gdk.symbols > gdkaliasdef.c
146
147 gdk.def: gdk.symbols
148         echo EXPORTS > gdk.def
149         cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DGDK_WINDOWING_WIN32 -DALL_FILES \
150                 -DG_GNUC_CONST= \
151                 gdk.symbols >> gdk.def
152
153 libgdk-win32-$(GTK_VER)-0.dll : $(gdk_OBJECTS) gdk.def win32\gdk-win32.lib
154         $(CC) $(CFLAGS) -LD -Fe$@ $(gdk_OBJECTS) win32\gdk-win32.lib $(EXTRALIBS) \
155         gdi32.lib user32.lib imm32.lib shell32.lib ole32.lib uuid.lib win32\gdk.res \
156         $(LDFLAGS) /implib:gdk-win32-$(GTK_VER).lib /def:gdk.def
157
158 gdk-win32-$(GTK_VER)s.lib : $(gdk_OBJECTS)
159         lib /out:gdk-win32-$(GTK_VER)s.lib $(gdk_OBJECTS) win32\gdk-win32.lib
160
161 gdk-x11-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def x11\gdk-x11.lib
162         $(CC) $(CFLAGS) -LD -Fegdk-x11-$(GTK_VER).dll $(gdk_OBJECTS) \
163         $(PANGO)\pango\pangox-$(PANGO_VER).lib \
164         x11\gdk-x11.lib $(X11_LIBS) $(EXTRALIBS) user32.lib $(LDFLAGS) /def:gdk.def
165
166 testgdk.exe : libgdk-win32-$(GTK_VER)-0.dll testgdk.obj
167         $(CC) -Fetestgdk.exe testgdk.obj gdk-win32-$(GTK_VER).lib $(EXTRALIBS) $(LDFLAGS)
168
169 clean::
170         cd win32
171         nmake -f makefile.msc clean
172         cd ..
173         del gdkmarshalers.c
174         del gdkmarshalers.h
175         del *.dll
176         del *.obj
177         del *.lib
178         del *.err
179         del *.res