1 # Note that this file is hardly maintained, hardly usable without
2 # manual editing, and not really part of a recommended way to build
3 # GLib and related software with Microsoft's compilers. Only a few
4 # persons use a build setup that involves this file.
6 # Common makefile definitions for building GLib, GTk+, and various
7 # software that use these libraries with msvc on Win32
9 # Debug builds shoud link with msvcrtd release build with msvcrt.
14 OPTIMIZE = -Zi -DG_ENABLE_DEBUG=1
21 DEBUGINFO = -Zi -DG_ENABLE_DEBUG=1
22 LINKDEBUG = /debug /nodefaultlib:msvcrt.lib
25 LDFLAGS = /link /machine:ix86 $(LINKDEBUG)
35 XSLTPROC = d:\gnome-0\xsltproc
37 # paths and version numbers
38 !INCLUDE $(TOP)\glib\build\win32\module.defs
41 # CFLAGS and LIBS for the packages in module.defs.
42 # In alphabetical order.
44 # Note that these CFLAGS and LIBS refer to stuff in "source"
45 # directories. This is for historical reasons, and only useable if you
46 # have the GLib, Pango, etc sources. If you use the prebuilt developer
47 # packages, you should fix these to instead refer to the place where
48 # you unzipped the developer packages. Easiest of all, run pkg-config
49 # --cflags gtk+-2.0 (for instance), and paste its output as the
50 # definition of GTK2_CFLAGS. Etc.
52 ATK_CFLAGS = -I $(ATK)
53 ATK_LIBS = $(ATK)\atk\atk-$(ATK_VER).lib
54 BABL_CFLAGS = -I $(BABL)
55 BABL_LIBS = $(BABL)\babl\babl-1.0.lib
57 # force inclusion of the _right_ cairoversion.h even when using without installation
58 CAIRO_CFLAGS = -FI $(CAIRO)\cairo-version.h -I $(CAIRO)\src -I $(CAIRO)
59 CAIRO_LIBS = $(CAIRO)\src\libcairo.lib
61 DIRENT_CFLAGS = -I $(GLIB)\build\win32\dirent
62 DIRENT_LIBS = $(GLIB)\build\win32\dirent\dirent.lib
65 EXIF_CFLAGS = -I $(DEVTOP)\include
66 EXIF_LIBS = $(DEVTOP)\lib\exif.lib
70 # Don't know if Freetype2, FriBiDi and some others actually can be
71 # built with MSVC, but one can produce an import library even if the
72 # DLL was built with gcc.
74 FREETYPE2_CFLAGS = -I $(FREETYPE2)\include
75 FREETYPE2_LIBS = $(FREETYPE2)\obj\freetype-$(FREETYPE2_VER).lib
77 FREETYPE2_CFLAGS = -I $(DEVTOP)\include -I $(DEVTOP)\include\freetype2
78 FREETYPE2_LIBS = $(DEVTOP)\lib\freetype6.lib
82 FONTCONFIG_CFLAGS = -I $(DEVTOP)\include
83 FONTCONFIG_LIBS = $(DEVTOP)\lib\fontconfig.lib
86 GDK_PIXBUF_CFLAGS = -I $(GDK_PIXBUF)
87 GDK_PIXBUF_LIBS = $(GTK2)\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib
89 GIMP_CFLAGS = -I $(GIMP)
90 GIMP_PLUGIN_LIBS = $(GIMP)\libgimp\gimp-$(GIMP_VER).lib $(GIMP)\libgimp\gimpui-$(GIMP_VER).lib
92 # overide definition to use it as callable path
95 GLIB_CFLAGS = -I $(GLIB) -I $(GLIB)\glib -I $(GLIB)\gmodule $(INTL_CFLAGS)
96 GLIB_LIBS = $(GLIB)\glib\glib-$(GLIB_VER).lib $(GLIB)\gmodule\gmodule-$(GLIB_VER).lib $(GLIB)\gobject\gobject-$(GLIB_VER).lib $(GLIB)\gio\gio-$(GLIB_VER).lib
97 GTHREAD_LIBS = $(GLIB)\gthread\gthread-$(GLIB_VER).lib
100 GDK_PIXBUF_CFLAGS = $(GTK2_CFLAGS)
101 GDK_PIXBUF_LIBS = $(GTK2_LIBS)
104 GNOMECANVAS_CFLAGS = -I $(GNOMECANVAS)
105 GNOMECANVAS_LIBS = $(GNOMECANVAS)\libgnomecanvas\libgnomecanvas-$(GNOMECANVAS_VER).lib
107 GNOMEPRINT_CFLAGS = -I $(GNOMEPRINT)
108 GNOMEPRINT_LIBS = $(GNOMEPRINT)\libgnomeprint\gnome-print-$(GNOMEPRINT_VER).lib
110 GNOMEPRINTUI_CFLAGS = -I $(GNOMEPRINTUI)
111 GNOMEPRINTUI_LIBS = $(GNOMEPRINTUI)\libgnomeprintui\gnome-printui-$(GNOMEPRINTUI_VER).lib
113 GTK_CFLAGS = -I$(GTK)\gdk -I$(GTK)\gdk -I$(GTK)
114 GTK_LIBS = $(GTK)\gtk\gtk.lib $(GTK)\gdk\gdk.lib
116 GTK2_CFLAGS = $(GLIB_CFLAGS) $(ATK_CFLAGS) -I$(GTK2)\gdk -I$(GTK2)\gdk -I$(GTK2) -I$(PANGO) -I$(ATK) $(CAIRO_CFLAGS)
117 GTK2_LIBS = $(GTK2)\gtk\gtk-win32-$(GTK2_VER).lib $(GTK2)\gdk\gdk-win32-$(GTK2_VER).lib $(GTK2)\gdk-pixbuf\gdk_pixbuf-$(GTK2_VER).lib $(PANGO_LIBS)
119 GTKGLAREA_CFLAGS = -I $(GTKGLAREA)
120 GTKGLAREA_LIBS = $(GTKGLAREA)\gtkgl\gtkgl-$(GTKGLAREA_VER).lib
122 GTKSOURCEVIEW_CFLAGS = -I $(GTKSOURCEVIEW)
123 GTKSOURCEVIEW_LIBS = $(GTKSOURCEVIEW)\gtksourceview\gtksourceview.lib
125 LIBART_CFLAGS = -I$(LIBART)\.. -FIlibart_lgpl/art_config.h
126 LIBART_LIBS = $(LIBART)\art_lgpl_2.lib
129 INTL_CFLAGS = -I $(DEVTOP)\include
130 INTL_LIBS = $(DEVTOP)\lib\intl.lib
132 INTL_CFLAGS = -I $(INTL)
133 INTL_LIBS = $(INTL)\intl.lib
137 LCMS_CFLAGS = -DLCMS_DLL -I $(LCMS)\include
138 LCMS_LIBS = $(LCMS)\Projects\VC6\Release\lcms.lib
141 LIBICONV_CFLAGS = -I $(LIBICONV)\include
142 LIBICONV_LIBS = $(LIBICONV)\lib\iconv.lib
144 LIBXML_CFLAGS = -I $(LIBXML)
145 LIBXML_LIBS = $(LIBXML)\xml-$(LIBXML_VER).lib
147 LIBXML2_CFLAGS = $(LIBICONV_CFLAGS) -I $(LIBXML2)\include
148 LIBXML2_LIBS = $(LIBXML2)\libxml2.lib
150 LIBXSLT_CFLAGS = -I $(LIBXSLT)
151 LIBXSLT_LIBS = $(LIBXSLT)\libxslt\libxslt.lib
153 LCMS_CFLAGS = -I $(LCMS)\include -DLCMS_DLL
154 LCMS_LIBS = $(LCMS)\Projects\VC6\Release\lcms.lib
157 JPEG_CFLAGS = -I $(DEVTOP)\include
158 JPEG_LIBS = $(DEVTOP)\lib\jpeg.lib
160 JPEG_CFLAGS = -I $(JPEG)
161 JPEG_LIBS = $(JPEG)\libjpeg.lib
164 OPENGL_CFLAGS = # None needed, headers bundled with the compiler
165 OPENGL_LIBS = opengl32.lib lglu32.lib
167 PANGO_CFLAGS = -I $(PANGO)
168 PANGO_LIBS = $(PANGO)\pango\pango-$(PANGO_VER).lib
169 PANGOCAIRO_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangocairo-$(PANGO_VER).lib
170 PANGOWIN32_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangowin32-$(PANGO_VER).lib
171 PANGOFT2_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangoft2-$(PANGO_VER).lib
174 PNG_CFLAGS = -I $(PNG) $(ZLIB_CFLAGS)
175 PNG_LIBS = $(PNG)\projects\visualc6\Win32_LIB_Release\libpng.lib $(ZLIB_LIBS)
177 PNG_CFLAGS = -I $(DEVTOP)\include $(ZLIB_CFLAGS)
178 PNG_LIBS = $(DEVTOP)\lib\libpng.lib $(ZLIB_LIBS)
181 RSVG_CFLAGS = -I $(RSVG)\..
182 RSVG_LIBS = $(RSVG)\librsvg-2.lib
184 SVG_CFLAGS = -I $(SVG)\src
185 SVG_LIBS = $(SVG)\src\libsvg-$(SVG_VER).lib
188 TIFF_CFLAGS = -I $(TIFF)\libtiff
189 # Use single import library for both libtiff DLL versions (with or
190 # without LZW code). The user selects which DLL to use.
191 TIFF_LIBS = $(TIFF)\libtiff\libtiff.lib $(JPEG_LIBS) $(ZLIB_LIBS) user32.lib
193 TIFF_CFLAGS = -I $(DEVTOP)\include
194 TIFF_LIBS = $(DEVTOP)\lib\libtiff.lib
197 VIPS_CFLAGS = -I $(VIPS)/include
198 VIPS_LIBS = $(VIPS)/libsrc/vips.lib
201 ZLIB_CFLAGS = -I $(ZLIB)
202 ZLIB_LIBS = $(ZLIB)\projects\visualc6\Win32_LIB_Release\zlib.lib
204 ZLIB_CFLAGS = -I $(DEVTOP)\include
205 ZLIB_LIBS = $(DEVTOP)\lib\zdll.lib
212 CC = $(CCOMPILER) $(OPTIMIZE) $(CRUNTIME) -W3 -nologo
215 # The including makefile should define INCLUDES, DEFINES and
216 # DEPCFLAGS. INCLUDES are the includes related to the module being
217 # built. DEFINES similarly. DEPCFLAGS should be set to a set of
218 # GLIB_CFLAGS, GTK_CFLAGS etc corresponding to what other modules we
221 CFLAGS = $(OPTIMIZE) $(DEBUGINFO) $(INCLUDES) $(DEFINES) $(DEPCFLAGS)
222 # make cl/wcl386 compatible (c99 and cdecl)
224 #CFLAGS = /passwopts:-za99 /passwopts:-ecc $(DEBUGINFO) $(INCLUDES) $(DEFINES) $(DEPCFLAGS)
226 $(CC) $(CFLAGS) -E $< >$@
228 # The default target should be "all"
233 -del *.obj *.res *.i *.exe *.dll *.lib *.err *.map *.exp *.lk1 *.mk1 *.ilk *.manifest
236 # Needed by hacker rule to make makefile.msc from makefile.msc.in:
237 SED = e:\cygwin\bin\sed