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 # Line number debug info only
21 DEBUGINFO = -Zi -DG_ENABLE_DEBUG=1
22 LINKDEBUG = /debug /nodefaultlib:msvcrt.lib
25 LDFLAGS = /link /machine:ix86 $(LINKDEBUG)
31 # paths and version numbers
35 # CFLAGS and LIBS for the packages in module.defs.
36 # In alphabetical order.
38 # Note that these CFLAGS and LIBS refer to stuff in "source"
39 # directories. This is for historical reasons, and only useable if you
40 # have the GLib, Pango, etc sources. If you use the prebuilt developer
41 # packages, you should fix these to instead refer to the place where
42 # you unzipped the developer packages. Easiest of all, run pkg-config
43 # --cflags gtk+-2.0 (for instance), and paste its output as the
44 # definition of GTK2_CFLAGS. Etc.
46 ATK_CFLAGS = -I $(ATK)
47 ATK_LIBS = $(ATK)\atk\atk-$(ATK_VER).lib
49 CAIRO_CFLAGS = -I $(CAIRO)\cairo\src -I $(CAIRO)\libpixman\src -I $(CAIRO) $(FONTCONFIG_CFLAGS) $(FREETYPE2_CFLAGS)
50 CAIRO_LIBS = $(CAIRO)\cairo\src\libcairo-$(CAIRO_VER).lib
52 DIRENT_CFLAGS = -I $(GLIB)\build\win32\dirent
53 DIRENT_LIBS = $(GLIB)\build\win32\dirent\dirent.lib
55 # Don't know if Freetype2, FriBiDi and some others actually can be
56 # built with MSVC, but one can produce an import library even if the
57 # DLL was built with gcc.
59 FREETYPE2_CFLAGS = -I $(FREETYPE2)\include
60 FREETYPE2_LIBS = $(FREETYPE2)\obj\freetype-$(FREETYPE2_VER).lib
62 GDK_PIXBUF_CFLAGS = -I $(GDK_PIXBUF)
63 GDK_PIXBUF_LIBS = $(GTK2)\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib
65 GIMP_CFLAGS = -I $(GIMP)
66 GIMP_PLUGIN_LIBS = $(GIMP)\libgimp\gimp-$(GIMP_VER).lib $(GIMP)\libgimp\gimpui-$(GIMP_VER).lib
68 # overide definition to use it as callable path
71 GLIB_CFLAGS = -I $(GLIB) -I $(GLIB)\glib -I $(GLIB)\gmodule $(INTL_CFLAGS)
72 GLIB_LIBS = $(GLIB)\glib\glib-$(GLIB_VER).lib $(GLIB)\gmodule\gmodule-$(GLIB_VER).lib $(GLIB)\gobject\gobject-$(GLIB_VER).lib
73 GTHREAD_LIBS = $(GLIB)\gthread\gthread-$(GLIB_VER).lib
75 GNOMECANVAS_CFLAGS = -I $(GNOMECANVAS)
76 GNOMECANVAS_LIBS = $(GNOMECANVAS)\libgnomecanvas\libgnomecanvas-$(GNOMECANVAS_VER).lib
78 GNOMEPRINT_CFLAGS = -I $(GNOMEPRINT)
79 GNOMEPRINT_LIBS = $(GNOMEPRINT)\libgnomeprint\gnome-print-$(GNOMEPRINT_VER).lib
81 GNOMEPRINTUI_CFLAGS = -I $(GNOMEPRINTUI)
82 GNOMEPRINTUI_LIBS = $(GNOMEPRINTUI)\libgnomeprintui\gnome-printui-$(GNOMEPRINTUI_VER).lib
84 GTK_CFLAGS = -I$(GTK)\gdk -I$(GTK)\gdk -I$(GTK)
85 GTK_LIBS = $(GTK)\gtk\gtk.lib $(GTK)\gdk\gdk.lib
87 GTK2_CFLAGS = $(GLIB_CFLAGS) $(ATK_CFLAGS) -I$(GTK2)\gdk -I$(GTK2)\gdk -I$(GTK2) -I$(PANGO) -I$(ATK)
88 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)
90 GTKGLAREA_CFLAGS = -I $(GTKGLAREA)
91 GTKGLAREA_CFLAGS = -I $(GTKGLAREA)
92 GTKGLAREA_LIBS = $(GTKGLAREA)\gtkgl\gtkgl-$(GTKGLAREA_VER).lib
94 LIBART_CFLAGS = -I$(LIBART)\.. -FIlibart_lgpl/art_config.h
95 LIBART_LIBS = $(LIBART)\libart.lib
97 INTL_CFLAGS = -I $(INTL)
98 INTL_LIBS = $(INTL)\intl.lib
100 LIBICONV_CFLAGS = -I $(LIBICONV)\include
101 LIBICONV_LIBS = $(LIBICONV)\lib\iconv.lib
103 LIBXML_CFLAGS = -I $(LIBXML)
104 LIBXML_LIBS = $(LIBXML)\xml-$(LIBXML_VER).lib
106 LIBXML2_CFLAGS = $(LIBICONV_CFLAGS) -I $(LIBXML2)\include
107 LIBXML2_LIBS = $(LIBXML2)\libxml2.lib
109 LIBXSLT_CFLAGS = -I $(LIBXSLT)
110 LIBXSLT_LIBS = $(LIBXSLT)\libxslt\libxslt.lib
112 JPEG_CFLAGS = -I $(JPEG)
113 JPEG_LIBS = $(JPEG)\libjpeg.lib
115 OPENGL_CFLAGS = # None needed, headers bundled with the compiler
116 OPENGL_LIBS = opengl32.lib lglu32.lib
118 PANGO_CFLAGS = -I $(PANGO)
119 PANGO_LIBS = $(PANGO)\pango\pango-$(PANGO_VER).lib
120 PANGOWIN32_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangowin32-$(PANGO_VER).lib
121 PANGOFT2_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangoft2-$(PANGO_VER).lib
123 PNG_CFLAGS = -I $(PNG) $(ZLIB_CFLAGS)
124 PNG_LIBS = $(PNG)\png.lib $(ZLIB_LIBS)
126 RSVG_CFLAGS = -I $(RSVG)\..
127 RSVG_LIBS = $(RSVG)\librsvg-$(RSVG_VER).lib
129 SVG_CFLAGS = -I $(SVG)\src
130 SVG_LIBS = $(SVG)\src\libsvg-$(SVG_VER).lib
132 TIFF_CFLAGS = -I $(TIFF)\libtiff
133 # Use single import library for both libtiff DLL versions (with or
134 # without LZW code). The user selects which DLL to use.
135 TIFF_NOLZW_LIBS = $(TIFF)\libtiff\tiff.lib $(JPEG_LIBS) $(ZLIB_LIBS) user32.lib
136 TIFF_LZW_LIBS = $(TIFF_NOLZW_LIBS)
137 TIFF_LIBS = $(TIFF_NOLZW_LIBS)
139 ZLIB_CFLAGS = -I $(ZLIB)
140 ZLIB_LIBS = $(ZLIB)\zlib.lib
146 CC = $(CCOMPILER) -G5 -GF $(CRUNTIME) -W3 -nologo
149 # The including makefile should define INCLUDES, DEFINES and
150 # DEPCFLAGS. INCLUDES are the includes related to the module being
151 # built. DEFINES similarly. DEPCFLAGS should be set to a set of
152 # GLIB_CFLAGS, GTK_CFLAGS etc corresponding to what other modules we
155 CFLAGS = $(OPTIMIZE) $(DEBUGINFO) $(INCLUDES) $(DEFINES) $(DEPCFLAGS)
158 $(CC) $(CFLAGS) -E $< >$@
160 # The default target should be "all"
180 # Needed by hacker rule to make makefile.msc from makefile.msc.in:
181 SED = e:\cygwin\bin\sed