Simplified for pre-built package use

This commit is contained in:
Hans Breuer 2009-05-30 15:08:29 +02:00
parent f4e89ab877
commit 136793cc5e
2 changed files with 109 additions and 42 deletions

View File

@ -10,10 +10,10 @@
!IFNDEF DEBUG
# Full optimization:
OPTIMIZE = -Ox
# release with debug
OPTIMIZE = -Zi -DG_ENABLE_DEBUG=1
CRUNTIME = -MD
# Line number debug info only
DEBUGINFO = -Zd
LINKDEBUG =
LINKDEBUG = /OPT:REF
!ELSE
# Debugging:
OPTIMIZE =
@ -28,8 +28,14 @@ LDFLAGS = /link /machine:ix86 $(LINKDEBUG)
TOP = ..
!ENDIF
!IFNDEF PERL
PERL = perl
!ENDIF
XSLTPROC = d:\gnome-0\xsltproc
# paths and version numbers
!INCLUDE module.defs
!INCLUDE $(TOP)\glib\build\win32\module.defs
################
# CFLAGS and LIBS for the packages in module.defs.
@ -45,19 +51,37 @@ TOP = ..
ATK_CFLAGS = -I $(ATK)
ATK_LIBS = $(ATK)\atk\atk-$(ATK_VER).lib
BABL_CFLAGS = -I $(BABL)
BABL_LIBS = $(BABL)\babl\babl-1.0.lib
CAIRO_CFLAGS = -I $(CAIRO)\cairo\src -I $(CAIRO)\libpixman\src -I $(CAIRO) $(FONTCONFIG_CFLAGS) $(FREETYPE2_CFLAGS)
CAIRO_LIBS = $(CAIRO)\cairo\src\libcairo-$(CAIRO_VER).lib
# force inclusion of the _right_ cairoversion.h even when using without installation
CAIRO_CFLAGS = -FI $(CAIRO)\cairo-version.h -I $(CAIRO)\src -I $(CAIRO)
CAIRO_LIBS = $(CAIRO)\src\libcairo.lib
DIRENT_CFLAGS = -I $(GLIB)\build\win32\dirent
DIRENT_LIBS = $(GLIB)\build\win32\dirent\dirent.lib
!IFNDEF EXIF
EXIF_CFLAGS = -I $(DEVTOP)\include
EXIF_LIBS = $(DEVTOP)\lib\exif.lib
EXIF = 1
!ENDIF
# 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
# DLL was built with gcc.
!IFDEF FREETYPE2
FREETYPE2_CFLAGS = -I $(FREETYPE2)\include
FREETYPE2_LIBS = $(FREETYPE2)\obj\freetype-$(FREETYPE2_VER).lib
!ELSE
FREETYPE2_CFLAGS = -I $(DEVTOP)\include -I $(DEVTOP)\include\freetype2
FREETYPE2_LIBS = $(DEVTOP)\lib\freetype6.lib
!ENDIF
!IFNDEF FONTCONFIG
FONTCONFIG_CFLAGS = -I $(DEVTOP)\include
FONTCONFIG_LIBS = $(DEVTOP)\lib\fontconfig.lib
!ENDIF
GDK_PIXBUF_CFLAGS = -I $(GDK_PIXBUF)
GDK_PIXBUF_LIBS = $(GTK2)\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib
@ -69,9 +93,14 @@ GIMP_PLUGIN_LIBS = $(GIMP)\libgimp\gimp-$(GIMP_VER).lib $(GIMP)\libgimp\gimpui-$
GLIB = $(TOP)\glib
GLIB_CFLAGS = -I $(GLIB) -I $(GLIB)\glib -I $(GLIB)\gmodule $(INTL_CFLAGS)
GLIB_LIBS = $(GLIB)\glib\glib-$(GLIB_VER).lib $(GLIB)\gmodule\gmodule-$(GLIB_VER).lib $(GLIB)\gobject\gobject-$(GLIB_VER).lib
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
GTHREAD_LIBS = $(GLIB)\gthread\gthread-$(GLIB_VER).lib
!IFNDEF GDK_PIXBUF
GDK_PIXBUF_CFLAGS = $(GTK2_CFLAGS)
GDK_PIXBUF_LIBS = $(GTK2_LIBS)
!ENDIF
GNOMECANVAS_CFLAGS = -I $(GNOMECANVAS)
GNOMECANVAS_LIBS = $(GNOMECANVAS)\libgnomecanvas\libgnomecanvas-$(GNOMECANVAS_VER).lib
@ -84,18 +113,30 @@ GNOMEPRINTUI_LIBS = $(GNOMEPRINTUI)\libgnomeprintui\gnome-printui-$(GNOMEPRINTUI
GTK_CFLAGS = -I$(GTK)\gdk -I$(GTK)\gdk -I$(GTK)
GTK_LIBS = $(GTK)\gtk\gtk.lib $(GTK)\gdk\gdk.lib
GTK2_CFLAGS = $(GLIB_CFLAGS) $(ATK_CFLAGS) -I$(GTK2)\gdk -I$(GTK2)\gdk -I$(GTK2) -I$(PANGO) -I$(ATK)
GTK2_CFLAGS = $(GLIB_CFLAGS) $(ATK_CFLAGS) -I$(GTK2)\gdk -I$(GTK2)\gdk -I$(GTK2) -I$(PANGO) -I$(ATK) $(CAIRO_CFLAGS)
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)
GTKGLAREA_CFLAGS = -I $(GTKGLAREA)
GTKGLAREA_CFLAGS = -I $(GTKGLAREA)
GTKGLAREA_LIBS = $(GTKGLAREA)\gtkgl\gtkgl-$(GTKGLAREA_VER).lib
LIBART_CFLAGS = -I$(LIBART)\.. -FIlibart_lgpl/art_config.h
LIBART_LIBS = $(LIBART)\libart.lib
GTKSOURCEVIEW_CFLAGS = -I $(GTKSOURCEVIEW)
GTKSOURCEVIEW_LIBS = $(GTKSOURCEVIEW)\gtksourceview\gtksourceview.lib
LIBART_CFLAGS = -I$(LIBART)\.. -FIlibart_lgpl/art_config.h
LIBART_LIBS = $(LIBART)\art_lgpl_2.lib
!IFNDEF INTL
INTL_CFLAGS = -I $(DEVTOP)\include
INTL_LIBS = $(DEVTOP)\lib\intl.lib
!ELSE
INTL_CFLAGS = -I $(INTL)
INTL_LIBS = $(INTL)\intl.lib
!ENDIF
!IFDEF LCMS
LCMS_CFLAGS = -DLCMS_DLL -I $(LCMS)\include
LCMS_LIBS = $(LCMS)\Projects\VC6\Release\lcms.lib
!ENDIF
LIBICONV_CFLAGS = -I $(LIBICONV)\include
LIBICONV_LIBS = $(LIBICONV)\lib\iconv.lib
@ -109,41 +150,66 @@ LIBXML2_LIBS = $(LIBXML2)\libxml2.lib
LIBXSLT_CFLAGS = -I $(LIBXSLT)
LIBXSLT_LIBS = $(LIBXSLT)\libxslt\libxslt.lib
LCMS_CFLAGS = -I $(LCMS)\include -DLCMS_DLL
LCMS_LIBS = $(LCMS)\Projects\VC6\Release\lcms.lib
!IFNDEF JPEG
JPEG_CFLAGS = -I $(DEVTOP)\include
JPEG_LIBS = $(DEVTOP)\lib\jpeg.lib
!ELSE
JPEG_CFLAGS = -I $(JPEG)
JPEG_LIBS = $(JPEG)\libjpeg.lib
!ENDIF
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
PANGOCAIRO_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangocairo-$(PANGO_VER).lib
PANGOWIN32_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangowin32-$(PANGO_VER).lib
PANGOFT2_LIBS = $(PANGO_LIBS) $(PANGO)\pango\pangoft2-$(PANGO_VER).lib
!IFDEF PNG
PNG_CFLAGS = -I $(PNG) $(ZLIB_CFLAGS)
PNG_LIBS = $(PNG)\png.lib $(ZLIB_LIBS)
PNG_LIBS = $(PNG)\projects\visualc6\Win32_LIB_Release\libpng.lib $(ZLIB_LIBS)
!ELSE
PNG_CFLAGS = -I $(DEVTOP)\include $(ZLIB_CFLAGS)
PNG_LIBS = $(DEVTOP)\lib\libpng.lib $(ZLIB_LIBS)
!ENDIF
RSVG_CFLAGS = -I $(RSVG)\..
RSVG_LIBS = $(RSVG)\librsvg-$(RSVG_VER).lib
RSVG_LIBS = $(RSVG)\librsvg-2.lib
SVG_CFLAGS = -I $(SVG)\src
SVG_LIBS = $(SVG)\src\libsvg-$(SVG_VER).lib
!IFDEF TIFF
TIFF_CFLAGS = -I $(TIFF)\libtiff
# Use single import library for both libtiff DLL versions (with or
# without LZW code). The user selects which DLL to use.
TIFF_NOLZW_LIBS = $(TIFF)\libtiff\tiff.lib $(JPEG_LIBS) $(ZLIB_LIBS) user32.lib
TIFF_LZW_LIBS = $(TIFF_NOLZW_LIBS)
TIFF_LIBS = $(TIFF_NOLZW_LIBS)
TIFF_LIBS = $(TIFF)\libtiff\libtiff.lib $(JPEG_LIBS) $(ZLIB_LIBS) user32.lib
!ELSE
TIFF_CFLAGS = -I $(DEVTOP)\include
TIFF_LIBS = $(DEVTOP)\lib\libtiff.lib
!ENDIF
VIPS_CFLAGS = -I $(VIPS)/include
VIPS_LIBS = $(VIPS)/libsrc/vips.lib
!IFDEF ZLIB
ZLIB_CFLAGS = -I $(ZLIB)
ZLIB_LIBS = $(ZLIB)\zlib.lib
ZLIB_LIBS = $(ZLIB)\projects\visualc6\Win32_LIB_Release\zlib.lib
!ELSE
ZLIB_CFLAGS = -I $(DEVTOP)\include
ZLIB_LIBS = $(DEVTOP)\lib\zdll.lib
!ENDIF
################
# Compiler to use.
CCOMPILER = cl
CC = $(CCOMPILER) -G5 -GF $(CRUNTIME) -W3 -nologo
CC = $(CCOMPILER) $(OPTIMIZE) $(CRUNTIME) -W3 -nologo
################
# The including makefile should define INCLUDES, DEFINES and
@ -153,7 +219,9 @@ CC = $(CCOMPILER) -G5 -GF $(CRUNTIME) -W3 -nologo
# depend on.
CFLAGS = $(OPTIMIZE) $(DEBUGINFO) $(INCLUDES) $(DEFINES) $(DEPCFLAGS)
# make cl/wcl386 compatible (c99 and cdecl)
#OPTIMIZE = -Ox
#CFLAGS = /passwopts:-za99 /passwopts:-ecc $(DEBUGINFO) $(INCLUDES) $(DEFINES) $(DEPCFLAGS)
.c.i :
$(CC) $(CFLAGS) -E $< >$@
@ -162,20 +230,8 @@ CFLAGS = $(OPTIMIZE) $(DEBUGINFO) $(INCLUDES) $(DEFINES) $(DEPCFLAGS)
default: all
clean::
-del *.obj
-del *.res
-del *.i
-del *.exe
-del *.dll
-del *.lib
-del *.err
-del *.map
-del *.sym
-del *.exp
-del *.lk1
-del *.mk1
-del *.obj *.res *.i *.exe *.dll *.lib *.err *.map *.exp *.lk1 *.mk1 *.ilk *.manifest
-del *.pdb
-del *.ilk
# Needed by hacker rule to make makefile.msc from makefile.msc.in:
SED = e:\cygwin\bin\sed

View File

@ -8,6 +8,9 @@
MODULE_DEFS_INCLUDED=1
# fallback if a specifc library is not contained in TOP (i.e. not self-compiled)
DEVTOP=$(TOP)\..\other\dev
################
# The version macros define what versions of libraries to use.
@ -36,7 +39,7 @@ MODULE_DEFS_INCLUDED=1
# built using libtool.
ATK_VER = 1.0
CAIRO_VER = 0.3
CAIRO_VER = 1.4
FREETYPE2_VER = 2.0
GIMP_VER = 1.2
GDK_PIXBUF_VER = 2.0
@ -59,8 +62,10 @@ RSVG_VER = 2.4
# In alphabetical order.
ATK = $(TOP)/atk
CAIRO = $(TOP)\cairo
BABL = $(TOP)/babl
CAIRO = d:\devel\from-svn\other\cairo-1.8.4
GIMP = $(TOP)/gimp
GEGL = $(TOP)/gegl
GLIB = $(TOP)/glib
GNOMECANVAS = $(TOP)\libgnomecanvas
GNOMECANVAS_VER = 2.9
@ -70,11 +75,13 @@ GNOMECANVAS_VER = 2.9
GTK = $(TOP)/gtk+p
# GTK+ 2.0
GTK2 = $(TOP)/gtk+
GTKSOURCEVIEW = $(TOP)/gtksourceview
GNOMEPRINT = $(TOP)\libgnomeprint
GNOMEPRINT_VER = 2.8
GDK_PIXBUF = $(GTK)
LIBGLADE = $(TOP)/libglade
LIBXML = $(TOP)/libxml-$(LIBXML_VER)
LIBXML2 = $(TOP)/libxml2
#PANGO = $(TOP)/pango-1-8
PANGO = $(TOP)/pango
GNOMEPRINTUI = $(TOP)\libgnomeprintui
@ -93,21 +100,25 @@ GLIB_GENMARSHAL = $(GLIB)/gobject/glib-genmarshal
# mentioned here too literally, use the latest version you can find,
# or the ones the current GTK+ 2.0 for Windows uses.
FREETYPE2 = $(TOP)/freetype2
#FREETYPE2 = $(TOP)/freetype2
GTKEXTRA = $(TOP)/gtk+extra
GTKGLAREA = $(TOP)/gtkglarea
INTL = $(TOP)/gettext-0.10.40/intl
JPEG = $(TOP)/jpeg-6b
#INTL = d:/devel/from-svn/other/intl-tml
JPEG = d:/devel/from-svn/other/jpeg-6b
LCMS = d:/devel/other/lcms-1.15
LIBART = $(TOP)/libart_lgpl
LIBICONV = $(TOP)/libiconv-$(LIBICONV_VER)
LIBXSLT = $(TOP)/libxslt
PNG = $(TOP)/libpng-1.2.0
#PNG = d:/devel/from-svn/other/lpng1224
RSVG = $(TOP)\librsvg
SVG = $(TOP)\libsvg
TIFF = $(TOP)/tiff-v3.4
ZLIB = $(TOP)/zlib-1.1.3
#TIFF = d:/devel/from-svn/other/tiff-3.7.2
#ZLIB = d:/devel/from-svn/other/zlib123
# Headers from Microsoft's PlatformSDK (that aren't present in
# mingw) are needed by a just a few packages when compiling with gcc.
# This is just where tml has it installed.
PLATFORMSDK = i:/src/psdk
#
WTKIT = d:/devel/from-svn/other\wtkit126