home *** CD-ROM | disk | FTP | other *** search
- # Common makefile definitions for building GLib, GTk+, and various
- # software that use these libraries with msvc on Win32
-
- # For more detailed information see make.mingw in this same directory
-
- # Some libraries have headers that can't be used from the source directories,
- # we have to "install" them. USRDIR is a directory where we have an "include"
- # subdirectory for headers.
- USRDIR = c:\install
-
- # Debug builds shoud link with msvcrtd release build with msvcrt.
- !IFNDEF DEBUG
- # Full optimization:
- OPTIMIZE = -Ox
- CRUNTIME = -MD
- LINKDEBUG =
- !ELSE
- # Debugging:
- OPTIMIZE = -Zi
- CRUNTIME = -MDd
- LINKDEBUG = /debug
- !ENDIF
-
- LDFLAGS = /link $(LINKDEBUG)
-
- !IFNDEF TOP
- TOP = ..
- !ENDIF
-
- # paths and version numbers
- !INCLUDE module.defs
-
- ################
- # CFLAGS and LIBS for the packages in module.defs.
- # In alphabetical order.
-
- # Don't know if Freetype2, FriBiDi and some others actually can be
- # built with MSVC, but one can produce an import library even if the
- # library was built with gcc (if it's a DLL).
-
- FREETYPE2_CFLAGS = -I $(FREETYPE2)\include
- FREETYPE2_LIBS = $(FREETYPE2)\obj\freetype-$(FREETYPE2_VER).lib
-
- # FriBidi headers need to be "installed".
- FRIBIDI_CFLAGS = -I $(USRDIR)\include
- FRIBIDI_LIBS = $(FRIBIDI)\fribidi-$(FRIBIDI_VER).lib
-
- GIMP_CFLAGS = -I $(GIMP)
- GIMP_PLUGIN_LIBS = $(GIMP)\libgimp\gimp-$(GIMP_VER).lib $(GIMP)\libgimp\gimpui-$(GIMP_VER).lib
-
- GLIB_CFLAGS = -I $(GLIB) -I $(GLIB)\gmodule
- GLIB_LIBS = $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule\gmodule-$(GLIB_VER).lib $(GLIB)\gobject\gobject-$(GLIB_VER).lib
-
- GTK_CFLAGS = -I$(GTK)\gdk -I$(GTK)\gdk -I$(GTK)
- GTK_LIBS = $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\gdk-$(GTK_VER).lib
-
- GTKGLAREA_CFLAGS = -I $(GTKGLAREA)
- GTKGLAREA_LIBS = $(GTKGLAREA)\gtkgl\gtkgl-$(GTKGLAREA_VER).lib
-
- INTL_CFLAGS = -I $(INTL)
- INTL_LIBS = $(INTL)\gnu-intl.lib
-
- LIBICONV_CFLAGS = -I $(LIBICONV)\include
- LIBICONV_LIBS = $(LIBICONV)\src\iconv-$(LIBICONV_VER).lib
-
- LIBXML_CFLAGS = -I $(LIBXML)
- LIBXML_LIBS = $(LIBXML)\xml-$(LIBXML_VER).lib
-
- JPEG_CFLAGS = -I $(JPEG)
- JPEG_LIBS = $(JPEG)\jpeg.lib
-
- OPENGL_CFLAGS = # None needed, headers bundled with the compiler
- OPENGL_LIBS = opengl32.lib lglu32.lib
-
- PANGO_CFLAGS = -I $(PANGO)
- PANGO_LIBS = $(PANGO)\pango\pango-$(PANGO_VER).lib
- PANGOWIN32_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangowin32-$(PANGO_VER).lib
-
- PNG_CFLAGS = -I $(PNG) $(ZLIB_CFLAGS)
- PNG_LIBS = $(PNG)\png.lib $(ZLIB_LIBS)
-
- PTHREAD_CFLAGS = -I $(PTHREADS)
- PTHREAD_LIBS = $(PTHREADS)\pthread.lib
-
- TIFF_CFLAGS = -I $(TIFF)\libtiff
- TIFF_LIBS = $(TIFF)\libtiff\tiff.lib $(JPEG_LIBS) $(ZLIB_LIBS) user32.lib
-
- ZLIB_CFLAGS = -I $(ZLIB)
- ZLIB_LIBS = $(ZLIB)\zlib.lib
-
- ################
- # Compiler to use.
-
- CC = cl -G5 -GF $(OPTIMIZE) $(CRUNTIME) -W3 -nologo
-
- ################
- # The including makefile should define INCLUDES, DEFINES and
- # DEPCFLAGS. INCLUDES are the includes related to the module being
- # built. DEFINES similarly. DEPCFLAGS should be set to a set of
- # GLIB_CFLAGS, GTK_CFLAGS etc corresponding to what other modules we
- # depend on.
-
- CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES) $(DEPCFLAGS)
-
- .c.i :
- $(CC) $(CFLAGS) -E $< >$@
-
- # The default target should be "all"
-
- default: all
-
- clean::
- -del *.obj
- -del *.i
- -del *.exe
- -del *.dll
- -del *.lib
- -del *.err
- -del *.map
- -del *.sym
- -del *.exp
- -del *.lk1
- -del *.mk1
- -del *.pdb
- -del *.ilk
-
- # Needed by hacker rule to make makefile.msc from makefile.msc.in:
- SED = e:\cygwin\bin\sed
-