#copyright (c) 2004-2013 Kazuki Iwamoto http://www.maid.org/ iwm@maid.org
#
#Permission is hereby granted, free of charge, to any person obtaining
#a copy of this software and associated documentation files (the
#"Software"), to deal in the Software without restriction, including
#without limitation the rights to use, copy, modify, merge, publish,
#distribute, sublicense, and/or sell copies of the Software, and to
#permit persons to whom the Software is furnished to do so, subject to
#the following conditions:
#
#The above copyright notice and this permission notice shall be included
#in all copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
#EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
#IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
#CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
#TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
#SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

!ifndef PREFIX
PREFIX=.
!endif

!ifdef GIT
ATK_MAJOR_VERSION=2
ATK_MINOR_VERSION=9
ATK_MICRO_VERSION=3
ATK_BINARY_AGE=20913
ATK_INTERFACE_AGE=1
!else
ATK_MAJOR_VERSION=2
ATK_MINOR_VERSION=8
ATK_MICRO_VERSION=0
!endif
ATK_VERSION=$(ATK_MAJOR_VERSION).$(ATK_MINOR_VERSION).$(ATK_MICRO_VERSION)
!ifdef GIT
ATK=atk
!else
ATK=atk-$(ATK_VERSION)
!endif

CAIRO_MAJOR_VERSION=1
CAIRO_MINOR_VERSION=12
CAIRO_MICRO_VERSION=14
CAIRO_VERSION=$(CAIRO_MAJOR_VERSION).$(CAIRO_MINOR_VERSION).$(CAIRO_MICRO_VERSION)
CAIRO=cairo-$(CAIRO_VERSION)

EXPAT_MAJOR_VERSION=2
EXPAT_MINOR_VERSION=1
EXPAT_MICRO_VERSION=0
EXPAT_VERSION=$(EXPAT_MAJOR_VERSION).$(EXPAT_MINOR_VERSION).$(EXPAT_MICRO_VERSION)
EXPAT=expat-$(EXPAT_VERSION)

FONTCONFIG_MAJOR_VERSION=2
FONTCONFIG_MINOR_VERSION=10
FONTCONFIG_MICRO_VERSION=2
FONTCONFIG_VERSION=$(FONTCONFIG_MAJOR_VERSION).$(FONTCONFIG_MINOR_VERSION).$(FONTCONFIG_MICRO_VERSION)
FONTCONFIG=fontconfig-$(FONTCONFIG_VERSION)

FREETYPE_MAJOR_VERSION=2
FREETYPE_MINOR_VERSION=5
FREETYPE_MICRO_VERSION=0
FREETYPE_BUILD_VERSION=1
FREETYPE_VERSION=$(FREETYPE_MAJOR_VERSION).$(FREETYPE_MINOR_VERSION).$(FREETYPE_MICRO_VERSION).$(FREETYPE_BUILD_VERSION)
FREETYPE=freetype-$(FREETYPE_VERSION)

!ifdef GIT
GDK_PIXBUF_MAJOR_VERSION=2
GDK_PIXBUF_MINOR_VERSION=29
GDK_PIXBUF_MICRO_VERSION=2
GDK_PIXBUF_BINARY_AGE=2902
!else
GDK_PIXBUF_MAJOR_VERSION=2
GDK_PIXBUF_MINOR_VERSION=28
GDK_PIXBUF_MICRO_VERSION=2
GDK_PIXBUF_BINARY_AGE=2802
!endif
GDK_PIXBUF_VERSION=$(GDK_PIXBUF_MAJOR_VERSION).$(GDK_PIXBUF_MINOR_VERSION).$(GDK_PIXBUF_MICRO_VERSION)
!ifdef GIT
GDK_PIXBUF=gdk-pixbuf
!else
GDK_PIXBUF=gdk-pixbuf-$(GDK_PIXBUF_VERSION)
!endif

!ifdef GIT
GLIB_MAJOR_VERSION=2
GLIB_MINOR_VERSION=37
GLIB_MICRO_VERSION=5
GLIB_BINARY_AGE=3705
!else
GLIB_MAJOR_VERSION=2
GLIB_MINOR_VERSION=36
GLIB_MICRO_VERSION=3
GLIB_BINARY_AGE=3603
!endif
GLIB_VERSION=$(GLIB_MAJOR_VERSION).$(GLIB_MINOR_VERSION).$(GLIB_MICRO_VERSION)
!ifdef GIT
GLIB=glib
!else
GLIB=glib-$(GLIB_VERSION)
!endif

!ifdef GIT
GTK_MAJOR_VERSION=3
GTK_MINOR_VERSION=9
GTK_MICRO_VERSION=9
GTK_BINARY_AGE=909
GTK_API_VERSION=3.0
!else
GTK_MAJOR_VERSION=3
GTK_MINOR_VERSION=8
GTK_MICRO_VERSION=2
GTK_BINARY_AGE=802
GTK_API_VERSION=3.0
!endif
GTK_VERSION=$(GTK_MAJOR_VERSION).$(GTK_MINOR_VERSION).$(GTK_MICRO_VERSION)
!ifdef GIT
GTK=gtk
!else
GTK=gtk-$(GTK_VERSION)
!endif

HARFBUZZ_MAJOR_VERSION=0
HARFBUZZ_MINOR_VERSION=9
HARFBUZZ_MICRO_VERSION=19
HARFBUZZ_VERSION=$(HARFBUZZ_MAJOR_VERSION).$(HARFBUZZ_MINOR_VERSION).$(HARFBUZZ_MICRO_VERSION)
HARFBUZZ=harfbuzz-$(HARFBUZZ_VERSION)

ICONVMLANG_MAJOR_VERSION=0
ICONVMLANG_MINOR_VERSION=0
ICONVMLANG_MICRO_VERSION=8
ICONVMLANG_VERSION=$(ICONVMLANG_MAJOR_VERSION).$(ICONVMLANG_MINOR_VERSION).$(ICONVMLANG_MICRO_VERSION)
ICONVMLANG=iconvmlang-$(ICONVMLANG_VERSION)

JPEG=jpeg-9

LIBFFI_MAJOR_VERSION=3
LIBFFI_MINOR_VERSION=0
LIBFFI_MICRO_VERSION=13
LIBFFI_VERSION=$(LIBFFI_MAJOR_VERSION).$(LIBFFI_MINOR_VERSION).$(LIBFFI_MICRO_VERSION)
LIBFFI=libffi-$(LIBFFI_VERSION)

LIBPNG_MAJOR_VERSION=1
LIBPNG_MINOR_VERSION=6
LIBPNG_MICRO_VERSION=3
LIBPNG_VERSION=$(LIBPNG_MAJOR_VERSION).$(LIBPNG_MINOR_VERSION).$(LIBPNG_MICRO_VERSION)
LIBPNG=libpng-$(LIBPNG_VERSION)

!ifdef GIT
PANGO_MAJOR_VERSION=1
PANGO_MINOR_VERSION=35
PANGO_MICRO_VERSION=1
PANGO_BINARY_AGE=3501
!else
PANGO_MAJOR_VERSION=1
PANGO_MINOR_VERSION=34
PANGO_MICRO_VERSION=1
PANGO_BINARY_AGE=3401
!endif
PANGO_MODULE_VERSION=1.6.0
PANGO_VERSION=$(PANGO_MAJOR_VERSION).$(PANGO_MINOR_VERSION).$(PANGO_MICRO_VERSION)
!ifdef GIT
PANGO=pango
!else
PANGO=pango-$(PANGO_VERSION)
!endif

PIXMAN_MAJOR_VERSION=0
PIXMAN_MINOR_VERSION=30
PIXMAN_MICRO_VERSION=0
PIXMAN_VERSION=$(PIXMAN_MAJOR_VERSION).$(PIXMAN_MINOR_VERSION).$(PIXMAN_MICRO_VERSION)
PIXMAN=pixman-$(PIXMAN_VERSION)

TIFF_MAJOR_VERSION=4
TIFF_MINOR_VERSION=0
TIFF_MICRO_VERSION=3
TIFF_VERSION=$(TIFF_MAJOR_VERSION).$(TIFF_MINOR_VERSION).$(TIFF_MICRO_VERSION)
TIFF=tiff-$(TIFF_VERSION)

ZLIB_MAJOR_VERSION=1
ZLIB_MINOR_VERSION=2
ZLIB_MICRO_VERSION=8
ZLIB_VERSION=$(ZLIB_MAJOR_VERSION).$(ZLIB_MINOR_VERSION).$(ZLIB_MICRO_VERSION)
ZLIB=zlib-$(ZLIB_VERSION)

VERSION=$(GTK_VERSION)
RELEASE=1

!ifndef LINK
LINK=link
!endif
!ifndef MT
MT=mt
!endif
!ifndef PERL
PERL=perl
!endif
!ifndef PYTHON
PYTHON=python
!endif

CLFLAGS=/c /D_USING_V110_SDK71_ /D_MBCS /DNDEBUG /DWIN32 /D_WINDOWS /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /D_CRT_SECURE_NO_DEPRECATE /arch:SSE /Fo$@ /MD /nologo /O2 /w /Zm400
LNFLAGS=/INCREMENTAL:NO /MACHINE:IX86 /NOLOGO /OUT:$@ /RELEASE /IGNORE:4210
RCFLAGS=/c1252 /D_USING_V110_SDK71_ /d_MBCS /dNDEBUG /dWIN32 /d_WINDOWS /d_WIN32_WINNT=0x0501 /dWINVER=0x0501 /fo$@ /l0
ASFLAGS=/c /Fo$@ /nologo /safeseh
LBFLAGS=/MACHINE:IX86 /NODEFAULTLIB:msvcrt.lib /NOLOGO /OUT:$@
ICFLAGS=/DEFAULTLIB:iwm\crt\iwmcrt.lib /NODEFAULTLIB:msvcrt.lib


###############################################################################
#                                                                             #
# all                                                                         #
#                                                                             #
###############################################################################
all: iwm\crt\iwmcrt.lib gtk

###############################################################################
# ATK                                                                         #
###############################################################################
atk: glib $(ATK)\atk\libatk-1.0-0.dll

atk_OBJECTS= \
		$(ATK)\atk\atkaction.obj \
		$(ATK)\atk\atkcomponent.obj \
		$(ATK)\atk\atkdocument.obj \
		$(ATK)\atk\atkeditabletext.obj \
		$(ATK)\atk\atkgobjectaccessible.obj \
		$(ATK)\atk\atkhyperlink.obj \
		$(ATK)\atk\atkhyperlinkimpl.obj \
		$(ATK)\atk\atkhypertext.obj \
		$(ATK)\atk\atkimage.obj \
		$(ATK)\atk\atknoopobject.obj \
		$(ATK)\atk\atknoopobjectfactory.obj \
		$(ATK)\atk\atkobject.obj \
		$(ATK)\atk\atkobjectfactory.obj \
		$(ATK)\atk\atkplug.obj \
		$(ATK)\atk\atkregistry.obj \
		$(ATK)\atk\atkrelation.obj \
		$(ATK)\atk\atkrelationset.obj \
		$(ATK)\atk\atkselection.obj \
		$(ATK)\atk\atksocket.obj \
		$(ATK)\atk\atkstate.obj \
		$(ATK)\atk\atkstateset.obj \
		$(ATK)\atk\atkstreamablecontent.obj \
		$(ATK)\atk\atktable.obj \
		$(ATK)\atk\atktext.obj \
		$(ATK)\atk\atkutil.obj \
		$(ATK)\atk\atkmisc.obj \
		$(ATK)\atk\atkvalue.obj \
		$(ATK)\atk\atkversion.obj \
		$(ATK)\atk\atkwindow.obj \
		\
		$(ATK)\atk\atk-enum-types.obj

$(ATK)\atk\libatk-1.0-0.dll: iwm\crt\iwmcrt.lib $(ATK)\atk\atk.def $(ATK)\atk\atk.res $(atk_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(ATK)\atk\atk.def /IMPLIB:$(ATK)\atk\atk-1.0.lib $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(ATK)\atk\atk.res $(atk_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(ATK)\atk\atk.def: $*.symbols
	echo EXPORTS > $@
	$(CC) /EP /DINCLUDE_VARIABLES /DG_OS_WIN32 /DALL_FILES $** >> $@

$(ATK)\atk\atk.res: $*.rc
	$(RC) $(RCFLAGS) $**

!ifdef GIT
$(ATK)\atk\atk.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @ATK_MAJOR_VERSION@=$(ATK_MAJOR_VERSION) @ATK_MINOR_VERSION@=$(ATK_MINOR_VERSION) @ATK_MICRO_VERSION@=$(ATK_MICRO_VERSION) @ATK_VERSION@=$(ATK_VERSION) @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

!ifdef GIT
$(atk_OBJECTS): $(ATK)\config.h $(ATK)\atk\atk-enum-types.c $(ATK)\atk\atk-enum-types.h $(ATK)\atk\atkmarshal.c $(ATK)\atk\atkmarshal.h $(ATK)\atk\atkversion.h
!else
$(atk_OBJECTS): $(ATK)\config.h $(ATK)\atk\atk-enum-types.c $(ATK)\atk\atk-enum-types.h $(ATK)\atk\atkmarshal.c $(ATK)\atk\atkmarshal.h
!endif
	$(CC) $(CLFLAGS) /DATK_COMPILATION /DATK_LOCALEDIR=\"/share/locale\" /I$(ATK) /I$(ATK)\atk /I$(ICONVMLANG) /I$(GLIB) /I$(GLIB)\glib $*.c

!ifdef GIT
$(ATK)\config.h: $@.win32.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GETTEXT_PACKAGE@=atk10 @ATK_MAJOR_VERSION@=$(ATK_MAJOR_VERSION) @ATK_MINOR_VERSION@=$(ATK_MINOR_VERSION) @ATK_MICRO_VERSION@=$(ATK_MICRO_VERSION) < $@.win32.in > $@
!else
$(ATK)\config.h: $@.win32
	copy /y $** $@
!endif

!ifdef GIT
atk_headers= \
		$(ATK)\atk\atk.h \
		$(ATK)\atk\atkaction.h \
		$(ATK)\atk\atkcomponent.h \
		$(ATK)\atk\atkdocument.h \
		$(ATK)\atk\atkeditabletext.h \
		$(ATK)\atk\atkgobjectaccessible.h \
		$(ATK)\atk\atkhyperlink.h \
		$(ATK)\atk\atkhyperlinkimpl.h \
		$(ATK)\atk\atkhypertext.h \
		$(ATK)\atk\atknoopobject.h \
		$(ATK)\atk\atknoopobjectfactory.h \
		$(ATK)\atk\atkobject.h \
		$(ATK)\atk\atkobjectfactory.h \
		$(ATK)\atk\atkplug.h \
		$(ATK)\atk\atkimage.h \
		$(ATK)\atk\atkregistry.h \
		$(ATK)\atk\atkrelation.h \
		$(ATK)\atk\atkrelationtype.h \
		$(ATK)\atk\atkrelationset.h \
		$(ATK)\atk\atkselection.h \
		$(ATK)\atk\atksocket.h \
		$(ATK)\atk\atkstate.h \
		$(ATK)\atk\atkstateset.h \
		$(ATK)\atk\atkstreamablecontent.h \
		$(ATK)\atk\atktable.h \
		$(ATK)\atk\atktext.h \
		$(ATK)\atk\atkutil.h \
		$(ATK)\atk\atkmisc.h \
		$(ATK)\atk\atkvalue.h \
		$(ATK)\atk\atkwindow.h

$(ATK)\atk\atk-enum-types.c: $(atk_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#include <atk.h>" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		$** > $@

$(ATK)\atk\atk-enum-types.h: $(atk_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
		--ftail "#endif /* __ATK_ENUM_TYPES_H__ */" \
		$** > $@

$(ATK)\atk\atkversion.h: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @ATK_MAJOR_VERSION@=$(ATK_MAJOR_VERSION) @ATK_MINOR_VERSION@=$(ATK_MINOR_VERSION) @ATK_MICRO_VERSION@=$(ATK_MICRO_VERSION) @ATK_BINARY_AGE@=$(ATK_BINARY_AGE) @ATK_INTERFACE_AGE@=$(ATK_INTERFACE_AGE) < $@.in > $@
!endif

$(ATK)\atk\atkmarshal.c: $(GLIB)\gobject\glib-genmarshal.exe $*.list
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	$(GLIB)\gobject\glib-genmarshal.exe --prefix=atk_marshal $*.list --body > $@
	del iconv.dll
	del intl.dll
	del libglib-2.0-0.dll

$(ATK)\atk\atkmarshal.h: $(GLIB)\gobject\glib-genmarshal.exe $*.list
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	$(GLIB)\gobject\glib-genmarshal.exe --prefix=atk_marshal $*.list --header > $@
	del libglib-2.0-0.dll
	del iconv.dll
	del intl.dll

###############################################################################
# cairo                                                                       #
###############################################################################
cairo: fontconfig glib libpng \
		$(CAIRO)\src\libcairo-2.dll \
		$(CAIRO)\util\cairo-gobject\libcairo-gobject-2.dll

cairo_OBJECTS= \
		$(CAIRO)\src\cairo-analysis-surface.obj \
		$(CAIRO)\src\cairo-arc.obj \
		$(CAIRO)\src\cairo-array.obj \
		$(CAIRO)\src\cairo-atomic.obj \
		$(CAIRO)\src\cairo-base64-stream.obj \
		$(CAIRO)\src\cairo-base85-stream.obj \
		$(CAIRO)\src\cairo-bentley-ottmann.obj \
		$(CAIRO)\src\cairo-bentley-ottmann-rectangular.obj \
		$(CAIRO)\src\cairo-bentley-ottmann-rectilinear.obj \
		$(CAIRO)\src\cairo-botor-scan-converter.obj \
		$(CAIRO)\src\cairo-boxes.obj \
		$(CAIRO)\src\cairo-boxes-intersect.obj \
		$(CAIRO)\src\cairo.obj \
		$(CAIRO)\src\cairo-cache.obj \
		$(CAIRO)\src\cairo-clip.obj \
		$(CAIRO)\src\cairo-clip-boxes.obj \
		$(CAIRO)\src\cairo-clip-polygon.obj \
		$(CAIRO)\src\cairo-clip-region.obj \
		$(CAIRO)\src\cairo-clip-surface.obj \
		$(CAIRO)\src\cairo-color.obj \
		$(CAIRO)\src\cairo-composite-rectangles.obj \
		$(CAIRO)\src\cairo-compositor.obj \
		$(CAIRO)\src\cairo-contour.obj \
		$(CAIRO)\src\cairo-damage.obj \
		$(CAIRO)\src\cairo-debug.obj \
		$(CAIRO)\src\cairo-default-context.obj \
		$(CAIRO)\src\cairo-device.obj \
		$(CAIRO)\src\cairo-error.obj \
		$(CAIRO)\src\cairo-fallback-compositor.obj \
		$(CAIRO)\src\cairo-fixed.obj \
		$(CAIRO)\src\cairo-font-face.obj \
		$(CAIRO)\src\cairo-font-face-twin.obj \
		$(CAIRO)\src\cairo-font-face-twin-data.obj \
		$(CAIRO)\src\cairo-font-options.obj \
		$(CAIRO)\src\cairo-freelist.obj \
		$(CAIRO)\src\cairo-freed-pool.obj \
		$(CAIRO)\src\cairo-gstate.obj \
		$(CAIRO)\src\cairo-hash.obj \
		$(CAIRO)\src\cairo-hull.obj \
		$(CAIRO)\src\cairo-image-compositor.obj \
		$(CAIRO)\src\cairo-image-info.obj \
		$(CAIRO)\src\cairo-image-source.obj \
		$(CAIRO)\src\cairo-image-surface.obj \
		$(CAIRO)\src\cairo-lzw.obj \
		$(CAIRO)\src\cairo-matrix.obj \
		$(CAIRO)\src\cairo-mask-compositor.obj \
		$(CAIRO)\src\cairo-mesh-pattern-rasterizer.obj \
		$(CAIRO)\src\cairo-mempool.obj \
		$(CAIRO)\src\cairo-misc.obj \
		$(CAIRO)\src\cairo-mono-scan-converter.obj \
		$(CAIRO)\src\cairo-mutex.obj \
		$(CAIRO)\src\cairo-no-compositor.obj \
		$(CAIRO)\src\cairo-observer.obj \
		$(CAIRO)\src\cairo-output-stream.obj \
		$(CAIRO)\src\cairo-paginated-surface.obj \
		$(CAIRO)\src\cairo-path-bounds.obj \
		$(CAIRO)\src\cairo-path.obj \
		$(CAIRO)\src\cairo-path-fill.obj \
		$(CAIRO)\src\cairo-path-fixed.obj \
		$(CAIRO)\src\cairo-path-in-fill.obj \
		$(CAIRO)\src\cairo-path-stroke.obj \
		$(CAIRO)\src\cairo-path-stroke-boxes.obj \
		$(CAIRO)\src\cairo-path-stroke-polygon.obj \
		$(CAIRO)\src\cairo-path-stroke-traps.obj \
		$(CAIRO)\src\cairo-path-stroke-tristrip.obj \
		$(CAIRO)\src\cairo-pattern.obj \
		$(CAIRO)\src\cairo-pen.obj \
		$(CAIRO)\src\cairo-polygon.obj \
		$(CAIRO)\src\cairo-polygon-intersect.obj \
		$(CAIRO)\src\cairo-polygon-reduce.obj \
		$(CAIRO)\src\cairo-raster-source-pattern.obj \
		$(CAIRO)\src\cairo-recording-surface.obj \
		$(CAIRO)\src\cairo-rectangle.obj \
		$(CAIRO)\src\cairo-rectangular-scan-converter.obj \
		$(CAIRO)\src\cairo-region.obj \
		$(CAIRO)\src\cairo-rtree.obj \
		$(CAIRO)\src\cairo-scaled-font.obj \
		$(CAIRO)\src\cairo-shape-mask-compositor.obj \
		$(CAIRO)\src\cairo-slope.obj \
		$(CAIRO)\src\cairo-spans.obj \
		$(CAIRO)\src\cairo-spans-compositor.obj \
		$(CAIRO)\src\cairo-spline.obj \
		$(CAIRO)\src\cairo-stroke-dash.obj \
		$(CAIRO)\src\cairo-stroke-style.obj \
		$(CAIRO)\src\cairo-surface.obj \
		$(CAIRO)\src\cairo-surface-clipper.obj \
		$(CAIRO)\src\cairo-surface-fallback.obj \
		$(CAIRO)\src\cairo-surface-observer.obj \
		$(CAIRO)\src\cairo-surface-offset.obj \
		$(CAIRO)\src\cairo-surface-snapshot.obj \
		$(CAIRO)\src\cairo-surface-subsurface.obj \
		$(CAIRO)\src\cairo-surface-wrapper.obj \
		$(CAIRO)\src\cairo-time.obj \
		$(CAIRO)\src\cairo-tor-scan-converter.obj \
		$(CAIRO)\src\cairo-tor22-scan-converter.obj \
		$(CAIRO)\src\cairo-clip-tor-scan-converter.obj \
		$(CAIRO)\src\cairo-toy-font-face.obj \
		$(CAIRO)\src\cairo-traps.obj \
		$(CAIRO)\src\cairo-tristrip.obj \
		$(CAIRO)\src\cairo-traps-compositor.obj \
		$(CAIRO)\src\cairo-unicode.obj \
		$(CAIRO)\src\cairo-user-font.obj \
		$(CAIRO)\src\cairo-version.obj \
		$(CAIRO)\src\cairo-wideint.obj \
		\
		$(CAIRO)\src\cairo-cff-subset.obj \
		$(CAIRO)\src\cairo-scaled-font-subsets.obj \
		$(CAIRO)\src\cairo-truetype-subset.obj \
		$(CAIRO)\src\cairo-type1-fallback.obj \
		$(CAIRO)\src\cairo-type1-glyph-names.obj \
		$(CAIRO)\src\cairo-type1-subset.obj \
		$(CAIRO)\src\cairo-type3-glyph-surface.obj \
		\
		$(CAIRO)\src\cairo-deflate-stream.obj \
		\
# fontconfig
		$(CAIRO)\src\cairo-ft-font.obj \
# PDF
		$(CAIRO)\src\cairo-pdf-operators.obj \
		$(CAIRO)\src\cairo-pdf-shading.obj \
		$(CAIRO)\src\cairo-pdf-surface.obj \
# PNG
		$(CAIRO)\src\cairo-png.obj \
# PS
		$(CAIRO)\src\cairo-ps-surface.obj \
# SVG
		$(CAIRO)\src\cairo-svg-surface.obj \
# Win32
		$(CAIRO)\src\win32\cairo-win32-font.obj \
		\
		$(CAIRO)\src\win32\cairo-win32-debug.obj \
		$(CAIRO)\src\win32\cairo-win32-device.obj \
		$(CAIRO)\src\win32\cairo-win32-gdi-compositor.obj \
		$(CAIRO)\src\win32\cairo-win32-system.obj \
		$(CAIRO)\src\win32\cairo-win32-surface.obj \
		$(CAIRO)\src\win32\cairo-win32-display-surface.obj \
		$(CAIRO)\src\win32\cairo-win32-printing-surface.obj

pixman_OBJECTS= \
		$(PIXMAN)\pixman\pixman.obj \
		$(PIXMAN)\pixman\pixman-access.obj \
		$(PIXMAN)\pixman\pixman-access-accessors.obj \
		$(PIXMAN)\pixman\pixman-bits-image.obj \
		$(PIXMAN)\pixman\pixman-combine32.obj \
		$(PIXMAN)\pixman\pixman-combine-float.obj \
		$(PIXMAN)\pixman\pixman-conical-gradient.obj \
		$(PIXMAN)\pixman\pixman-x86.obj \
		$(PIXMAN)\pixman\pixman-mips.obj \
		$(PIXMAN)\pixman\pixman-arm.obj \
		$(PIXMAN)\pixman\pixman-ppc.obj \
		$(PIXMAN)\pixman\pixman-edge.obj \
		$(PIXMAN)\pixman\pixman-edge-accessors.obj \
		$(PIXMAN)\pixman\pixman-fast-path.obj \
		$(PIXMAN)\pixman\pixman-glyph.obj \
		$(PIXMAN)\pixman\pixman-general.obj \
		$(PIXMAN)\pixman\pixman-gradient-walker.obj \
		$(PIXMAN)\pixman\pixman-image.obj \
		$(PIXMAN)\pixman\pixman-implementation.obj \
		$(PIXMAN)\pixman\pixman-linear-gradient.obj \
		$(PIXMAN)\pixman\pixman-matrix.obj \
		$(PIXMAN)\pixman\pixman-noop.obj \
		$(PIXMAN)\pixman\pixman-radial-gradient.obj \
		$(PIXMAN)\pixman\pixman-region16.obj \
		$(PIXMAN)\pixman\pixman-region32.obj \
		$(PIXMAN)\pixman\pixman-solid-fill.obj \
		$(PIXMAN)\pixman\pixman-timer.obj \
		$(PIXMAN)\pixman\pixman-trap.obj \
		$(PIXMAN)\pixman\pixman-utils.obj

$(CAIRO)\src\libcairo-2.dll: iwm\crt\iwmcrt.lib $(CAIRO)\src\cairo.def $(cairo_OBJECTS) $(pixman_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(CAIRO)\src\cairo.def /IMPLIB:$(CAIRO)\src\cairo.lib $(FONTCONFIG)\src\fontconfig.lib $(FREETYPE)\src\freetype.lib $(LIBPNG)\libpng15.lib $(ZLIB)\zdll.lib gdi32.lib kernel32.lib msimg32.lib user32.lib $(cairo_OBJECTS) $(pixman_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(CAIRO)\src\cairo.def: $(cairo_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(cairo_OBJECTS)

$(cairo_OBJECTS): $(CAIRO)\src\cairo-features.h
	$(CC) $(CLFLAGS) /DDISABLE_SOME_FLOATING_POINT /I$(CAIRO)\src /I$(FONTCONFIG) /I$(FREETYPE)\include /I$(PIXMAN)\pixman /I$(LIBPNG) /I$(ZLIB) $*.c

$(CAIRO)\src\cairo-features.h:
	echo #ifndef CAIRO_FEATURES_H > $@
	echo #define CAIRO_FEATURES_H >> $@
	echo. >> $@
	echo #define CAIRO_HAS_FC_FONT 1 >> $@
	echo #define CAIRO_HAS_FT_FONT 1 >> $@
	echo #define CAIRO_HAS_IMAGE_SURFACE 1 >> $@
	echo #define CAIRO_HAS_PDF_SURFACE 1 >> $@
	echo #define CAIRO_HAS_PNG_FUNCTIONS 1 >> $@
	echo #define CAIRO_HAS_PS_SURFACE 1 >> $@
	echo #define CAIRO_HAS_SVG_SURFACE 1 >> $@
	echo #define CAIRO_HAS_USER_FONT 1 >> $@
	echo #define CAIRO_HAS_WIN32_FONT 1 >> $@
	echo #define CAIRO_HAS_WIN32_SURFACE 1 >> $@
	echo #define CAIRO_HAS_GOBJECT_FUNCTIONS 1 >> $@
	echo. >> $@
	echo #endif >> $@

$(pixman_OBJECTS):
	$(CC) $(CLFLAGS) /DPACKAGE=\"pixman\" /I$(PIXMAN)\pixman $*.c

cairo_gobject_OBJECTS= \
		$(CAIRO)\util\cairo-gobject\cairo-gobject-enums.obj \
		$(CAIRO)\util\cairo-gobject\cairo-gobject-structs.obj

$(CAIRO)\util\cairo-gobject\libcairo-gobject-2.dll: iwm\crt\iwmcrt.lib $(CAIRO)\util\cairo-gobject\cairo-gobject.def $(cairo_gobject_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(CAIRO)\util\cairo-gobject\cairo-gobject.def /IMPLIB:$(CAIRO)\util\cairo-gobject\cairo-gobject.lib $(CAIRO)\src\cairo.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(cairo_gobject_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(CAIRO)\util\cairo-gobject\cairo-gobject.def: $(cairo_gobject_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(cairo_gobject_OBJECTS)

$(cairo_gobject_OBJECTS):
	$(CC) $(CLFLAGS) /DDISABLE_SOME_FLOATING_POINT /I$(CAIRO)\src /I$(GLIB) /I$(GLIB)\glib $*.c

###############################################################################
# Expat                                                                       #
###############################################################################
expat: $(EXPAT)\lib\libexpat.dll

expat_OBJECTS= \
		$(EXPAT)\lib\xmlparse.obj \
		$(EXPAT)\lib\xmlrole.obj \
		$(EXPAT)\lib\xmltok.obj

$(EXPAT)\lib\libexpat.dll: iwm\crt\iwmcrt.lib $(expat_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(EXPAT)\lib\libexpat.def $(expat_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(expat_OBJECTS):
	$(CC) $(CLFLAGS) /DCOMPILED_FROM_DSP /DEXPAT_EXPORTS $*.c

###############################################################################
# fontconfig                                                                  #
###############################################################################
fontconfig: expat freetype $(FONTCONFIG)\src\libfontconfig-1.dll

fontconfig_OBJECTS= \
		$(FONTCONFIG)\src\fcatomic.obj \
		$(FONTCONFIG)\src\fcblanks.obj \
		$(FONTCONFIG)\src\fccache.obj \
		$(FONTCONFIG)\src\fccfg.obj \
		$(FONTCONFIG)\src\fccharset.obj \
		$(FONTCONFIG)\src\fcdbg.obj \
		$(FONTCONFIG)\src\fcdefault.obj \
		$(FONTCONFIG)\src\fcdir.obj \
		$(FONTCONFIG)\src\fcformat.obj \
		$(FONTCONFIG)\src\fcfreetype.obj \
		$(FONTCONFIG)\src\fcfs.obj \
		$(FONTCONFIG)\src\fcinit.obj \
		$(FONTCONFIG)\src\fclang.obj \
		$(FONTCONFIG)\src\fclist.obj \
		$(FONTCONFIG)\src\fcmatch.obj \
		$(FONTCONFIG)\src\fcmatrix.obj \
		$(FONTCONFIG)\src\fcname.obj \
		$(FONTCONFIG)\src\fcpat.obj \
		$(FONTCONFIG)\src\fcserialize.obj \
		$(FONTCONFIG)\src\fcstat.obj \
		$(FONTCONFIG)\src\fcstr.obj \
		$(FONTCONFIG)\src\fcxml.obj \
		$(FONTCONFIG)\src\ftglue.obj

$(FONTCONFIG)\src\libfontconfig-1.dll: iwm\crt\iwmcrt.lib $(FONTCONFIG)\src\fontconfig.def $(fontconfig_OBJECTS) iwm\dirent\dirent.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(FONTCONFIG)\src\fontconfig.def /IMPLIB:$(FONTCONFIG)\src\fontconfig.lib $(EXPAT)\lib\libexpat.lib $(FREETYPE)\src\freetype.lib $(fontconfig_OBJECTS) iwm\dirent\dirent.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(FONTCONFIG)\src\fontconfig.def: $(fontconfig_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(fontconfig_OBJECTS)

$(fontconfig_OBJECTS): $(FONTCONFIG)\src\fcaliastail.h $(FONTCONFIG)\src\fcftaliastail.h
	$(CC) $(CLFLAGS) /DFC_CACHEDIR=\".\" /DFC_DEFAULT_FONTS=\".\" /DFLEXIBLE_ARRAY_MEMBER=1 /DFONTCONFIG_PATH /DHAVE_FT_GET_NEXT_CHAR /DHAVE_RAND /DHAVE_STDINT_H /DHAVE_UNISTD_H /Dsnprintf=_snprintf /I$(FONTCONFIG) /I$(FONTCONFIG)\src /I$(EXPAT)\lib /I$(FREETYPE)\include /Iiwm\dirent /Iiwm\fontconfig $*.c

$(FONTCONFIG)\src\fcstr.obj: $(FONTCONFIG)\fc-case\fccase.h

$(FONTCONFIG)\fc-case\fccase.h: $(FONTCONFIG)\fc-case\fc-case.exe $(FONTCONFIG)\fc-case\CaseFolding.txt $(FONTCONFIG)\fc-case\fccase.tmpl.h
	$(FONTCONFIG)\fc-case\fc-case.exe $(FONTCONFIG)\fc-case\CaseFolding.txt < $(FONTCONFIG)\fc-case\fccase.tmpl.h > $@

$(FONTCONFIG)\fc-case\fc-case.exe: $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(FONTCONFIG)\fc-case\fc-case.obj:
	$(CC) $(CLFLAGS) /DFLEXIBLE_ARRAY_MEMBER=1 /DHAVE_STDINT_H /DHAVE_UNISTD_H /I$(FONTCONFIG) /I$(FONTCONFIG)\src /I$(FREETYPE)\include /Iiwm\fontconfig $*.c

$(FONTCONFIG)\src\fcfreetype.obj: $(FONTCONFIG)\fc-glyphname\fcglyphname.h

$(FONTCONFIG)\fc-glyphname\fcglyphname.h: $(FONTCONFIG)\fc-glyphname\fc-glyphname.exe $(FONTCONFIG)\fc-glyphname\zapfdingbats.txt $(FONTCONFIG)\fc-glyphname\fcglyphname.tmpl.h
	$(FONTCONFIG)\fc-glyphname\fc-glyphname.exe $(FONTCONFIG)\fc-glyphname\zapfdingbats.txt < $(FONTCONFIG)\fc-glyphname\fcglyphname.tmpl.h > $@

$(FONTCONFIG)\fc-glyphname\fc-glyphname.exe: $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(FONTCONFIG)\fc-glyphname\fc-glyphname.obj:
	$(CC) $(CLFLAGS) /DFLEXIBLE_ARRAY_MEMBER=1 /DHAVE_STDINT_H /DHAVE_UNISTD_H /I$(FONTCONFIG) /I$(FONTCONFIG)\src /I$(FREETYPE)\include /Iiwm\fontconfig $*.c

$(FONTCONFIG)\src\fclang.obj: $(FONTCONFIG)\fc-lang\fclang.h

fontconfig_0_ORTHS= \
		$(FONTCONFIG)\fc-lang\aa.orth \
		$(FONTCONFIG)\fc-lang\ab.orth \
		$(FONTCONFIG)\fc-lang\af.orth \
		$(FONTCONFIG)\fc-lang\ak.orth \
		$(FONTCONFIG)\fc-lang\am.orth \
		$(FONTCONFIG)\fc-lang\an.orth \
		$(FONTCONFIG)\fc-lang\ar.orth \
		$(FONTCONFIG)\fc-lang\as.orth \
		$(FONTCONFIG)\fc-lang\ast.orth \
		$(FONTCONFIG)\fc-lang\av.orth \
		$(FONTCONFIG)\fc-lang\ay.orth \
		$(FONTCONFIG)\fc-lang\az_az.orth \
		$(FONTCONFIG)\fc-lang\az_ir.orth \
		$(FONTCONFIG)\fc-lang\ba.orth \
		$(FONTCONFIG)\fc-lang\be.orth \
		$(FONTCONFIG)\fc-lang\ber_dz.orth \
		$(FONTCONFIG)\fc-lang\ber_ma.orth \
		$(FONTCONFIG)\fc-lang\bg.orth \
		$(FONTCONFIG)\fc-lang\bh.orth \
		$(FONTCONFIG)\fc-lang\bho.orth \
		$(FONTCONFIG)\fc-lang\bi.orth \
		$(FONTCONFIG)\fc-lang\bin.orth \
		$(FONTCONFIG)\fc-lang\bm.orth \
		$(FONTCONFIG)\fc-lang\bn.orth \
		$(FONTCONFIG)\fc-lang\bo.orth \
		$(FONTCONFIG)\fc-lang\br.orth \
		$(FONTCONFIG)\fc-lang\brx.orth \
		$(FONTCONFIG)\fc-lang\bs.orth \
		$(FONTCONFIG)\fc-lang\bua.orth \
		$(FONTCONFIG)\fc-lang\byn.orth \
		$(FONTCONFIG)\fc-lang\ca.orth \
		$(FONTCONFIG)\fc-lang\ce.orth \
		$(FONTCONFIG)\fc-lang\ch.orth \
		$(FONTCONFIG)\fc-lang\chm.orth \
		$(FONTCONFIG)\fc-lang\chr.orth
fontconfig_1_ORTHS= \
		$(FONTCONFIG)\fc-lang\co.orth \
		$(FONTCONFIG)\fc-lang\crh.orth \
		$(FONTCONFIG)\fc-lang\cs.orth \
		$(FONTCONFIG)\fc-lang\csb.orth \
		$(FONTCONFIG)\fc-lang\cu.orth \
		$(FONTCONFIG)\fc-lang\cv.orth \
		$(FONTCONFIG)\fc-lang\cy.orth \
		$(FONTCONFIG)\fc-lang\da.orth \
		$(FONTCONFIG)\fc-lang\de.orth \
		$(FONTCONFIG)\fc-lang\doi.orth \
		$(FONTCONFIG)\fc-lang\dv.orth \
		$(FONTCONFIG)\fc-lang\dz.orth \
		$(FONTCONFIG)\fc-lang\ee.orth \
		$(FONTCONFIG)\fc-lang\el.orth \
		$(FONTCONFIG)\fc-lang\en.orth \
		$(FONTCONFIG)\fc-lang\eo.orth \
		$(FONTCONFIG)\fc-lang\es.orth \
		$(FONTCONFIG)\fc-lang\et.orth \
		$(FONTCONFIG)\fc-lang\eu.orth \
		$(FONTCONFIG)\fc-lang\fa.orth \
		$(FONTCONFIG)\fc-lang\fat.orth \
		$(FONTCONFIG)\fc-lang\ff.orth \
		$(FONTCONFIG)\fc-lang\fi.orth \
		$(FONTCONFIG)\fc-lang\fil.orth \
		$(FONTCONFIG)\fc-lang\fj.orth \
		$(FONTCONFIG)\fc-lang\fo.orth \
		$(FONTCONFIG)\fc-lang\fr.orth \
		$(FONTCONFIG)\fc-lang\fur.orth \
		$(FONTCONFIG)\fc-lang\fy.orth \
		$(FONTCONFIG)\fc-lang\ga.orth \
		$(FONTCONFIG)\fc-lang\gd.orth \
		$(FONTCONFIG)\fc-lang\gez.orth \
		$(FONTCONFIG)\fc-lang\gl.orth \
		$(FONTCONFIG)\fc-lang\gn.orth \
		$(FONTCONFIG)\fc-lang\gu.orth
fontconfig_2_ORTHS= \
		$(FONTCONFIG)\fc-lang\gv.orth \
		$(FONTCONFIG)\fc-lang\ha.orth \
		$(FONTCONFIG)\fc-lang\haw.orth \
		$(FONTCONFIG)\fc-lang\he.orth \
		$(FONTCONFIG)\fc-lang\hi.orth \
		$(FONTCONFIG)\fc-lang\hne.orth \
		$(FONTCONFIG)\fc-lang\ho.orth \
		$(FONTCONFIG)\fc-lang\hr.orth \
		$(FONTCONFIG)\fc-lang\hsb.orth \
		$(FONTCONFIG)\fc-lang\ht.orth \
		$(FONTCONFIG)\fc-lang\hu.orth \
		$(FONTCONFIG)\fc-lang\hy.orth \
		$(FONTCONFIG)\fc-lang\hz.orth \
		$(FONTCONFIG)\fc-lang\ia.orth \
		$(FONTCONFIG)\fc-lang\id.orth \
		$(FONTCONFIG)\fc-lang\ie.orth \
		$(FONTCONFIG)\fc-lang\ig.orth \
		$(FONTCONFIG)\fc-lang\ii.orth \
		$(FONTCONFIG)\fc-lang\ik.orth \
		$(FONTCONFIG)\fc-lang\io.orth \
		$(FONTCONFIG)\fc-lang\is.orth \
		$(FONTCONFIG)\fc-lang\it.orth \
		$(FONTCONFIG)\fc-lang\iu.orth \
		$(FONTCONFIG)\fc-lang\ja.orth \
		$(FONTCONFIG)\fc-lang\jv.orth \
		$(FONTCONFIG)\fc-lang\ka.orth \
		$(FONTCONFIG)\fc-lang\kaa.orth \
		$(FONTCONFIG)\fc-lang\kab.orth \
		$(FONTCONFIG)\fc-lang\ki.orth \
		$(FONTCONFIG)\fc-lang\kj.orth \
		$(FONTCONFIG)\fc-lang\kk.orth \
		$(FONTCONFIG)\fc-lang\kl.orth \
		$(FONTCONFIG)\fc-lang\km.orth \
		$(FONTCONFIG)\fc-lang\kn.orth \
		$(FONTCONFIG)\fc-lang\ko.orth
fontconfig_3_ORTHS= \
		$(FONTCONFIG)\fc-lang\kok.orth \
		$(FONTCONFIG)\fc-lang\kr.orth \
		$(FONTCONFIG)\fc-lang\ks.orth \
		$(FONTCONFIG)\fc-lang\kum.orth \
		$(FONTCONFIG)\fc-lang\ku_am.orth \
		$(FONTCONFIG)\fc-lang\ku_iq.orth \
		$(FONTCONFIG)\fc-lang\ku_ir.orth \
		$(FONTCONFIG)\fc-lang\ku_tr.orth \
		$(FONTCONFIG)\fc-lang\kv.orth \
		$(FONTCONFIG)\fc-lang\kw.orth \
		$(FONTCONFIG)\fc-lang\kwm.orth \
		$(FONTCONFIG)\fc-lang\ky.orth \
		$(FONTCONFIG)\fc-lang\la.orth \
		$(FONTCONFIG)\fc-lang\lah.orth \
		$(FONTCONFIG)\fc-lang\lb.orth \
		$(FONTCONFIG)\fc-lang\lez.orth \
		$(FONTCONFIG)\fc-lang\lg.orth \
		$(FONTCONFIG)\fc-lang\li.orth \
		$(FONTCONFIG)\fc-lang\ln.orth \
		$(FONTCONFIG)\fc-lang\lo.orth \
		$(FONTCONFIG)\fc-lang\lt.orth \
		$(FONTCONFIG)\fc-lang\lv.orth \
		$(FONTCONFIG)\fc-lang\mai.orth \
		$(FONTCONFIG)\fc-lang\mg.orth \
		$(FONTCONFIG)\fc-lang\mh.orth \
		$(FONTCONFIG)\fc-lang\mi.orth \
		$(FONTCONFIG)\fc-lang\mk.orth \
		$(FONTCONFIG)\fc-lang\ml.orth \
		$(FONTCONFIG)\fc-lang\mni.orth \
		$(FONTCONFIG)\fc-lang\mn_cn.orth \
		$(FONTCONFIG)\fc-lang\mn_mn.orth \
		$(FONTCONFIG)\fc-lang\mo.orth \
		$(FONTCONFIG)\fc-lang\mr.orth \
		$(FONTCONFIG)\fc-lang\ms.orth \
		$(FONTCONFIG)\fc-lang\mt.orth
fontconfig_4_ORTHS= \
		$(FONTCONFIG)\fc-lang\my.orth \
		$(FONTCONFIG)\fc-lang\na.orth \
		$(FONTCONFIG)\fc-lang\nb.orth \
		$(FONTCONFIG)\fc-lang\nds.orth \
		$(FONTCONFIG)\fc-lang\ne.orth \
		$(FONTCONFIG)\fc-lang\ng.orth \
		$(FONTCONFIG)\fc-lang\nl.orth \
		$(FONTCONFIG)\fc-lang\nn.orth \
		$(FONTCONFIG)\fc-lang\no.orth \
		$(FONTCONFIG)\fc-lang\nqo.orth \
		$(FONTCONFIG)\fc-lang\nr.orth \
		$(FONTCONFIG)\fc-lang\nso.orth \
		$(FONTCONFIG)\fc-lang\nv.orth \
		$(FONTCONFIG)\fc-lang\ny.orth \
		$(FONTCONFIG)\fc-lang\oc.orth \
		$(FONTCONFIG)\fc-lang\om.orth \
		$(FONTCONFIG)\fc-lang\or.orth \
		$(FONTCONFIG)\fc-lang\os.orth \
		$(FONTCONFIG)\fc-lang\ota.orth \
		$(FONTCONFIG)\fc-lang\pa.orth \
		$(FONTCONFIG)\fc-lang\pap_an.orth \
		$(FONTCONFIG)\fc-lang\pap_aw.orth \
		$(FONTCONFIG)\fc-lang\pa_pk.orth \
		$(FONTCONFIG)\fc-lang\pl.orth \
		$(FONTCONFIG)\fc-lang\ps_af.orth \
		$(FONTCONFIG)\fc-lang\ps_pk.orth \
		$(FONTCONFIG)\fc-lang\pt.orth \
		$(FONTCONFIG)\fc-lang\qu.orth \
		$(FONTCONFIG)\fc-lang\rm.orth \
		$(FONTCONFIG)\fc-lang\rn.orth \
		$(FONTCONFIG)\fc-lang\ro.orth \
		$(FONTCONFIG)\fc-lang\ru.orth \
		$(FONTCONFIG)\fc-lang\rw.orth \
		$(FONTCONFIG)\fc-lang\sa.orth \
		$(FONTCONFIG)\fc-lang\sah.orth
fontconfig_5_ORTHS= \
		$(FONTCONFIG)\fc-lang\sat.orth \
		$(FONTCONFIG)\fc-lang\sc.orth \
		$(FONTCONFIG)\fc-lang\sco.orth \
		$(FONTCONFIG)\fc-lang\sd.orth \
		$(FONTCONFIG)\fc-lang\se.orth \
		$(FONTCONFIG)\fc-lang\sel.orth \
		$(FONTCONFIG)\fc-lang\sg.orth \
		$(FONTCONFIG)\fc-lang\sh.orth \
		$(FONTCONFIG)\fc-lang\shs.orth \
		$(FONTCONFIG)\fc-lang\si.orth \
		$(FONTCONFIG)\fc-lang\sid.orth \
		$(FONTCONFIG)\fc-lang\sk.orth \
		$(FONTCONFIG)\fc-lang\sl.orth \
		$(FONTCONFIG)\fc-lang\sm.orth \
		$(FONTCONFIG)\fc-lang\sma.orth \
		$(FONTCONFIG)\fc-lang\smj.orth \
		$(FONTCONFIG)\fc-lang\smn.orth \
		$(FONTCONFIG)\fc-lang\sms.orth \
		$(FONTCONFIG)\fc-lang\sn.orth \
		$(FONTCONFIG)\fc-lang\so.orth \
		$(FONTCONFIG)\fc-lang\sq.orth \
		$(FONTCONFIG)\fc-lang\sr.orth \
		$(FONTCONFIG)\fc-lang\ss.orth \
		$(FONTCONFIG)\fc-lang\st.orth \
		$(FONTCONFIG)\fc-lang\su.orth \
		$(FONTCONFIG)\fc-lang\sv.orth \
		$(FONTCONFIG)\fc-lang\sw.orth \
		$(FONTCONFIG)\fc-lang\syr.orth \
		$(FONTCONFIG)\fc-lang\ta.orth \
		$(FONTCONFIG)\fc-lang\te.orth \
		$(FONTCONFIG)\fc-lang\tg.orth \
		$(FONTCONFIG)\fc-lang\th.orth \
		$(FONTCONFIG)\fc-lang\tig.orth \
		$(FONTCONFIG)\fc-lang\ti_er.orth
fontconfig_6_ORTHS= \
		$(FONTCONFIG)\fc-lang\ti_et.orth \
		$(FONTCONFIG)\fc-lang\tk.orth \
		$(FONTCONFIG)\fc-lang\tl.orth \
		$(FONTCONFIG)\fc-lang\tn.orth \
		$(FONTCONFIG)\fc-lang\to.orth \
		$(FONTCONFIG)\fc-lang\tr.orth \
		$(FONTCONFIG)\fc-lang\ts.orth \
		$(FONTCONFIG)\fc-lang\tt.orth \
		$(FONTCONFIG)\fc-lang\tw.orth \
		$(FONTCONFIG)\fc-lang\ty.orth \
		$(FONTCONFIG)\fc-lang\tyv.orth \
		$(FONTCONFIG)\fc-lang\ug.orth \
		$(FONTCONFIG)\fc-lang\uk.orth \
		$(FONTCONFIG)\fc-lang\ur.orth \
		$(FONTCONFIG)\fc-lang\uz.orth \
		$(FONTCONFIG)\fc-lang\ve.orth \
		$(FONTCONFIG)\fc-lang\vi.orth \
		$(FONTCONFIG)\fc-lang\vo.orth \
		$(FONTCONFIG)\fc-lang\vot.orth \
		$(FONTCONFIG)\fc-lang\wa.orth \
		$(FONTCONFIG)\fc-lang\wal.orth \
		$(FONTCONFIG)\fc-lang\wen.orth \
		$(FONTCONFIG)\fc-lang\wo.orth \
		$(FONTCONFIG)\fc-lang\xh.orth \
		$(FONTCONFIG)\fc-lang\yap.orth \
		$(FONTCONFIG)\fc-lang\yi.orth \
		$(FONTCONFIG)\fc-lang\yo.orth \
		$(FONTCONFIG)\fc-lang\za.orth \
		$(FONTCONFIG)\fc-lang\zh_cn.orth \
		$(FONTCONFIG)\fc-lang\zh_hk.orth \
		$(FONTCONFIG)\fc-lang\zh_mo.orth \
		$(FONTCONFIG)\fc-lang\zh_sg.orth \
		$(FONTCONFIG)\fc-lang\zh_tw.orth \
		$(FONTCONFIG)\fc-lang\zu.orth

$(FONTCONFIG)\fc-lang\fclang.h: $(FONTCONFIG)\fc-lang\fc-lang.exe $(fontconfig_0_ORTHS) $(fontconfig_1_ORTHS) $(fontconfig_2_ORTHS) $(fontconfig_3_ORTHS) $(fontconfig_4_ORTHS) $(fontconfig_5_ORTHS) $(fontconfig_6_ORTHS) $(FONTCONFIG)\fc-lang\fclang.tmpl.h iwm\iwm-runcommand-win32.exe
	echo $(FONTCONFIG)\fc-lang\fc-lang.exe -d $(FONTCONFIG)\fc-lang > fc-lang.tmp
	for %f in ($(fontconfig_0_ORTHS)) do echo %f >> fc-lang.tmp
	for %f in ($(fontconfig_1_ORTHS)) do echo %f >> fc-lang.tmp
	for %f in ($(fontconfig_2_ORTHS)) do echo %f >> fc-lang.tmp
	for %f in ($(fontconfig_3_ORTHS)) do echo %f >> fc-lang.tmp
	for %f in ($(fontconfig_4_ORTHS)) do echo %f >> fc-lang.tmp
	for %f in ($(fontconfig_5_ORTHS)) do echo %f >> fc-lang.tmp
	for %f in ($(fontconfig_6_ORTHS)) do echo %f >> fc-lang.tmp
	iwm\iwm-runcommand-win32.exe fc-lang.tmp < $(FONTCONFIG)\fc-lang\fclang.tmpl.h > $@
	del fc-lang.tmp

$(FONTCONFIG)\fc-lang\fc-lang.exe: $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(FONTCONFIG)\fc-lang\fc-lang.obj: $(FONTCONFIG)\fc-case\fccase.h
	$(CC) $(CLFLAGS) /DFLEXIBLE_ARRAY_MEMBER=1 /DHAVE_STDINT_H /DHAVE_UNISTD_H /I$(FONTCONFIG) /I$(FONTCONFIG)\src /I$(FREETYPE)\include /Iiwm\fontconfig $*.c

$(FONTCONFIG)\src\fcaliastail.h:
	echo. >> $@

$(FONTCONFIG)\src\fcftaliastail.h:
	echo. >> $@

###############################################################################
# FreeType                                                                    #
###############################################################################
freetype: $(FREETYPE)\src\freetype6.dll

freetype_autofit_OBJECTS= \
		$(FREETYPE)\src\autofit\afangles.obj \
		$(FREETYPE)\src\autofit\afcjk.obj \
		$(FREETYPE)\src\autofit\afdummy.obj \
		$(FREETYPE)\src\autofit\afglobal.obj \
		$(FREETYPE)\src\autofit\afhints.obj \
		$(FREETYPE)\src\autofit\afindic.obj \
		$(FREETYPE)\src\autofit\aflatin.obj \
		$(FREETYPE)\src\autofit\afloader.obj \
		$(FREETYPE)\src\autofit\afmodule.obj \
		$(FREETYPE)\src\autofit\afpic.obj \
		$(FREETYPE)\src\autofit\afwarp.obj
freetype_base_OBJECTS= \
		$(FREETYPE)\src\base\basepic.obj \
#		$(FREETYPE)\src\base\ftadvanc.obj \
		$(FREETYPE)\src\base\ftapi.obj \
		$(FREETYPE)\src\base\ftbase.obj \
		$(FREETYPE)\src\base\ftbbox.obj \
		$(FREETYPE)\src\base\ftbdf.obj \
		$(FREETYPE)\src\base\ftbitmap.obj \
#		$(FREETYPE)\src\base\ftcalc.obj \
		$(FREETYPE)\src\base\ftcid.obj \
#		$(FREETYPE)\src\base\ftdbgmem.obj \
		$(FREETYPE)\src\base\ftdebug.obj \
		$(FREETYPE)\src\base\ftfstype.obj \
		$(FREETYPE)\src\base\ftgasp.obj \
#		$(FREETYPE)\src\base\ftgloadr.obj \
		$(FREETYPE)\src\base\ftglyph.obj \
		$(FREETYPE)\src\base\ftgxval.obj \
		$(FREETYPE)\src\base\ftinit.obj \
		$(FREETYPE)\src\base\ftlcdfil.obj \
#		$(FREETYPE)\src\base\ftmac.obj \
		$(FREETYPE)\src\base\ftmm.obj \
#		$(FREETYPE)\src\base\ftobjs.obj \
		$(FREETYPE)\src\base\ftotval.obj \
#		$(FREETYPE)\src\base\ftoutln.obj \
		$(FREETYPE)\src\base\ftpatent.obj \
		$(FREETYPE)\src\base\ftpfr.obj \
		$(FREETYPE)\src\base\ftpic.obj \
#		$(FREETYPE)\src\base\ftrfork.obj \
#		$(FREETYPE)\src\base\ftsnames.obj \
#		$(FREETYPE)\src\base\ftstream.obj \
		$(FREETYPE)\src\base\ftstroke.obj \
		$(FREETYPE)\src\base\ftsynth.obj \
		$(FREETYPE)\src\base\ftsystem.obj \
#		$(FREETYPE)\src\base\fttrigon.obj \
		$(FREETYPE)\src\base\fttype1.obj \
#		$(FREETYPE)\src\base\ftutil.obj \
		$(FREETYPE)\src\base\ftwinfnt.obj \
		$(FREETYPE)\src\base\ftxf86.obj
freetype_bdf_OBJECTS= \
		$(FREETYPE)\src\bdf\bdf.obj \
#		$(FREETYPE)\src\bdf\bdfdrivr.obj \
		$(FREETYPE)\src\bdf\bdflib.obj
freetype_bzip2_OBJECTS= \
		$(FREETYPE)\src\bzip2\ftbzip2.obj
freetype_cache_OBJECTS= \
		$(FREETYPE)\src\cache\ftcache.obj
#		$(FREETYPE)\src\cache\ftcbasic.obj \
#		$(FREETYPE)\src\cache\ftccache.obj \
#		$(FREETYPE)\src\cache\ftccmap.obj \
#		$(FREETYPE)\src\cache\ftcglyph.obj \
#		$(FREETYPE)\src\cache\ftcimage.obj \
#		$(FREETYPE)\src\cache\ftcmanag.obj \
#		$(FREETYPE)\src\cache\ftcmru.obj \
#		$(FREETYPE)\src\cache\ftcsbits.obj \
freetype_cff_OBJECTS= \
		$(FREETYPE)\src\cff\cffcmap.obj \
		$(FREETYPE)\src\cff\cffdrivr.obj \
		$(FREETYPE)\src\cff\cffgload.obj \
		$(FREETYPE)\src\cff\cffload.obj \
		$(FREETYPE)\src\cff\cffobjs.obj \
		$(FREETYPE)\src\cff\cffparse.obj \
		$(FREETYPE)\src\cff\cffpic.obj \
		$(FREETYPE)\src\cff\cf2arrst.obj \
		$(FREETYPE)\src\cff\cf2blues.obj \
		$(FREETYPE)\src\cff\cf2error.obj \
		$(FREETYPE)\src\cff\cf2font.obj \
		$(FREETYPE)\src\cff\cf2ft.obj \
		$(FREETYPE)\src\cff\cf2hints.obj \
		$(FREETYPE)\src\cff\cf2intrp.obj \
		$(FREETYPE)\src\cff\cf2read.obj \
		$(FREETYPE)\src\cff\cf2stack.obj
freetype_cid_OBJECTS= \
		$(FREETYPE)\src\cid\cidgload.obj \
		$(FREETYPE)\src\cid\cidload.obj \
		$(FREETYPE)\src\cid\cidobjs.obj \
		$(FREETYPE)\src\cid\cidparse.obj \
#		$(FREETYPE)\src\cid\cidriver.obj \
		$(FREETYPE)\src\cid\type1cid.obj
freetype_gxvalid_OBJECTS= \
		$(FREETYPE)\src\gxvalid\gxvalid.obj \
		$(FREETYPE)\src\gxvalid\gxvbsln.obj \
		$(FREETYPE)\src\gxvalid\gxvcommn.obj \
		$(FREETYPE)\src\gxvalid\gxvfeat.obj \
#		$(FREETYPE)\src\gxvalid\gxvfgen.obj \
		$(FREETYPE)\src\gxvalid\gxvjust.obj \
		$(FREETYPE)\src\gxvalid\gxvkern.obj \
		$(FREETYPE)\src\gxvalid\gxvlcar.obj \
#		$(FREETYPE)\src\gxvalid\gxvmod.obj \
		$(FREETYPE)\src\gxvalid\gxvmort.obj \
		$(FREETYPE)\src\gxvalid\gxvmort0.obj \
		$(FREETYPE)\src\gxvalid\gxvmort1.obj \
		$(FREETYPE)\src\gxvalid\gxvmort2.obj \
		$(FREETYPE)\src\gxvalid\gxvmort4.obj \
		$(FREETYPE)\src\gxvalid\gxvmort5.obj \
		$(FREETYPE)\src\gxvalid\gxvmorx.obj \
		$(FREETYPE)\src\gxvalid\gxvmorx0.obj \
		$(FREETYPE)\src\gxvalid\gxvmorx1.obj \
		$(FREETYPE)\src\gxvalid\gxvmorx2.obj \
		$(FREETYPE)\src\gxvalid\gxvmorx4.obj \
		$(FREETYPE)\src\gxvalid\gxvmorx5.obj \
		$(FREETYPE)\src\gxvalid\gxvopbd.obj \
		$(FREETYPE)\src\gxvalid\gxvprop.obj \
		$(FREETYPE)\src\gxvalid\gxvtrak.obj
freetype_gzip_OBJECTS= \
#		$(FREETYPE)\src\gzip\adler32.obj \
		$(FREETYPE)\src\gzip\ftgzip.obj
#		$(FREETYPE)\src\gzip\infblock.obj \
#		$(FREETYPE)\src\gzip\infcodes.obj \
#		$(FREETYPE)\src\gzip\inflate.obj \
#		$(FREETYPE)\src\gzip\inftrees.obj \
#		$(FREETYPE)\src\gzip\infutil.obj \
#		$(FREETYPE)\src\gzip\zutil.obj \
freetype_lzw_OBJECTS= \
		$(FREETYPE)\src\lzw\ftlzw.obj
#		$(FREETYPE)\src\lzw\ftzopen.obj
freetype_otvalid_OBJECTS= \
		$(FREETYPE)\src\otvalid\otvalid.obj \
		$(FREETYPE)\src\otvalid\otvbase.obj \
		$(FREETYPE)\src\otvalid\otvcommn.obj \
		$(FREETYPE)\src\otvalid\otvgdef.obj \
		$(FREETYPE)\src\otvalid\otvgpos.obj \
		$(FREETYPE)\src\otvalid\otvgsub.obj \
		$(FREETYPE)\src\otvalid\otvjstf.obj \
		$(FREETYPE)\src\otvalid\otvmath.obj
#		$(FREETYPE)\src\otvalid\otvmod.obj
freetype_pcf_OBJECTS= \
		$(FREETYPE)\src\pcf\pcf.obj \
#		$(FREETYPE)\src\pcf\pcfdrivr.obj \
		$(FREETYPE)\src\pcf\pcfread.obj \
		$(FREETYPE)\src\pcf\pcfutil.obj
freetype_pfr_OBJECTS= \
		$(FREETYPE)\src\pfr\pfr.obj \
#		$(FREETYPE)\src\pfr\pfrcmap.obj \
#		$(FREETYPE)\src\pfr\pfrdrivr.obj \
		$(FREETYPE)\src\pfr\pfrgload.obj \
		$(FREETYPE)\src\pfr\pfrload.obj \
		$(FREETYPE)\src\pfr\pfrobjs.obj \
		$(FREETYPE)\src\pfr\pfrsbit.obj
freetype_psaux_OBJECTS= \
		$(FREETYPE)\src\psaux\afmparse.obj \
		$(FREETYPE)\src\psaux\psaux.obj \
#		$(FREETYPE)\src\psaux\psauxmod.obj \
		$(FREETYPE)\src\psaux\psconv.obj \
		$(FREETYPE)\src\psaux\psobjs.obj \
#		$(FREETYPE)\src\psaux\t1cmap.obj \
		$(FREETYPE)\src\psaux\t1decode.obj
freetype_pshinter_OBJECTS= \
#		$(FREETYPE)\src\pshinter\pshalgo.obj \
		$(FREETYPE)\src\pshinter\pshglob.obj \
		$(FREETYPE)\src\pshinter\pshinter.obj \
#		$(FREETYPE)\src\pshinter\pshmod.obj \
		$(FREETYPE)\src\pshinter\pshpic.obj \
		$(FREETYPE)\src\pshinter\pshrec.obj
freetype_psnames_OBJECTS= \
#		$(FREETYPE)\src\psnames\psmodule.obj \
		$(FREETYPE)\src\psnames\psnames.obj \
		$(FREETYPE)\src\psnames\pspic.obj
freetype_raster_OBJECTS= \
#		$(FREETYPE)\src\raster\ftraster.obj \
#		$(FREETYPE)\src\raster\ftrend1.obj \
		$(FREETYPE)\src\raster\raster.obj \
		$(FREETYPE)\src\raster\rastpic.obj
freetype_sfnt_OBJECTS= \
#		$(FREETYPE)\src\sfnt\sfdriver.obj \
		$(FREETYPE)\src\sfnt\sfnt.obj \
		$(FREETYPE)\src\sfnt\sfntpic.obj \
#		$(FREETYPE)\src\sfnt\sfobjs.obj \
		$(FREETYPE)\src\sfnt\ttbdf.obj \
#		$(FREETYPE)\src\sfnt\ttcmap.obj \
		$(FREETYPE)\src\sfnt\ttkern.obj \
		$(FREETYPE)\src\sfnt\ttload.obj \
		$(FREETYPE)\src\sfnt\ttmtx.obj \
#		$(FREETYPE)\src\sfnt\ttpost.obj \
		$(FREETYPE)\src\sfnt\ttsbit.obj
#		$(FREETYPE)\src\sfnt\ttsbit0.obj
freetype_smooth_OBJECTS= \
#		$(FREETYPE)\src\smooth\ftgrays.obj \
#		$(FREETYPE)\src\smooth\ftsmooth.obj \
		$(FREETYPE)\src\smooth\ftspic.obj \
		$(FREETYPE)\src\smooth\smooth.obj
#freetype_tools_OBJECTS= \
#		$(FREETYPE)\src\tools\apinames.obj \
#		$(FREETYPE)\src\tools\test_afm.obj \
#		$(FREETYPE)\src\tools\test_bbox.obj \
#		$(FREETYPE)\src\tools\test_trig.obj \
#		$(FREETYPE)\src\tools\ftrandom\ftrandom.obj
freetype_truetype_OBJECTS= \
		$(FREETYPE)\src\truetype\truetype.obj \
#		$(FREETYPE)\src\truetype\ttdriver.obj \
#		$(FREETYPE)\src\truetype\ttgload.obj \
		$(FREETYPE)\src\truetype\ttgxvar.obj \
#		$(FREETYPE)\src\truetype\ttinterp.obj \
#		$(FREETYPE)\src\truetype\ttobjs.obj \
		$(FREETYPE)\src\truetype\ttpic.obj \
		$(FREETYPE)\src\truetype\ttpload.obj
freetype_type1_OBJECTS= \
		$(FREETYPE)\src\type1\t1afm.obj \
		$(FREETYPE)\src\type1\t1driver.obj \
		$(FREETYPE)\src\type1\t1gload.obj \
		$(FREETYPE)\src\type1\t1load.obj \
		$(FREETYPE)\src\type1\t1objs.obj \
		$(FREETYPE)\src\type1\t1parse.obj
#		$(FREETYPE)\src\type1\type1.obj
freetype_type42_OBJECTS= \
#		$(FREETYPE)\src\type42\t42drivr.obj \
		$(FREETYPE)\src\type42\t42objs.obj \
		$(FREETYPE)\src\type42\t42parse.obj \
		$(FREETYPE)\src\type42\type42.obj
freetype_winfonts_OBJECTS= \
		$(FREETYPE)\src\winfonts\winfnt.obj
freetype_OBJECTS= \
		$(freetype_autofit_OBJECTS) \
		$(freetype_base_OBJECTS) \
		$(freetype_bdf_OBJECTS) \
		$(freetype_bzip2_OBJECTS) \
		$(freetype_cache_OBJECTS) \
		$(freetype_cff_OBJECTS) \
		$(freetype_cid_OBJECTS) \
		$(freetype_gxvalid_OBJECTS) \
		$(freetype_gzip_OBJECTS) \
		$(freetype_lzw_OBJECTS) \
		$(freetype_otvalid_OBJECTS) \
		$(freetype_pcf_OBJECTS) \
		$(freetype_pfr_OBJECTS) \
		$(freetype_psaux_OBJECTS) \
		$(freetype_pshinter_OBJECTS) \
		$(freetype_psnames_OBJECTS) \
		$(freetype_raster_OBJECTS) \
		$(freetype_sfnt_OBJECTS) \
		$(freetype_smooth_OBJECTS) \
#		$(freetype_tools_OBJECTS) \
		$(freetype_truetype_OBJECTS) \
		$(freetype_type1_OBJECTS) \
		$(freetype_type42_OBJECTS) \
		$(freetype_winfonts_OBJECTS)

$(FREETYPE)\src\freetype6.dll: iwm\crt\iwmcrt.lib $(FREETYPE)\src\freetype.def $(freetype_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(FREETYPE)\src\freetype.def /IMPLIB:$(FREETYPE)\src\freetype.lib $(freetype_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(FREETYPE)\src\freetype.def: $(freetype_OBJECTS) iwm\iwm-makedef-win32.exe iwm\iwm-runcommand-win32.exe
	echo iwm\iwm-makedef-win32.exe > freetype.tmp
	echo -o >> freetype.tmp
	echo $@ >> freetype.tmp
	for %f in ($(freetype_autofit_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_base_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_bdf_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_bzip2_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_cache_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_cid_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_gxvalid_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_gzip_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_lzw_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_otvalid_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_pcf_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_pfr_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_psaux_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_pshinter_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_psnames_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_raster_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_sfnt_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_smooth_OBJECTS)) do echo %f >> freetype.tmp
#	for %f in ($(freetype_tools_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_truetype_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_type1_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_type42_OBJECTS)) do echo %f >> freetype.tmp
	for %f in ($(freetype_winfonts_OBJECTS)) do echo %f >> freetype.tmp
	iwm\iwm-runcommand-win32.exe freetype.tmp
	del freetype.tmp

$(freetype_OBJECTS):
	$(CC) $(CLFLAGS) /D_LIB /DFT2_BUILD_LIBRARY /DTT_CONFIG_OPTION_BYTECODE_INTERPRETER /I$(FREETYPE)\include $*.c

###############################################################################
# GDK-Pixbuf                                                                  #
###############################################################################
gdk-pixbuf: jpeg libpng tiff \
		$(GDK_PIXBUF)\gdk-pixbuf\libgdk_pixbuf-2.0-0.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-ani.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-bmp.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-gif.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-icns.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-ico.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-jpeg.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-pcx.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-png.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-pnm.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-qtif.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-ras.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-tga.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-tiff.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-wbmp.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-xbm.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-xpm.dll \
!ifdef GIT
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-csource.exe \
!endif
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-query-loaders.exe

gdk_pixbuf_LOADERS= \
		libpixbufloader-ani \
		libpixbufloader-bmp \
		libpixbufloader-gif \
		libpixbufloader-icns \
		libpixbufloader-ico \
		libpixbufloader-jpeg \
		libpixbufloader-pcx \
		libpixbufloader-png \
		libpixbufloader-pnm \
		libpixbufloader-qtif \
		libpixbufloader-ras \
		libpixbufloader-tga \
		libpixbufloader-tiff \
		libpixbufloader-wbmp \
		libpixbufloader-xbm \
		libpixbufloader-xpm

gdk_pixbuf_OBJECTS= \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-animation.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-data.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-io.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-loader.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-pixdata.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-scale.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-scaled-anim.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-simple-anim.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-util.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixdata.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-enum-types.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\io-pixdata.obj \
		\
		$(GDK_PIXBUF)\gdk-pixbuf\pixops\pixops.obj

$(GDK_PIXBUF)\gdk-pixbuf\libgdk_pixbuf-2.0-0.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.def $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.res $(gdk_pixbuf_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.def /IMPLIB:$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gio\gio-2.0.lib $(GLIB)\gmodule\gmodule-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(ICONVMLANG)\intl.lib kernel32.lib user32.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.res $(gdk_pixbuf_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

!ifdef GIT
$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.def: $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf.symbols
	echo EXPORTS > $@
	$(CC) /EP /DINCLUDE_VARIABLES /DG_OS_WIN32 /DALL_FILES /DG_GNUC_CONST= /DG_GNUC_NULL_TERMINATED= $** >> $@
!endif

$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.res: $*.rc
	$(RC) $(RCFLAGS) $*.rc

!ifdef GIT
$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GDK_PIXBUF_MAJOR@=$(GDK_PIXBUF_MAJOR_VERSION) @GDK_PIXBUF_MINOR@=$(GDK_PIXBUF_MINOR_VERSION) @GDK_PIXBUF_MICRO@=$(GDK_PIXBUF_MICRO_VERSION) @GDK_PIXBUF_VERSION@=$(GDK_PIXBUF_VERSION) @GDK_PIXBUF_API_VERSION@=2.0 @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(gdk_pixbuf_OBJECTS): $(GDK_PIXBUF)\config.h $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-enum-types.h $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-features.h $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-marshal.c $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-marshal.h
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(JPEG) /I$(LIBPNG) /I$(ZLIB) $*.c

!ifdef GIT
$(GDK_PIXBUF)\config.h: $@.win32.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GETTEXT_PACKAGE@=gdk-pixbuf @GDK_PIXBUF_MAJOR@=$(GDK_PIXBUF_MAJOR_VERSION) @GDK_PIXBUF_MINOR@=$(GDK_PIXBUF_MINOR_VERSION) @GDK_PIXBUF_MICRO@=$(GDK_PIXBUF_MICRO_VERSION) < $@.win32.in > $@
!else
$(GDK_PIXBUF)\config.h:
	copy /y $@.win32 $@
!endif

!ifdef GIT
gdk_pixbuf_headers= \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf.h \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-core.h \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-loader.h \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-transform.h

$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-enum-types.c: $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-enum-types.c.template $(gdk_pixbuf_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		$(gdk_pixbuf_headers) > $@

$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-enum-types.h: $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-enum-types.h.template $(gdk_pixbuf_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
		--ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
		$(gdk_pixbuf_headers) ) > $@

$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-features.h: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GDK_PIXBUF_MAJOR@=$(GTK_MAJOR_VERSION) @GDK_PIXBUF_MINOR@=$(GTK_MINOR_VERSION) @GDK_PIXBUF_MICRO@=$(GTK_MICRO_VERSION) @GDK_PIXBUF_VERSION@=$(GTK_VERSION) < $@.in > $@

$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-marshal.c: $(GLIB)\gobject\glib-genmarshal.exe $*.list
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	$(GLIB)\gobject\glib-genmarshal.exe --prefix=_gdk_pixbuf_marshal $*.list --body > $@
	del iconv.dll
	del intl.dll
	del libglib-2.0-0.dll

$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-marshal.h: $(GLIB)\gobject\glib-genmarshal.exe $*.list
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	$(GLIB)\gobject\glib-genmarshal.exe --prefix=_gdk_pixbuf_marshal $*.list --header > $@
	del iconv.dll
	del intl.dll
	del libglib-2.0-0.dll
!endif

# libpixbufloader-ani
libpixbufloader_ani_OBJECTS= \
		$(GDK_PIXBUF)\gdk-pixbuf\io-ani.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\io-ani-animation.obj

$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-ani.dll: iwm\crt\iwmcrt.lib $(libpixbufloader_ani_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(libpixbufloader_ani_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(libpixbufloader_ani_OBJECTS):
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $*.c

# libpixbufloader-bmp
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-bmp.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-bmp.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-bmp.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-bmp.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-gif
libpixbufloader_gif_OBJECTS= \
		$(GDK_PIXBUF)\gdk-pixbuf\io-gif.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\io-gif-animation.obj

$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-gif.dll: iwm\crt\iwmcrt.lib $(libpixbufloader_gif_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(libpixbufloader_gif_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(libpixbufloader_gif_OBJECTS):
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $*.c

# libpixbufloader-icns
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-icns.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-icns.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-icns.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-icns.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-ico
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-ico.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-ico.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-ico.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-ico.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-jpeg
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-jpeg.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-jpeg.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(JPEG)\libjpeg.lib $(GDK_PIXBUF)\gdk-pixbuf\io-jpeg.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-jpeg.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(JPEG) $**

# libpixbufloader-pcx
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-pcx.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-pcx.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-pcx.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-pcx.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-png
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-png.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-png.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(LIBPNG)\libpng15.lib $(GDK_PIXBUF)\gdk-pixbuf\io-png.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-png.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(LIBPNG) /I$(ZLIB) $*.c

# libpixbufloader-pnm
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-pnm.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-pnm.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-pnm.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-pnm.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-qtif
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-qtif.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-qtif.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-qtif.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-qtif.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-ras
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-ras.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-ras.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-ras.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-ras.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-tga
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-tga.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-tga.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-tga.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-tga.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-tiff
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-tiff.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-tiff.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(TIFF)\libtiff\libtiff.lib $(GDK_PIXBUF)\gdk-pixbuf\io-tiff.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-tiff.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(TIFF)\libtiff $**

# libpixbufloader-wbmp
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-wbmp.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-wbmp.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-wbmp.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-wbmp.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-xbm
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-xbm.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-xbm.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-xbm.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-xbm.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# libpixbufloader-xpm
$(GDK_PIXBUF)\gdk-pixbuf\libpixbufloader-xpm.dll: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\io-xpm.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:fill_vtable /EXPORT:fill_info $(ICONVMLANG)\intl.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\io-xpm.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GDK_PIXBUF)\gdk-pixbuf\io-xpm.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

# gdk-pixbuf-csource
$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-csource.exe: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.res $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-csource.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $**

# gdk-pixbuf-query-loaders
$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-query-loaders.exe: iwm\crt\iwmcrt.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.res $(GDK_PIXBUF)\gdk-pixbuf\queryloaders.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $(GLIB)\gmodule\gmodule-2.0.lib $(GLIB)\gobject\gobject-2.0.lib kernel32.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.res $(GDK_PIXBUF)\gdk-pixbuf\queryloaders.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GDK_PIXBUF)\gdk-pixbuf\queryloaders.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GdkPixbuf\" /DGDK_PIXBUF_COMPILATION /DGDK_PIXBUF_LOCALEDIR=\"/share/locale\" /DGDK_PIXBUF_LIBDIR=\"/target/lib\" /DGDK_PIXBUF_BINARY_VERSION=\"$(GDK_PIXBUF_VERSION)\" /DGDK_PIXBUF_PREFIX=\"/target\" /DGDK_PIXBUF_ENABLE_BACKEND /DUSE_GMODULE /DPIXBUF_LIBDIR=\"/target/lib/gdk-pixbuf-2.0/$(GDK_PIXBUF_VERSION)/loaders\" /FImsvc_recommended_pragmas.h /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) $**

###############################################################################
# GLib                                                                        #
###############################################################################
glib: iconvmlang libffi zlib \
		$(GLIB)\glib\libglib-2.0-0.dll \
		$(GLIB)\glib\gspawn-win32-helper.exe \
		$(GLIB)\glib\gspawn-win32-helper-console.exe \
		$(GLIB)\gmodule\libgmodule-2.0-0.dll \
		$(GLIB)\gthread\libgthread-2.0-0.dll \
		$(GLIB)\gobject\libgobject-2.0-0.dll \
		$(GLIB)\gobject\gobject-query.exe \
		$(GLIB)\gobject\glib-genmarshal.exe \
		$(GLIB)\gobject\glib-mkenums \
		$(GLIB)\gio\libgio-2.0-0.dll \
		$(GLIB)\gio\glib-compile-resources.exe \
		$(GLIB)\gio\glib-compile-schemas.exe

!ifdef GIT
$(GLIB)\config.h: $@.win32.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GETTEXT_PACKAGE@=glib20 @GLIB_MAJOR_VERSION@=$(GLIB_MAJOR_VERSION) @GLIB_MINOR_VERSION@=$(GLIB_MINOR_VERSION) @GLIB_MICRO_VERSION@=$(GLIB_MICRO_VERSION) @GLIB_INTERFACE_AGE@=0 @GLIB_BINARY_AGE@=$(GLIB_BINARY_AGE) < $@.win32.in > $@

$(GLIB)\glib\glibconfig.h: $@.win32.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GLIB_MAJOR_VERSION@=$(GLIB_MAJOR_VERSION) @GLIB_MINOR_VERSION@=$(GLIB_MINOR_VERSION) @GLIB_MICRO_VERSION@=$(GLIB_MICRO_VERSION) @GLIB_WIN32_STATIC_COMPILATION_DEFINE@= < $@.win32.in > $@
!else
$(GLIB)\config.h: $@.win32
	copy /y $** $@

$(GLIB)\glib\glibconfig.h: $@.win32
	copy /y $** $@
!endif

# GLib
glib_OBJECTS= \
		$(GLIB)\glib\garray.obj \
		$(GLIB)\glib\gasyncqueue.obj \
		$(GLIB)\glib\gatomic.obj \
		$(GLIB)\glib\gbacktrace.obj \
		$(GLIB)\glib\gbase64.obj \
		$(GLIB)\glib\gbitlock.obj \
		$(GLIB)\glib\gbookmarkfile.obj \
		$(GLIB)\glib\gbytes.obj \
		$(GLIB)\glib\gcharset.obj \
		$(GLIB)\glib\gchecksum.obj \
		$(GLIB)\glib\gconvert.obj \
		$(GLIB)\glib\gdataset.obj \
		$(GLIB)\glib\gdate.obj \
		$(GLIB)\glib\gdatetime.obj \
		$(GLIB)\glib\gdir.obj \
		$(GLIB)\glib\genviron.obj \
		$(GLIB)\glib\gerror.obj \
		$(GLIB)\glib\gfileutils.obj \
		$(GLIB)\glib\ggettext.obj \
		$(GLIB)\glib\ghash.obj \
		$(GLIB)\glib\ghmac.obj \
		$(GLIB)\glib\ghook.obj \
		$(GLIB)\glib\ghostutils.obj \
		$(GLIB)\glib\giochannel.obj \
		$(GLIB)\glib\gkeyfile.obj \
		$(GLIB)\glib\glib-init.obj \
		$(GLIB)\glib\glib-private.obj \
		$(GLIB)\glib\glist.obj \
		$(GLIB)\glib\gmain.obj \
		$(GLIB)\glib\gmappedfile.obj \
		$(GLIB)\glib\gmarkup.obj \
		$(GLIB)\glib\gmem.obj \
		$(GLIB)\glib\gmessages.obj \
		$(GLIB)\glib\gnode.obj \
		$(GLIB)\glib\goption.obj \
		$(GLIB)\glib\gpattern.obj \
		$(GLIB)\glib\gpoll.obj \
		$(GLIB)\glib\gprimes.obj \
		$(GLIB)\glib\gqsort.obj \
		$(GLIB)\glib\gquark.obj \
		$(GLIB)\glib\gqueue.obj \
		$(GLIB)\glib\grand.obj \
		$(GLIB)\glib\gregex.obj \
		$(GLIB)\glib\gscanner.obj \
		$(GLIB)\glib\gsequence.obj \
		$(GLIB)\glib\gshell.obj \
		$(GLIB)\glib\gslice.obj \
		$(GLIB)\glib\gslist.obj \
		$(GLIB)\glib\gstdio.obj \
		$(GLIB)\glib\gstrfuncs.obj \
		$(GLIB)\glib\gstring.obj \
		$(GLIB)\glib\gstringchunk.obj \
		$(GLIB)\glib\gtestutils.obj \
		$(GLIB)\glib\gthread.obj \
		$(GLIB)\glib\gthreadpool.obj \
		$(GLIB)\glib\gtimer.obj \
		$(GLIB)\glib\gtimezone.obj \
		$(GLIB)\glib\gtrashstack.obj \
		$(GLIB)\glib\gtree.obj \
		$(GLIB)\glib\guniprop.obj \
		$(GLIB)\glib\gutf8.obj \
		$(GLIB)\glib\gunibreak.obj \
		$(GLIB)\glib\gunicollate.obj \
		$(GLIB)\glib\gunidecomp.obj \
		$(GLIB)\glib\gurifuncs.obj \
		$(GLIB)\glib\gutils.obj \
		$(GLIB)\glib\gvariant.obj \
		$(GLIB)\glib\gvariant-core.obj \
		$(GLIB)\glib\gvariant-parser.obj \
		$(GLIB)\glib\gvariant-serialiser.obj \
		$(GLIB)\glib\gvarianttypeinfo.obj \
		$(GLIB)\glib\gvarianttype.obj \
		$(GLIB)\glib\gversion.obj \
		$(GLIB)\glib\gwakeup.obj \
		$(GLIB)\glib\gprintf.obj \
		\
		$(GLIB)\glib\giowin32.obj \
		$(GLIB)\glib\gspawn-win32.obj \
		$(GLIB)\glib\gwin32.obj \
		\
		$(GLIB)\glib\gnulib\asnprintf.obj \
		$(GLIB)\glib\gnulib\printf.obj \
		$(GLIB)\glib\gnulib\printf-args.obj \
		$(GLIB)\glib\gnulib\printf-parse.obj \
		$(GLIB)\glib\gnulib\vasnprintf.obj \
		\
		$(GLIB)\glib\libcharset\localcharset.obj \
		\
		$(GLIB)\glib\deprecated\gallocator.obj \
		$(GLIB)\glib\deprecated\gcache.obj \
		$(GLIB)\glib\deprecated\gcompletion.obj \
		$(GLIB)\glib\deprecated\grel.obj \
		$(GLIB)\glib\deprecated\gthread-deprecated.obj \
		\
		$(GLIB)\glib\gthread-win32.obj

pcre_OBJECTS= \
		$(GLIB)\glib\pcre\pcre_byte_order.obj \
		$(GLIB)\glib\pcre\pcre_chartables.obj \
		$(GLIB)\glib\pcre\pcre_compile.obj \
		$(GLIB)\glib\pcre\pcre_config.obj \
		$(GLIB)\glib\pcre\pcre_dfa_exec.obj \
		$(GLIB)\glib\pcre\pcre_exec.obj \
		$(GLIB)\glib\pcre\pcre_fullinfo.obj \
		$(GLIB)\glib\pcre\pcre_get.obj \
		$(GLIB)\glib\pcre\pcre_globals.obj \
		$(GLIB)\glib\pcre\pcre_jit_compile.obj \
		$(GLIB)\glib\pcre\pcre_newline.obj \
		$(GLIB)\glib\pcre\pcre_ord2utf8.obj \
		$(GLIB)\glib\pcre\pcre_string_utils.obj \
		$(GLIB)\glib\pcre\pcre_study.obj \
		$(GLIB)\glib\pcre\pcre_tables.obj \
		$(GLIB)\glib\pcre\pcre_valid_utf8.obj \
		$(GLIB)\glib\pcre\pcre_xclass.obj

$(GLIB)\glib\libglib-2.0-0.dll: iwm\crt\iwmcrt.lib $(GLIB)\glib\glib.def $(GLIB)\glib\glib.res $(glib_OBJECTS) $(pcre_OBJECTS) iwm\dirent\dirent.obj iwm\dirent\wdirent.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(GLIB)\glib\glib.def /IMPLIB:$(GLIB)\glib\glib-2.0.lib $(ICONVMLANG)\iconv.lib $(ICONVMLANG)\intl.lib advapi32.lib kernel32.lib ole32.lib shell32.lib user32.lib winmm.lib ws2_32.lib wsock32.lib $(GLIB)\glib\glib.res $(glib_OBJECTS) $(pcre_OBJECTS) iwm\dirent\dirent.obj iwm\dirent\wdirent.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GLIB)\glib\glib.def: $(glib_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(glib_OBJECTS)

$(GLIB)\glib\glib.res: $*.rc
	$(RC) $(RCFLAGS) $**

!ifdef GIT
$(GLIB)\glib\glib.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GLIB_MAJOR_VERSION@=$(GLIB_MAJOR_VERSION) @GLIB_MINOR_VERSION@=$(GLIB_MINOR_VERSION) @GLIB_MICRO_VERSION@=$(GLIB_MICRO_VERSION) @GLIB_VERSION@=$(GLIB_VERSION) @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(glib_OBJECTS): $(GLIB)\config.h $(GLIB)\glib\glibconfig.h
	$(CC) $(CLFLAGS) /DHAVE_CONFIG_H /DHAVE_DIRENT_H /DG_LOG_DOMAIN=\"GLib\" /DGLIB_COMPILATION /DPCRE_STATIC /DDLL_EXPORT=1 /DLIBDIR=\"/target/lib\" /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\glib /I$(ICONVMLANG) /Iiwm\dirent $*.c

$(pcre_OBJECTS): $(GLIB)\config.h $(GLIB)\glib\glibconfig.h
	$(CC) $(CLFLAGS) /DPCRE_STATIC /DHAVE_CONFIG_H /DHAVE_LONG_LONG_FORMAT /DSUPPORT_UCP /DSUPPORT_UTF8 /DNEWLINE=-1 /DMATCH_LIMIT=10000000 /DMATCH_LIMIT_RECURSION=10000000 /DMAX_NAME_SIZE=32 /DMAX_NAME_COUNT=10000 /DDMAX_DUPLENGTH=30000 /DLINK_SIZE=2 /DDEBCDIC=0 /DPOSIX_MALLOC_THRESHOLD=10 /DGLIB_COMPILATION /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\glib\pcre $*.c

# gspawn
$(GLIB)\glib\gspawn-win32-helper.exe: iwm\crt\iwmcrt.lib $(GLIB)\glib\glib.res $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:WINDOWS,5.01 $(GLIB)\glib\glib-2.0.lib kernel32.lib user32.lib $(GLIB)\glib\glib.res $*.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GLIB)\glib\gspawn-win32-helper.obj: $*.c
	$(CC) $(CLFLAGS) /DHAVE_CONFIG_H /DGLIB_COMPILATION /DG_LOG_DOMAIN=\"gspawn-win32-helper\" /DPCRE_STATIC /DDLL_EXPORT=1 /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\glib /I$(ICONVMLANG) $*.c

$(GLIB)\glib\gspawn-win32-helper-console.exe: iwm\crt\iwmcrt.lib $(GLIB)\glib\glib.res $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib kernel32.lib user32.lib $(GLIB)\glib\glib.res $*.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GLIB)\glib\gspawn-win32-helper-console.obj: $*.c
	$(CC) $(CLFLAGS) /DHAVE_CONFIG_H /DGLIB_COMPILATION /DG_LOG_DOMAIN=\"gspawn-win32-helper\" /DPCRE_STATIC /DDLL_EXPORT=1 /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\glib /I$(ICONVMLANG) $*.c

!ifdef GIT
$(GLIB)\glib\gspawn-win32-helper-console.c:
	echo #define HELPER_CONSOLE >$@
	echo #include "gspawn-win32-helper.c" >>$@
!endif

# GModule
$(GLIB)\gmodule\libgmodule-2.0-0.dll: iwm\crt\iwmcrt.lib $(GLIB)\gmodule\gmodule.def $(GLIB)\gmodule\gmodule.res $(GLIB)\gmodule\gmodule.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(GLIB)\gmodule\gmodule.def /IMPLIB:$(GLIB)\gmodule\gmodule-2.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gmodule\gmodule.res $(GLIB)\gmodule\gmodule.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GLIB)\gmodule\gmodule.def: $(GLIB)\gmodule\gmodule.obj iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(GLIB)\gmodule\gmodule.obj

$(GLIB)\gmodule\gmodule.res: $*.rc
	$(RC) $(RCFLAGS) $**

!ifdef GIT
$(GLIB)\gmodule\gmodule.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GLIB_MAJOR_VERSION@=$(GLIB_MAJOR_VERSION) @GLIB_MINOR_VERSION@=$(GLIB_MINOR_VERSION) @GLIB_MICRO_VERSION@=$(GLIB_MICRO_VERSION) @GLIB_VERSION@=$(GLIB_VERSION) @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(GLIB)\gmodule\gmodule.obj: $*.c $(GLIB)\gmodule\gmodule-win32.c $(GLIB)\gmodule\gmoduleconf.h
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GModule\" /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $*.c

$(GLIB)\gmodule\gmoduleconf.h: $@.win32
	copy /y $** $@

# GThread
$(GLIB)\gthread\libgthread-2.0-0.dll: iwm\crt\iwmcrt.lib $(GLIB)\gthread\gthread.res $(GLIB)\gthread\gthread-impl.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(GLIB)\gthread\gthread.def /IMPLIB:$(GLIB)\gthread\gthread-2.0.lib $(GLIB)\glib\glib-2.0.lib user32.lib $(GLIB)\gthread\gthread.res $(GLIB)\gthread\gthread-impl.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GLIB)\gthread\gthread.res: $*.rc
	$(RC) $(RCFLAGS) $*.rc

!ifdef GIT
$(GLIB)\gthread\gthread.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GLIB_MAJOR_VERSION@=$(GLIB_MAJOR_VERSION) @GLIB_MINOR_VERSION@=$(GLIB_MINOR_VERSION) @GLIB_MICRO_VERSION@=$(GLIB_MICRO_VERSION) @GLIB_VERSION@=$(GLIB_VERSION) @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(GLIB)\gthread\gthread-impl.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GThread\" /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gthread $**

# GObject
gobject_OBJECTS= \
		$(GLIB)\gobject\gatomicarray.obj \
		$(GLIB)\gobject\gbinding.obj \
		$(GLIB)\gobject\gboxed.obj \
		$(GLIB)\gobject\gclosure.obj \
		$(GLIB)\gobject\genums.obj \
		$(GLIB)\gobject\gmarshal.obj \
		$(GLIB)\gobject\gobject.obj \
		$(GLIB)\gobject\gobjectnotifyqueue.obj \
		$(GLIB)\gobject\gparam.obj \
		$(GLIB)\gobject\gparamspecs.obj \
		$(GLIB)\gobject\gsignal.obj \
		$(GLIB)\gobject\gsourceclosure.obj \
		$(GLIB)\gobject\gtype.obj \
		$(GLIB)\gobject\gtypemodule.obj \
		$(GLIB)\gobject\gtypeplugin.obj \
		$(GLIB)\gobject\gvalue.obj \
		$(GLIB)\gobject\gvaluearray.obj \
		$(GLIB)\gobject\gvaluetypes.obj \
		$(GLIB)\gobject\gvaluetransform.obj

$(GLIB)\gobject\libgobject-2.0-0.dll: iwm\crt\iwmcrt.lib $(GLIB)\gobject\gobject.def $(GLIB)\gobject\gobject.res $(gobject_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(GLIB)\gobject\gobject.def /IMPLIB:$(GLIB)\gobject\gobject-2.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gthread\gthread-2.0.lib $(LIBFFI)\src\ffi.lib $(GLIB)\gobject\gobject.res $(gobject_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GLIB)\gobject\gobject.def: $(gobject_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(gobject_OBJECTS)

$(GLIB)\gobject\gobject.res: $*.rc
	$(RC) $(RCFLAGS) $*.rc

!ifdef GIT
$(GLIB)\gobject\gobject.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GLIB_MAJOR_VERSION@=$(GLIB_MAJOR_VERSION) @GLIB_MINOR_VERSION@=$(GLIB_MINOR_VERSION) @GLIB_MICRO_VERSION@=$(GLIB_MICRO_VERSION) @GLIB_VERSION@=$(GLIB_VERSION) @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(gobject_OBJECTS):
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GLib-GObject\" /DGOBJECT_COMPILATION /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gobject /I$(ICONVMLANG) /I$(LIBFFI)\include /I$(LIBFFI)\src\x86 $*.c

# gobject-query
$(GLIB)\gobject\gobject-query.exe: iwm\crt\iwmcrt.lib $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $*.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GLIB)\gobject\gobject-query.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GLib-GObject\" /DGOBJECT_COMPILATION /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\glib $**

# gmarshal
$(GLIB)\gobject\glib-genmarshal.exe: iwm\crt\iwmcrt.lib $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $*.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GLIB)\gobject\glib-genmarshal.obj: $*.c $(GLIB)\gobject\gmarshal.strings
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GLib-GObject\" /DGOBJECT_COMPILATION /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\glib $*.c

!ifdef GIT
$(GLIB)\gobject\gmarshal.strings: $*.list
	copy /y $*.list .
	$(PERL) $(GLIB)\gobject\marshal-genstrings.pl > $@
	del gmarshal.list
!endif

# glib-mkenums
$(GLIB)\gobject\glib-mkenums: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @PERL_PATH@=/usr/bin/perl @GLIB_VERSION@=$(GLIB_VERSION) < $@.in > $@

# GIO
gio_OBJECTS= \
		$(GLIB)\gio\gappinfo.obj \
		$(GLIB)\gio\gasynchelper.obj \
		$(GLIB)\gio\gasyncinitable.obj \
		$(GLIB)\gio\gasyncresult.obj \
		$(GLIB)\gio\gbufferedinputstream.obj \
		$(GLIB)\gio\gbufferedoutputstream.obj \
!ifdef GIT
		$(GLIB)\gio\gbytesicon.obj \
!endif
#		$(GLIB)\glib\gwakeup.obj \
		$(GLIB)\gio\gcancellable.obj \
		$(GLIB)\gio\gcharsetconverter.obj \
		$(GLIB)\gio\gconverter.obj \
		$(GLIB)\gio\gconverterinputstream.obj \
		$(GLIB)\gio\gconverteroutputstream.obj \
		$(GLIB)\gio\gcredentials.obj \
		$(GLIB)\gio\gdatainputstream.obj \
		$(GLIB)\gio\gdataoutputstream.obj \
		$(GLIB)\gio\gdrive.obj \
		$(GLIB)\gio\gdummyfile.obj \
		$(GLIB)\gio\gdummyproxyresolver.obj \
		$(GLIB)\gio\gdummytlsbackend.obj \
		$(GLIB)\gio\gemblem.obj \
		$(GLIB)\gio\gemblemedicon.obj \
		$(GLIB)\gio\gfile.obj \
		$(GLIB)\gio\gfileattribute.obj \
		$(GLIB)\gio\gfileenumerator.obj \
		$(GLIB)\gio\gfileicon.obj \
		$(GLIB)\gio\gfileinfo.obj \
		$(GLIB)\gio\gfileinputstream.obj \
		$(GLIB)\gio\gfilemonitor.obj \
		$(GLIB)\gio\gfilenamecompleter.obj \
		$(GLIB)\gio\gfileoutputstream.obj \
		$(GLIB)\gio\gfileiostream.obj \
		$(GLIB)\gio\gfilterinputstream.obj \
		$(GLIB)\gio\gfilteroutputstream.obj \
		$(GLIB)\gio\gicon.obj \
		$(GLIB)\gio\ginetaddress.obj \
		$(GLIB)\gio\ginetaddressmask.obj \
		$(GLIB)\gio\ginetsocketaddress.obj \
		$(GLIB)\gio\ginitable.obj \
		$(GLIB)\gio\ginputstream.obj \
		$(GLIB)\gio\gioerror.obj \
		$(GLIB)\gio\giomodule.obj \
		$(GLIB)\gio\gioscheduler.obj \
		$(GLIB)\gio\giostream.obj \
		$(GLIB)\gio\gloadableicon.obj \
		$(GLIB)\gio\gmount.obj \
		$(GLIB)\gio\gmemoryinputstream.obj \
		$(GLIB)\gio\gmemoryoutputstream.obj \
		$(GLIB)\gio\gmountoperation.obj \
		$(GLIB)\gio\gnativevolumemonitor.obj \
		$(GLIB)\gio\gnetworkaddress.obj \
		$(GLIB)\gio\gnetworking.obj \
		$(GLIB)\gio\gnetworkmonitor.obj \
		$(GLIB)\gio\gnetworkmonitorbase.obj \
		$(GLIB)\gio\gnetworkservice.obj \
		$(GLIB)\gio\goutputstream.obj \
		$(GLIB)\gio\gpermission.obj \
		$(GLIB)\gio\gpollableinputstream.obj \
		$(GLIB)\gio\gpollableoutputstream.obj \
		$(GLIB)\gio\gpollableutils.obj \
		$(GLIB)\gio\gpollfilemonitor.obj \
		$(GLIB)\gio\gproxyresolver.obj \
		$(GLIB)\gio\gresolver.obj \
		$(GLIB)\gio\gresource.obj \
		$(GLIB)\gio\gresourcefile.obj \
		$(GLIB)\gio\gseekable.obj \
		$(GLIB)\gio\gsimpleasyncresult.obj \
		$(GLIB)\gio\gsimplepermission.obj \
		$(GLIB)\gio\gsocket.obj \
		$(GLIB)\gio\gsocketaddress.obj \
		$(GLIB)\gio\gsocketaddressenumerator.obj \
		$(GLIB)\gio\gsocketclient.obj \
		$(GLIB)\gio\gsocketconnectable.obj \
		$(GLIB)\gio\gsocketconnection.obj \
		$(GLIB)\gio\gsocketcontrolmessage.obj \
		$(GLIB)\gio\gsocketinputstream.obj \
		$(GLIB)\gio\gsocketlistener.obj \
		$(GLIB)\gio\gsocketoutputstream.obj \
		$(GLIB)\gio\gproxy.obj \
		$(GLIB)\gio\gproxyaddress.obj \
		$(GLIB)\gio\gproxyaddressenumerator.obj \
		$(GLIB)\gio\gsocketservice.obj \
		$(GLIB)\gio\gsrvtarget.obj \
		$(GLIB)\gio\gsimpleproxyresolver.obj \
		$(GLIB)\gio\gtask.obj \
		$(GLIB)\gio\gtcpconnection.obj \
		$(GLIB)\gio\gtcpwrapperconnection.obj \
		$(GLIB)\gio\gthreadedsocketservice.obj \
		$(GLIB)\gio\gthemedicon.obj \
		$(GLIB)\gio\gthreadedresolver.obj \
		$(GLIB)\gio\gtlsbackend.obj \
		$(GLIB)\gio\gtlscertificate.obj \
		$(GLIB)\gio\gtlsclientconnection.obj \
		$(GLIB)\gio\gtlsconnection.obj \
		$(GLIB)\gio\gtlsdatabase.obj \
		$(GLIB)\gio\gtlsfiledatabase.obj \
		$(GLIB)\gio\gtlsinteraction.obj \
		$(GLIB)\gio\gtlspassword.obj \
		$(GLIB)\gio\gtlsserverconnection.obj \
		$(GLIB)\gio\gunionvolumemonitor.obj \
		$(GLIB)\gio\gvfs.obj \
		$(GLIB)\gio\gvolume.obj \
		$(GLIB)\gio\gvolumemonitor.obj \
		$(GLIB)\gio\gzlibcompressor.obj \
		$(GLIB)\gio\gzlibdecompressor.obj \
		$(GLIB)\gio\gioenumtypes.obj \
		\
		$(GLIB)\gio\gwin32appinfo.obj \
		\
		$(GLIB)\gio\gdbusdaemon.obj \
		$(GLIB)\gio\gdbus-daemon-generated.obj \
		\
		$(GLIB)\gio\gcontenttype-win32.obj \
		$(GLIB)\gio\gwin32mount.obj \
		$(GLIB)\gio\gwin32volumemonitor.obj \
		$(GLIB)\gio\gwin32inputstream.obj \
		$(GLIB)\gio\gwin32outputstream.obj \
		\
		$(GLIB)\gio\gapplication.obj \
		$(GLIB)\gio\gapplicationcommandline.obj \
		$(GLIB)\gio\gapplicationimpl-dbus.obj \
		\
		$(GLIB)\gio\gactiongroup.obj \
		$(GLIB)\gio\gactionmap.obj \
		$(GLIB)\gio\gsimpleactiongroup.obj \
		$(GLIB)\gio\gremoteactiongroup.obj \
		$(GLIB)\gio\gactiongroupexporter.obj \
		$(GLIB)\gio\gdbusactiongroup.obj \
		$(GLIB)\gio\gaction.obj \
		$(GLIB)\gio\gsimpleaction.obj \
		\
		$(GLIB)\gio\gmenumodel.obj \
		$(GLIB)\gio\gmenu.obj \
		$(GLIB)\gio\gmenuexporter.obj \
		$(GLIB)\gio\gdbusmenumodel.obj \
		\
		$(GLIB)\gio\gvdb\gvdb-reader.obj \
		$(GLIB)\gio\gdelayedsettingsbackend.obj \
		$(GLIB)\gio\gkeyfilesettingsbackend.obj \
		$(GLIB)\gio\gmemorysettingsbackend.obj \
		$(GLIB)\gio\gnullsettingsbackend.obj \
		$(GLIB)\gio\gsettingsbackend.obj \
		$(GLIB)\gio\gsettingsschema.obj \
		$(GLIB)\gio\gsettings-mapping.obj \
		$(GLIB)\gio\gsettings.obj \
		\
		$(GLIB)\gio\gregistrysettingsbackend.obj \
		\
		$(GLIB)\gio\gdbusutils.obj \
		$(GLIB)\gio\gdbusaddress.obj \
		$(GLIB)\gio\gdbusauthobserver.obj \
		$(GLIB)\gio\gdbusauth.obj \
		$(GLIB)\gio\gdbusauthmechanism.obj \
		$(GLIB)\gio\gdbusauthmechanismanon.obj \
		$(GLIB)\gio\gdbusauthmechanismexternal.obj \
		$(GLIB)\gio\gdbusauthmechanismsha1.obj \
		$(GLIB)\gio\gdbuserror.obj \
		$(GLIB)\gio\gdbusconnection.obj \
		$(GLIB)\gio\gdbusmessage.obj \
		$(GLIB)\gio\gdbusnameowning.obj \
		$(GLIB)\gio\gdbusnamewatching.obj \
		$(GLIB)\gio\gdbusproxy.obj \
		$(GLIB)\gio\gdbusprivate.obj \
		$(GLIB)\gio\gdbusintrospection.obj \
		$(GLIB)\gio\gdbusmethodinvocation.obj \
		$(GLIB)\gio\gdbusserver.obj \
		$(GLIB)\gio\gdbusinterface.obj \
		$(GLIB)\gio\gdbusinterfaceskeleton.obj \
		$(GLIB)\gio\gdbusobject.obj \
		$(GLIB)\gio\gdbusobjectskeleton.obj \
		$(GLIB)\gio\gdbusobjectproxy.obj \
		$(GLIB)\gio\gdbusobjectmanager.obj \
		$(GLIB)\gio\gdbusobjectmanagerclient.obj \
		$(GLIB)\gio\gdbusobjectmanagerserver.obj \
		$(GLIB)\gio\gtestdbus.obj \
		\
		$(GLIB)\gio\glocaldirectorymonitor.obj \
		$(GLIB)\gio\glocalfile.obj \
		$(GLIB)\gio\glocalfileenumerator.obj \
		$(GLIB)\gio\glocalfileinfo.obj \
		$(GLIB)\gio\glocalfileinputstream.obj \
		$(GLIB)\gio\glocalfilemonitor.obj \
		$(GLIB)\gio\glocalfileoutputstream.obj \
		$(GLIB)\gio\glocalfileiostream.obj \
		$(GLIB)\gio\glocalvfs.obj \
		$(GLIB)\gio\gsocks4proxy.obj \
		$(GLIB)\gio\gsocks4aproxy.obj \
		$(GLIB)\gio\gsocks5proxy.obj \
		\
		$(GLIB)\gio\win32\gwin32directorymonitor.obj \
		$(GLIB)\gio\win32\gwinhttpvfs.obj \
		$(GLIB)\gio\win32\gwinhttpfile.obj \
		$(GLIB)\gio\win32\gwinhttpfileinputstream.obj \
		$(GLIB)\gio\win32\gwinhttpfileoutputstream.obj

$(GLIB)\gio\libgio-2.0-0.dll: iwm\crt\iwmcrt.lib $(GLIB)\gio\gio.def $(GLIB)\gio\gio.res $(gio_OBJECTS) $(GLIB)\glib\gwakeup.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(GLIB)\gio\gio.def /IMPLIB:$(GLIB)\gio\gio-2.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GLIB)\gmodule\gmodule-2.0.lib $(ICONVMLANG)\intl.lib $(ZLIB)\zdll.lib advapi32.lib kernel32.lib dnsapi.lib shell32.lib shlwapi.lib ws2_32.lib $(GLIB)\gio\gio.res $(gio_OBJECTS) $(GLIB)\glib\gwakeup.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GLIB)\gio\gio.def: $(gio_OBJECTS) $(GLIB)\glib\gwakeup.obj iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(gio_OBJECTS) $(GLIB)\glib\gwakeup.obj

$(GLIB)\gio\gio.res: $*.rc
	$(RC) $(RCFLAGS) $*.rc

!ifdef GIT
$(GLIB)\gio\gio.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GLIB_MAJOR_VERSION@=$(GLIB_MAJOR_VERSION) @GLIB_MINOR_VERSION@=$(GLIB_MINOR_VERSION) @GLIB_MICRO_VERSION@=$(GLIB_MICRO_VERSION) @GLIB_VERSION@=$(GLIB_VERSION) @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(gio_OBJECTS): $(GLIB)\gio\gioenumtypes.c $(GLIB)\gio\gioenumtypes.h
	$(CC) $(CLFLAGS) /DDLL_EXPORT /DG_LOG_DOMAIN=\"GLib-GIO\" /DGIO_COMPILATION /DGIO_MODULE_DIR=\"/target/lib/gio/modules\" /DXDG_MIME_TYPE_UNKNOWN=\"application/octet-stream\" /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\gio /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(ZLIB) $*.c

!ifdef GIT
gio_headers= \
		$(GLIB)\gio\gappinfo.h \
		$(GLIB)\gio\gasyncinitable.h \
		$(GLIB)\gio\gasyncresult.h \
		$(GLIB)\gio\gbufferedinputstream.h \
		$(GLIB)\gio\gbufferedoutputstream.h \
		$(GLIB)\gio\gbytesicon.h \
		$(GLIB)\gio\gcancellable.h \
		$(GLIB)\gio\gcontenttype.h \
		$(GLIB)\gio\gcharsetconverter.h \
		$(GLIB)\gio\gconverter.h \
		$(GLIB)\gio\gconverterinputstream.h \
		$(GLIB)\gio\gconverteroutputstream.h \
		$(GLIB)\gio\gdatainputstream.h \
		$(GLIB)\gio\gdataoutputstream.h \
		$(GLIB)\gio\gdrive.h \
		$(GLIB)\gio\gemblem.h \
		$(GLIB)\gio\gemblemedicon.h \
		$(GLIB)\gio\gfile.h \
		$(GLIB)\gio\gfileattribute.h \
		$(GLIB)\gio\gfileenumerator.h \
		$(GLIB)\gio\gfileicon.h \
		$(GLIB)\gio\gfileinfo.h \
		$(GLIB)\gio\gfileinputstream.h \
		$(GLIB)\gio\gfilemonitor.h \
		$(GLIB)\gio\gfilenamecompleter.h \
		$(GLIB)\gio\gfileoutputstream.h \
		$(GLIB)\gio\gfileiostream.h \
		$(GLIB)\gio\gfilterinputstream.h \
		$(GLIB)\gio\gfilteroutputstream.h \
		$(GLIB)\gio\gicon.h \
		$(GLIB)\gio\ginetaddress.h \
		$(GLIB)\gio\ginetaddressmask.h \
		$(GLIB)\gio\ginetsocketaddress.h \
		$(GLIB)\gio\ginputstream.h \
		$(GLIB)\gio\ginitable.h \
		$(GLIB)\gio\gio.h \
		$(GLIB)\gio\giotypes.h \
		$(GLIB)\gio\gioenums.h \
		$(GLIB)\gio\gioerror.h \
		$(GLIB)\gio\giomodule.h \
		$(GLIB)\gio\gioscheduler.h \
		$(GLIB)\gio\giostream.h \
		$(GLIB)\gio\gloadableicon.h \
		$(GLIB)\gio\gmount.h \
		$(GLIB)\gio\gmemoryinputstream.h \
		$(GLIB)\gio\gmemoryoutputstream.h \
		$(GLIB)\gio\gmountoperation.h \
		$(GLIB)\gio\gnativevolumemonitor.h \
		$(GLIB)\gio\gnetworkaddress.h \
		$(GLIB)\gio\gnetworking.h \
		$(GLIB)\gio\gnetworkmonitor.h \
		$(GLIB)\gio\gnetworkservice.h \
		$(GLIB)\gio\goutputstream.h \
		$(GLIB)\gio\gpermission.h \
		$(GLIB)\gio\gpollableinputstream.h \
		$(GLIB)\gio\gpollableoutputstream.h \
		$(GLIB)\gio\gpollableutils.h \
		$(GLIB)\gio\gproxyaddress.h \
		$(GLIB)\gio\gproxy.h \
		$(GLIB)\gio\gproxyaddressenumerator.h \
		$(GLIB)\gio\gproxyresolver.h \
		$(GLIB)\gio\gresolver.h \
		$(GLIB)\gio\gresource.h \
		$(GLIB)\gio\gseekable.h \
		$(GLIB)\gio\gsimpleasyncresult.h \
		$(GLIB)\gio\gsimplepermission.h \
		$(GLIB)\gio\gsocket.h \
		$(GLIB)\gio\gsocketaddress.h \
		$(GLIB)\gio\gsocketaddressenumerator.h \
		$(GLIB)\gio\gsocketclient.h \
		$(GLIB)\gio\gsocketconnectable.h \
		$(GLIB)\gio\gsocketconnection.h \
		$(GLIB)\gio\gsocketcontrolmessage.h \
		$(GLIB)\gio\gsocketlistener.h \
		$(GLIB)\gio\gsocketservice.h \
		$(GLIB)\gio\gsrvtarget.h \
		$(GLIB)\gio\gsimpleproxyresolver.h \
		$(GLIB)\gio\gtask.h \
		$(GLIB)\gio\gtcpconnection.h \
		$(GLIB)\gio\gtcpwrapperconnection.h \
		$(GLIB)\gio\gthreadedsocketservice.h \
		$(GLIB)\gio\gthemedicon.h \
		$(GLIB)\gio\gtlsbackend.h \
		$(GLIB)\gio\gtlscertificate.h \
		$(GLIB)\gio\gtlsclientconnection.h \
		$(GLIB)\gio\gtlsconnection.h \
		$(GLIB)\gio\gtlsdatabase.h \
		$(GLIB)\gio\gtlsfiledatabase.h \
		$(GLIB)\gio\gtlsinteraction.h \
		$(GLIB)\gio\gtlspassword.h \
		$(GLIB)\gio\gtlsserverconnection.h \
		$(GLIB)\gio\gvfs.h \
		$(GLIB)\gio\gvolume.h \
		$(GLIB)\gio\gvolumemonitor.h \
		$(GLIB)\gio\gzlibcompressor.h \
		$(GLIB)\gio\gzlibdecompressor.h \
		\
		$(GLIB)\gio\gapplication.h \
		$(GLIB)\gio\gapplicationcommandline.h \
		\
		$(GLIB)\gio\gactiongroup.h \
		$(GLIB)\gio\gactionmap.h \
		$(GLIB)\gio\gsimpleactiongroup.h \
		$(GLIB)\gio\gactiongroupexporter.h \
		$(GLIB)\gio\gdbusactiongroup.h \
		$(GLIB)\gio\gaction.h \
		$(GLIB)\gio\gsimpleaction.h \
		\
		$(GLIB)\gio\gmenumodel.h \
		$(GLIB)\gio\gmenu.h \
		$(GLIB)\gio\gmenuexporter.h \
		$(GLIB)\gio\gdbusmenumodel.h \
		\
		$(GLIB)\gio\gsettingsbackend.h \
		$(GLIB)\gio\gsettingsschema.h \
		$(GLIB)\gio\gsettings.h \
		\
		$(GLIB)\gio\gdbusauthobserver.h \
		$(GLIB)\gio\gcredentials.h \
		$(GLIB)\gio\gdbusutils.h \
		$(GLIB)\gio\gdbuserror.h \
		$(GLIB)\gio\gdbusaddress.h \
		$(GLIB)\gio\gdbusconnection.h \
		$(GLIB)\gio\gdbusmessage.h \
		$(GLIB)\gio\gdbusnameowning.h \
		$(GLIB)\gio\gdbusnamewatching.h \
		$(GLIB)\gio\gdbusproxy.h \
		$(GLIB)\gio\gdbusintrospection.h \
		$(GLIB)\gio\gdbusmethodinvocation.h \
		$(GLIB)\gio\gdbusserver.h \
		$(GLIB)\gio\gdbusinterface.h \
		$(GLIB)\gio\gdbusinterfaceskeleton.h \
		$(GLIB)\gio\gdbusobject.h \
		$(GLIB)\gio\gdbusobjectskeleton.h \
		$(GLIB)\gio\gdbusobjectproxy.h \
		$(GLIB)\gio\gdbusobjectmanager.h \
		$(GLIB)\gio\gdbusobjectmanagerclient.h \
		$(GLIB)\gio\gdbusobjectmanagerserver.h \
		$(GLIB)\gio\gtestdbus.h

$(GLIB)\gio\gioenumtypes.c: $(GLIB)\gio\gioenumtypes.c.template $(gio_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums --template $(GLIB)\gio\gioenumtypes.c.template $(gio_headers) > $@

$(GLIB)\gio\gioenumtypes.h: $(GLIB)\gio\gioenumtypes.h.template $(gio_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums --template $(GLIB)\gio\gioenumtypes.h.template $(gio_headers) > $@

$(GLIB)\gio\gdbusdaemon.obj: $(GLIB)\gio\gdbus-daemon-generated.h

$(GLIB)\gio\gdbus-daemon-generated.c $(GLIB)\gio\gdbus-daemon-generated.h: $(GLIB)\gio\dbus-daemon.xml $(GLIB)\gio\gdbus-2.0\codegen\gdbus-codegen $(GLIB)\gio\gdbus-2.0\codegen\config.py
	set UNINSTALLED_GLIB_SRCDIR=$(GLIB)
	set UNINSTALLED_GLIB_BUILDDIR=$(GLIB)
	$(PYTHON) $(GLIB)\gio\gdbus-2.0\codegen\gdbus-codegen \
		--interface-prefix org. \
		--generate-c-code gdbus-daemon-generated \
		--c-namespace _G \
		$(GLIB)\gio\dbus-daemon.xml
	move /y gdbus-daemon-generated.c $(GLIB)\gio
	move /y gdbus-daemon-generated.h $(GLIB)\gio

$(GLIB)\gio\gdbus-2.0\codegen\gdbus-codegen: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @libdir@=/target/lib @PYTHON\@=/usr/bin/python < $@.in > $@

$(GLIB)\gio\gdbus-2.0\codegen\config.py: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @datarootdir@=/target/share @prefix@=/target @VERSION@=$(GLIB_VERSION) < $@.in > $@

$(GLIB)\gio\gnetworking.h: $@.win32
	copy /y $** $@
!endif

glib_compile_schemas_OBJECTS= \
		$(GLIB)\gio\gvdb\gvdb-builder.obj \
		$(GLIB)\gio\glib-compile-schemas.obj

$(GLIB)\gio\glib-compile-schemas.exe: iwm\crt\iwmcrt.lib $(glib_compile_schemas_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $(ICONVMLANG)\intl.lib $(glib_compile_schemas_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GLIB)\gio\glib-compile-schemas.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GLib-GIO\" /DGIO_COMPILATION /DGIO_MODULE_DIR=\"/target/lib/gio/modules\" /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\gio /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(ZLIB) $**

glib_compile_resources_OBJECTS= \
		$(GLIB)\gio\gvdb\gvdb-builder.obj \
		$(GLIB)\gio\glib-compile-resources.obj

$(GLIB)\gio\glib-compile-resources.exe: iwm\crt\iwmcrt.lib $(glib_compile_resources_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $(GLIB)\gio\gio-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(ICONVMLANG)\intl.lib $(glib_compile_resources_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GLIB)\gio\glib-compile-resources.obj: $*.c $(GLIB)\gio\gconstructor_as_data.h
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GLib-GIO\" /DGIO_COMPILATION /DGIO_MODULE_DIR=\"/target/lib/gio/modules\" /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\gio /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(ZLIB) $*.c

$(GLIB)\gio\gconstructor_as_data.h: $(GLIB)\glib\gconstructor.h $(GLIB)\gio\data-to-c.pl
	$(PERL) $(GLIB)\gio\data-to-c.pl $(GLIB)\glib\gconstructor.h gconstructor_code > $@

$(GLIB)\gio\gvdb\gvdb-builder.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"GLib-GIO\" /DGIO_COMPILATION /DGIO_MODULE_DIR=\"/target/lib/gio/modules\" /FImsvc_recommended_pragmas.h /I$(GLIB) /I$(GLIB)\gio /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(ZLIB) $**

###############################################################################
# GTK+                                                                        #
###############################################################################
gtk: atk gdk-pixbuf pango \
		$(GTK)\gdk\libgdk-win32-$(GTK_API_VERSION)-0.dll \
		$(GTK)\gtk\libgtk-win32-$(GTK_API_VERSION)-0.dll \
		$(GTK)\modules\input\inputim-am-et.dll \
		$(GTK)\modules\input\inputim-cedilla.dll \
		$(GTK)\modules\input\inputim-cyrillic-translit.dll \
		$(GTK)\modules\input\inputim-ime.dll \
		$(GTK)\modules\input\inputim-inuktitut.dll \
		$(GTK)\modules\input\inputim-ipa.dll \
		$(GTK)\modules\input\inputim-multipress.dll \
		$(GTK)\modules\input\inputim-thai.dll \
		$(GTK)\modules\input\inputim-ti-er.dll \
		$(GTK)\modules\input\inputim-ti-et.dll \
		$(GTK)\modules\input\inputim-viqr.dll \
		$(GTK)\gtk\gtk-query-immodules-$(GTK_API_VERSION).exe

!ifdef GIT
$(GTK)\config.h: $@.win32.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GETTEXT_PACKAGE@=gtk30 @GTK_MAJOR_VERSION@=$(GTK_MAJOR_VERSION) @GTK_MINOR_VERSION@=$(GTK_MINOR_VERSION) @GTK_MICRO_VERSION@=$(GTK_MICRO_VERSION) < $@.win32.in > $@
!else
$(GTK)\config.h: $@.win32
	copy /y $** $@
!endif

# GDK
gdk_OBJECTS= \
		$(GTK)\gdk\gdk.obj \
		$(GTK)\gdk\gdkapplaunchcontext.obj \
		$(GTK)\gdk\gdkcairo.obj \
		$(GTK)\gdk\gdkcolor.obj \
		$(GTK)\gdk\gdkcursor.obj \
		$(GTK)\gdk\gdkdeprecated.obj \
		$(GTK)\gdk\gdkdevice.obj \
		$(GTK)\gdk\gdkdevicemanager.obj \
		$(GTK)\gdk\gdkdisplay.obj \
		$(GTK)\gdk\gdkdisplaymanager.obj \
		$(GTK)\gdk\gdkdnd.obj \
		$(GTK)\gdk\gdkevents.obj \
		$(GTK)\gdk\gdkframetimings.obj \
		$(GTK)\gdk\gdkglobals.obj \
		$(GTK)\gdk\gdkkeys.obj \
		$(GTK)\gdk\gdkkeyuni.obj \
		$(GTK)\gdk\gdkoffscreenwindow.obj \
		$(GTK)\gdk\gdkframeclock.obj \
		$(GTK)\gdk\gdkframeclockidle.obj \
		$(GTK)\gdk\gdkpango.obj \
		$(GTK)\gdk\gdkpixbuf-drawable.obj \
!ifdef GIT
		$(GTK)\gdk\gdkproperty.obj \
!endif
		$(GTK)\gdk\gdkrectangle.obj \
		$(GTK)\gdk\gdkrgba.obj \
		$(GTK)\gdk\gdkscreen.obj \
		$(GTK)\gdk\gdkselection.obj \
		$(GTK)\gdk\gdkvisual.obj \
		$(GTK)\gdk\gdkwindow.obj \
		$(GTK)\gdk\gdkwindowimpl.obj \
		\
		$(GTK)\gdk\gdkenumtypes.obj \
		$(GTK)\gdk\gdkmarshalers.obj \
		\
!ifdef GIT
		$(GTK)\gdk\gdkkeynames.obj \
!endif
		\
		$(GTK)\gdk\win32\gdkcursor-win32.obj \
		$(GTK)\gdk\win32\gdkdevicemanager-win32.obj \
		$(GTK)\gdk\win32\gdkdevice-virtual.obj \
		$(GTK)\gdk\win32\gdkdevice-win32.obj \
		$(GTK)\gdk\win32\gdkdevice-wintab.obj \
		$(GTK)\gdk\win32\gdkdisplay-win32.obj \
		$(GTK)\gdk\win32\gdkdisplaymanager-win32.obj \
		$(GTK)\gdk\win32\gdkdnd-win32.obj \
		$(GTK)\gdk\win32\gdkevents-win32.obj \
		$(GTK)\gdk\win32\gdkgeometry-win32.obj \
		$(GTK)\gdk\win32\gdkglobals-win32.obj \
		$(GTK)\gdk\win32\gdkinput.obj \
		$(GTK)\gdk\win32\gdkkeys-win32.obj \
		$(GTK)\gdk\win32\gdkmain-win32.obj \
		$(GTK)\gdk\win32\gdkproperty-win32.obj \
		$(GTK)\gdk\win32\gdkscreen-win32.obj \
		$(GTK)\gdk\win32\gdkselection-win32.obj \
		$(GTK)\gdk\win32\gdktestutils-win32.obj \
		$(GTK)\gdk\win32\gdkvisual-win32.obj \
		$(GTK)\gdk\win32\gdkwin32id.obj \
		$(GTK)\gdk\win32\gdkwindow-win32.obj

$(GTK)\gdk\libgdk-win32-3.0-0.dll: iwm\crt\iwmcrt.lib $(GTK)\gdk\gdk.def $(GTK)\gdk\win32\rc\gdk.res $(gdk_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(GTK)\gdk\gdk.def /IMPLIB:$(GTK)\gdk\gdk-win32-3.0.lib $(CAIRO)\src\cairo.lib $(CAIRO)\util\cairo-gobject\cairo-gobject.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gio\gio-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(PANGO)\pango\pango-1.0.lib $(PANGO)\pango\pangowin32-1.0.lib $(PANGO)\pango\pangocairo-1.0.lib $(ICONVMLANG)\intl.lib gdi32.lib imm32.lib kernel32.lib ole32.lib shell32.lib user32.lib winmm.lib $(gdk_OBJECTS) $(GTK)\gdk\win32\rc\gdk.res
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

!ifdef GIT
$(GTK)\gdk\gdk.def: $(gdk_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(gdk_OBJECTS)
!endif

$(GTK)\gdk\win32\rc\gdk.res: $*.rc $(GTK)\gdk\win32\rc\gtk.ico
	$(RC) $(RCFLAGS) $*.rc

!ifdef GIT
$(GTK)\gdk\win32\rc\gdk.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @srcdir@=. @GTK_MAJOR_VERSION@=$(GTK_MAJOR_VERSION) @GTK_MINOR_VERSION@=$(GTK_MINOR_VERSION) @GTK_MICRO_VERSION@=$(GTK_MICRO_VERSION) @GTK_VERSION@=$(GTK_VERSION) @GTK_API_VERSION@=3.0 @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(gdk_OBJECTS): $(GTK)\config.h $(GTK)\gdk\gdkconfig.h $(GTK)\gdk\gdkenumtypes.h $(GTK)\gdk\gdkmarshalers.h $(GTK)\gdk\gdkversionmacros.h
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Gdk\" /DGDK_COMPILATION /DINSIDE_GDK_WIN32 /FImsvc_recommended_pragmas.h /I$(GTK) /I$(GTK)\gdk /I$(GTK)\gdk\win32 /I$(CAIRO)\src /I$(CAIRO)\util\cairo-gobject /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $*.c

$(GTK)\gdk\gdkconfig.h: $@.win32
	copy /y $** $@
	echo #ifndef GDK_DEPRECATED >> $@
	echo # ifdef GDK_DISABLE_DEPRECATION_WARNINGS >> $@
	echo #  define GDK_DEPRECATED >> $@
	echo # else >> $@
	echo #  define GDK_DEPRECATED G_DEPRECATED >> $@
	echo # endif >> $@
	echo #endif >> $@
	echo #ifndef GDK_DEPRECATED_FOR >> $@
	echo # ifdef GDK_DISABLE_DEPRECATION_WARNINGS >> $@
	echo #  define GDK_DEPRECATED_FOR(f) >> $@
	echo # else >> $@
	echo #  define GDK_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) >> $@
	echo # endif >> $@
	echo #endif >> $@

!ifdef GIT
gdk_headers= \
		$(GTK)\gdk\gdk.h \
		$(GTK)\gdk\gdkapplaunchcontext.h \
		$(GTK)\gdk\gdkcairo.h \
		$(GTK)\gdk\gdkcolor.h \
		$(GTK)\gdk\gdkcursor.h \
		$(GTK)\gdk\gdkdevice.h \
		$(GTK)\gdk\gdkdevicemanager.h \
		$(GTK)\gdk\gdkdisplay.h \
		$(GTK)\gdk\gdkdisplaymanager.h \
		$(GTK)\gdk\gdkdnd.h \
		$(GTK)\gdk\gdkevents.h \
		$(GTK)\gdk\gdkframetimings.h \
		$(GTK)\gdk\gdkkeys.h \
		$(GTK)\gdk\gdkkeysyms.h \
		$(GTK)\gdk\gdkkeysyms-compat.h \
		$(GTK)\gdk\gdkmain.h \
		$(GTK)\gdk\gdkpango.h \
		$(GTK)\gdk\gdkframeclock.h \
		$(GTK)\gdk\gdkpixbuf.h \
		$(GTK)\gdk\gdkprivate.h \
		$(GTK)\gdk\gdkproperty.h \
		$(GTK)\gdk\gdkrectangle.h \
		$(GTK)\gdk\gdkrgba.h \
		$(GTK)\gdk\gdkscreen.h \
		$(GTK)\gdk\gdkselection.h \
		$(GTK)\gdk\gdktestutils.h \
		$(GTK)\gdk\gdkthreads.h \
		$(GTK)\gdk\gdktypes.h \
		$(GTK)\gdk\gdkvisual.h \
		$(GTK)\gdk\gdkwindow.h

$(GTK)\gdk\gdkenumtypes.c: $(GTK)\gdk\gdkenumtypes.c.template $(gdk_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums --template $(GTK)\gdk\gdkenumtypes.c.template $(gdk_headers) > $@

$(GTK)\gdk\gdkenumtypes.h: $(GTK)\gdk\gdkenumtypes.h.template $(gdk_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums --template $(GTK)\gdk\gdkenumtypes.h.template $(gdk_headers) > $@

$(GTK)\gdk\gdkmarshalers.c: $(GLIB)\gobject\glib-genmarshal.exe $*.list
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	$(GLIB)\gobject\glib-genmarshal.exe --prefix=_gdk_marshal $*.list --body > $@
	del iconv.dll
	del intl.dll
	del libglib-2.0-0.dll

$(GTK)\gdk\gdkmarshalers.h: $(GLIB)\gobject\glib-genmarshal.exe $*.list
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	$(GLIB)\gobject\glib-genmarshal.exe --prefix=_gdk_marshal $*.list --header > $@
	del iconv.dll
	del intl.dll
	del libglib-2.0-0.dll

$(GTK)\gdk\gdkversionmacros.h: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GTK_MAJOR_VERSION@=$(GTK_MAJOR_VERSION) @GTK_MINOR_VERSION@=$(GTK_MINOR_VERSION) @GTK_MICRO_VERSION@=$(GTK_MICRO_VERSION) < $@.in > $@
!endif

# GTK+
gtk_OBJECTS= \
!ifdef GIT
		$(GTK)\gtk\gtkactionmuxer.obj \
		$(GTK)\gtk\gtkactionobserver.obj \
		$(GTK)\gtk\gtkactionobservable.obj \
!else
		$(GTK)\gtk\gactionmuxer.obj \
		$(GTK)\gtk\gactionobserver.obj \
		$(GTK)\gtk\gactionobservable.obj \
!endif
		$(GTK)\gtk\gtkactionable.obj \
		$(GTK)\gtk\gtkquery.obj \
!ifdef GIT
		$(GTK)\gtk\gtksearchbar.obj \
!endif
		$(GTK)\gtk\gtksearchentry.obj \
		$(GTK)\gtk\gtksearchengine.obj \
		$(GTK)\gtk\gtksearchenginesimple.obj \
		$(GTK)\gtk\fnmatch.obj \
		$(GTK)\gtk\gtkaboutdialog.obj \
		$(GTK)\gtk\gtkaccelgroup.obj \
		$(GTK)\gtk\gtkaccellabel.obj \
		$(GTK)\gtk\gtkaccelmap.obj \
		$(GTK)\gtk\gtkaccessible.obj \
!ifndef GIT
		$(GTK)\gtk\gtkaction.obj \
!endif
		$(GTK)\gtk\gtkactionhelper.obj \
!ifndef GIT
		$(GTK)\gtk\gtkactiongroup.obj \
		$(GTK)\gtk\gtkactivatable.obj \
!endif
		$(GTK)\gtk\gtkadjustment.obj \
		$(GTK)\gtk\gtkalignment.obj \
		$(GTK)\gtk\gtkallocatedbitmask.obj \
		$(GTK)\gtk\gtkappchooser.obj \
		$(GTK)\gtk\gtkappchooserwidget.obj \
		$(GTK)\gtk\gtkappchooserbutton.obj \
		$(GTK)\gtk\gtkappchooserdialog.obj \
		$(GTK)\gtk\gtkappchoosermodule.obj \
		$(GTK)\gtk\gtkappchooseronline.obj \
		$(GTK)\gtk\gtkapplication.obj \
		$(GTK)\gtk\gtkapplicationwindow.obj \
		$(GTK)\gtk\gtkarrow.obj \
		$(GTK)\gtk\gtkaspectframe.obj \
		$(GTK)\gtk\gtkassistant.obj \
		$(GTK)\gtk\gtkbbox.obj \
		$(GTK)\gtk\gtkbin.obj \
		$(GTK)\gtk\gtkbindings.obj \
!ifdef GIT
		$(GTK)\gtk\gtkbookmarksmanager.obj \
!endif
		$(GTK)\gtk\gtkborder.obj \
		$(GTK)\gtk\gtkborderimage.obj \
		$(GTK)\gtk\gtkbox.obj \
		$(GTK)\gtk\gtkbubblewindow.obj \
		$(GTK)\gtk\gtkbuildable.obj \
		$(GTK)\gtk\gtkbuilder.obj \
		$(GTK)\gtk\gtkbuilderparser.obj \
		$(GTK)\gtk\gtkbuilder-menus.obj \
		$(GTK)\gtk\gtkbutton.obj \
		$(GTK)\gtk\gtkcairoblur.obj \
		$(GTK)\gtk\gtkcalendar.obj \
		$(GTK)\gtk\gtkcellarea.obj \
		$(GTK)\gtk\gtkcellareabox.obj \
		$(GTK)\gtk\gtkcellareaboxcontext.obj \
		$(GTK)\gtk\gtkcellareacontext.obj \
		$(GTK)\gtk\gtkcelleditable.obj \
		$(GTK)\gtk\gtkcelllayout.obj \
		$(GTK)\gtk\gtkcellrenderer.obj \
		$(GTK)\gtk\gtkcellrendereraccel.obj \
		$(GTK)\gtk\gtkcellrenderercombo.obj \
		$(GTK)\gtk\gtkcellrendererpixbuf.obj \
		$(GTK)\gtk\gtkcellrendererprogress.obj \
		$(GTK)\gtk\gtkcellrendererspin.obj \
		$(GTK)\gtk\gtkcellrendererspinner.obj \
		$(GTK)\gtk\gtkcellrenderertext.obj \
		$(GTK)\gtk\gtkcellrenderertoggle.obj \
		$(GTK)\gtk\gtkcellview.obj \
		$(GTK)\gtk\gtkcheckbutton.obj \
		$(GTK)\gtk\gtkcheckmenuitem.obj \
		$(GTK)\gtk\gtkcolorbutton.obj \
		$(GTK)\gtk\gtkcolorchooser.obj \
		$(GTK)\gtk\gtkcolorchooserwidget.obj \
		$(GTK)\gtk\gtkcolorchooserdialog.obj \
		$(GTK)\gtk\gtkcoloreditor.obj \
		$(GTK)\gtk\gtkcolorplane.obj \
		$(GTK)\gtk\gtkcolorscale.obj \
		$(GTK)\gtk\gtkcolorswatch.obj \
		$(GTK)\gtk\gtkcolorutils.obj \
		$(GTK)\gtk\gtkcombobox.obj \
		$(GTK)\gtk\gtkcomboboxtext.obj \
		$(GTK)\gtk\gtkcontainer.obj \
		$(GTK)\gtk\gtkcssanimation.obj \
		$(GTK)\gtk\gtkcssarrayvalue.obj \
		$(GTK)\gtk\gtkcssbgsizevalue.obj \
		$(GTK)\gtk\gtkcssbordervalue.obj \
		$(GTK)\gtk\gtkcsscolorvalue.obj \
		$(GTK)\gtk\gtkcsscomputedvalues.obj \
		$(GTK)\gtk\gtkcsscornervalue.obj \
		$(GTK)\gtk\gtkcsscustomproperty.obj \
		$(GTK)\gtk\gtkcsseasevalue.obj \
		$(GTK)\gtk\gtkcssenumvalue.obj \
		$(GTK)\gtk\gtkcssenginevalue.obj \
		$(GTK)\gtk\gtkcssimage.obj \
		$(GTK)\gtk\gtkcssimagecrossfade.obj \
		$(GTK)\gtk\gtkcssimagegradient.obj \
		$(GTK)\gtk\gtkcssimagelinear.obj \
		$(GTK)\gtk\gtkcssimagesurface.obj \
		$(GTK)\gtk\gtkcssimageurl.obj \
!ifdef GIT
		$(GTK)\gtk\gtkcssimagescaled.obj \
!endif
		$(GTK)\gtk\gtkcssimagevalue.obj \
		$(GTK)\gtk\gtkcssimagewin32.obj \
		$(GTK)\gtk\gtkcssinheritvalue.obj \
		$(GTK)\gtk\gtkcssinitialvalue.obj \
		$(GTK)\gtk\gtkcsskeyframes.obj \
		$(GTK)\gtk\gtkcsslookup.obj \
		$(GTK)\gtk\gtkcssmatcher.obj \
		$(GTK)\gtk\gtkcssnumbervalue.obj \
		$(GTK)\gtk\gtkcssparser.obj \
		$(GTK)\gtk\gtkcsspositionvalue.obj \
		$(GTK)\gtk\gtkcssprovider.obj \
		$(GTK)\gtk\gtkcssrepeatvalue.obj \
		$(GTK)\gtk\gtkcssrgbavalue.obj \
		$(GTK)\gtk\gtkcsssection.obj \
		$(GTK)\gtk\gtkcssselector.obj \
		$(GTK)\gtk\gtkcssstringvalue.obj \
		$(GTK)\gtk\gtkcssshadowsvalue.obj \
		$(GTK)\gtk\gtkcssshadowvalue.obj \
		$(GTK)\gtk\gtkcssshorthandproperty.obj \
		$(GTK)\gtk\gtkcssshorthandpropertyimpl.obj \
		$(GTK)\gtk\gtkcssstylefuncs.obj \
		$(GTK)\gtk\gtkcssstyleproperty.obj \
		$(GTK)\gtk\gtkcssstylepropertyimpl.obj \
		$(GTK)\gtk\gtkcsstransition.obj \
		$(GTK)\gtk\gtkcsstypedvalue.obj \
		$(GTK)\gtk\gtkcsstypes.obj \
		$(GTK)\gtk\gtkcssvalue.obj \
		$(GTK)\gtk\gtkdbusgenerated.obj \
		$(GTK)\gtk\gtkdialog.obj \
		$(GTK)\gtk\gtkdrawingarea.obj \
		$(GTK)\gtk\gtkeditable.obj \
		$(GTK)\gtk\gtkentry.obj \
		$(GTK)\gtk\gtkentrybuffer.obj \
		$(GTK)\gtk\gtkentrycompletion.obj \
		$(GTK)\gtk\gtkeventbox.obj \
		$(GTK)\gtk\gtkexpander.obj \
		$(GTK)\gtk\gtkfilechooser.obj \
		$(GTK)\gtk\gtkfilechooserbutton.obj \
		$(GTK)\gtk\gtkfilechooserdefault.obj \
		$(GTK)\gtk\gtkfilechooserdialog.obj \
		$(GTK)\gtk\gtkfilechooserembed.obj \
		$(GTK)\gtk\gtkfilechooserentry.obj \
		$(GTK)\gtk\gtkfilechooserutils.obj \
		$(GTK)\gtk\gtkfilechooserwidget.obj \
		$(GTK)\gtk\gtkfilefilter.obj \
		$(GTK)\gtk\gtkfilesystem.obj \
		$(GTK)\gtk\gtkfilesystemmodel.obj \
		$(GTK)\gtk\gtkfixed.obj \
		$(GTK)\gtk\gtkfontbutton.obj \
		$(GTK)\gtk\gtkfontchooser.obj \
		$(GTK)\gtk\gtkfontchooserdialog.obj \
		$(GTK)\gtk\gtkfontchooserutils.obj \
		$(GTK)\gtk\gtkfontchooserwidget.obj \
		$(GTK)\gtk\gtkframe.obj \
!ifdef GIT
		$(GTK)\gtk\gtkgladecatalog.obj \
!endif
		$(GTK)\gtk\gtkgrid.obj \
!ifdef GIT
		$(GTK)\gtk\gtkheaderbar.obj \
!endif
		$(GTK)\gtk\gtkhsla.obj \
		$(GTK)\gtk\gtkiconcache.obj \
		$(GTK)\gtk\gtkiconcachevalidator.obj \
!ifndef GIT
		$(GTK)\gtk\gtkiconfactory.obj \
!endif
		$(GTK)\gtk\gtkiconhelper.obj \
		$(GTK)\gtk\gtkicontheme.obj \
		$(GTK)\gtk\gtkiconview.obj \
		$(GTK)\gtk\gtkimage.obj \
!ifndef GIT
		$(GTK)\gtk\gtkimagemenuitem.obj \
!endif
		$(GTK)\gtk\gtkimcontext.obj \
		$(GTK)\gtk\gtkimcontextsimple.obj \
		$(GTK)\gtk\gtkimmodule.obj \
		$(GTK)\gtk\gtkimmulticontext.obj \
		$(GTK)\gtk\gtkinfobar.obj \
		$(GTK)\gtk\gtkinvisible.obj \
		$(GTK)\gtk\gtkkeyhash.obj \
		$(GTK)\gtk\gtklabel.obj \
		$(GTK)\gtk\gtklayout.obj \
		$(GTK)\gtk\gtklevelbar.obj \
		$(GTK)\gtk\gtklinkbutton.obj \
!ifdef GIT
		$(GTK)\gtk\gtklistbox.obj \
!endif
		$(GTK)\gtk\gtkliststore.obj \
		$(GTK)\gtk\gtklockbutton.obj \
		$(GTK)\gtk\gtkmain.obj \
		$(GTK)\gtk\gtkmarshalers.obj \
		$(GTK)\gtk\gtkmenu.obj \
		$(GTK)\gtk\gtkmenubar.obj \
		$(GTK)\gtk\gtkmenubutton.obj \
		$(GTK)\gtk\gtkmenuitem.obj \
		$(GTK)\gtk\gtkmenushell.obj \
!ifdef GIT
		$(GTK)\gtk\gtkmenutracker.obj \
		$(GTK)\gtk\gtkmenutrackeritem.obj \
!endif
		$(GTK)\gtk\gtkmenutoolbutton.obj \
		$(GTK)\gtk\gtkmessagedialog.obj \
		$(GTK)\gtk\gtkmisc.obj \
		$(GTK)\gtk\gtkmnemonichash.obj \
!ifndef GIT
		$(GTK)\gtk\gtkmodelmenu.obj \
!endif
		$(GTK)\gtk\gtkmodelmenuitem.obj \
		$(GTK)\gtk\gtkmodifierstyle.obj \
		$(GTK)\gtk\gtkmodules.obj \
		$(GTK)\gtk\gtkmountoperation.obj \
		$(GTK)\gtk\gtknotebook.obj \
		$(GTK)\gtk\gtknumerableicon.obj \
		$(GTK)\gtk\gtkoffscreenwindow.obj \
		$(GTK)\gtk\gtkorientable.obj \
		$(GTK)\gtk\gtkoverlay.obj \
		$(GTK)\gtk\gtkpagesetup.obj \
		$(GTK)\gtk\gtkpaned.obj \
		$(GTK)\gtk\gtkpango.obj \
		$(GTK)\gtk\gtkpapersize.obj \
		$(GTK)\gtk\gtkpathbar.obj \
!ifdef GIT
		$(GTK)\gtk\gtkplacessidebar.obj \
!endif
		$(GTK)\gtk\gtkprintcontext.obj \
		$(GTK)\gtk\gtkpressandhold.obj \
		$(GTK)\gtk\gtkprintoperation.obj \
		$(GTK)\gtk\gtkprintoperationpreview.obj \
		$(GTK)\gtk\gtkprintsettings.obj \
		$(GTK)\gtk\gtkprintutils.obj \
		$(GTK)\gtk\gtkprivate.obj \
		$(GTK)\gtk\gtkprivatetypebuiltins.obj \
		$(GTK)\gtk\gtkprogressbar.obj \
!ifdef GIT
		$(GTK)\gtk\gtkpixelcache.obj \
!else
		$(GTK)\gtk\gtkradioaction.obj \
!endif
		$(GTK)\gtk\gtkradiobutton.obj \
		$(GTK)\gtk\gtkradiomenuitem.obj \
		$(GTK)\gtk\gtkradiotoolbutton.obj \
		$(GTK)\gtk\gtkrange.obj \
		$(GTK)\gtk\gtkrbtree.obj \
!ifndef GIT
		$(GTK)\gtk\gtkrecentaction.obj \
!endif
		$(GTK)\gtk\gtkrecentchooserdefault.obj \
		$(GTK)\gtk\gtkrecentchooserdialog.obj \
		$(GTK)\gtk\gtkrecentchoosermenu.obj \
		$(GTK)\gtk\gtkrecentchooserwidget.obj \
		$(GTK)\gtk\gtkrecentchooserutils.obj \
		$(GTK)\gtk\gtkrecentchooser.obj \
		$(GTK)\gtk\gtkrecentfilter.obj \
		$(GTK)\gtk\gtkrecentmanager.obj \
		$(GTK)\gtk\gtkresources.obj \
!ifdef GIT
		$(GTK)\gtk\gtkrevealer.obj \
!endif
		$(GTK)\gtk\gtkroundedbox.obj \
		$(GTK)\gtk\gtkscale.obj \
		$(GTK)\gtk\gtkscalebutton.obj \
		$(GTK)\gtk\gtkscrollable.obj \
		$(GTK)\gtk\gtkscrollbar.obj \
		$(GTK)\gtk\gtkscrolledwindow.obj \
		$(GTK)\gtk\gtkselection.obj \
		$(GTK)\gtk\gtkseparator.obj \
		$(GTK)\gtk\gtkseparatormenuitem.obj \
		$(GTK)\gtk\gtkseparatortoolitem.obj \
		$(GTK)\gtk\gtksettings.obj \
		$(GTK)\gtk\gtksizegroup.obj \
		$(GTK)\gtk\gtksizerequest.obj \
		$(GTK)\gtk\gtksizerequestcache.obj \
		$(GTK)\gtk\gtkshow.obj \
		$(GTK)\gtk\gtkspinbutton.obj \
		$(GTK)\gtk\gtkspinner.obj \
!ifdef GIT
		$(GTK)\gtk\gtkstack.obj \
		$(GTK)\gtk\gtkstackswitcher.obj \
!endif
		$(GTK)\gtk\gtkstatusbar.obj \
		$(GTK)\gtk\gtkstatusicon.obj \
!ifndef GIT
		$(GTK)\gtk\gtkstock.obj \
!endif
		$(GTK)\gtk\gtkstyleanimation.obj \
		$(GTK)\gtk\gtkstylecascade.obj \
		$(GTK)\gtk\gtkstylecontext.obj \
		$(GTK)\gtk\gtkstyleproperties.obj \
		$(GTK)\gtk\gtkstyleproperty.obj \
		$(GTK)\gtk\gtkstyleprovider.obj \
		$(GTK)\gtk\gtkstyleproviderprivate.obj \
		$(GTK)\gtk\gtkswitch.obj \
		$(GTK)\gtk\gtktestutils.obj \
		$(GTK)\gtk\gtktextattributes.obj \
		$(GTK)\gtk\gtktextbtree.obj \
		$(GTK)\gtk\gtktextbuffer.obj \
		$(GTK)\gtk\gtktextbufferrichtext.obj \
		$(GTK)\gtk\gtktextbufferserialize.obj \
		$(GTK)\gtk\gtktextchild.obj \
		$(GTK)\gtk\gtktextdisplay.obj \
		$(GTK)\gtk\gtktexthandle.obj \
		$(GTK)\gtk\gtktextiter.obj \
		$(GTK)\gtk\gtktextlayout.obj \
		$(GTK)\gtk\gtktextmark.obj \
		$(GTK)\gtk\gtktextsegment.obj \
		$(GTK)\gtk\gtktexttag.obj \
		$(GTK)\gtk\gtktexttagtable.obj \
		$(GTK)\gtk\gtktexttypes.obj \
		$(GTK)\gtk\gtktextutil.obj \
		$(GTK)\gtk\gtktextview.obj \
		$(GTK)\gtk\gtkthemingbackground.obj \
		$(GTK)\gtk\gtkthemingengine.obj \
!ifndef GIT
		$(GTK)\gtk\gtktoggleaction.obj \
!endif
		$(GTK)\gtk\gtktogglebutton.obj \
		$(GTK)\gtk\gtktoggletoolbutton.obj \
		$(GTK)\gtk\gtktoolbar.obj \
		$(GTK)\gtk\gtktoolbutton.obj \
		$(GTK)\gtk\gtktoolitem.obj \
		$(GTK)\gtk\gtktoolitemgroup.obj \
		$(GTK)\gtk\gtktoolpalette.obj \
		$(GTK)\gtk\gtktoolshell.obj \
		$(GTK)\gtk\gtktooltip.obj \
!ifdef GIT
		$(GTK)\gtk\gtktrashmonitor.obj \
!endif
		$(GTK)\gtk\gtktreedatalist.obj \
		$(GTK)\gtk\gtktreednd.obj \
		$(GTK)\gtk\gtktreemenu.obj \
		$(GTK)\gtk\gtktreemodel.obj \
		$(GTK)\gtk\gtktreemodelfilter.obj \
		$(GTK)\gtk\gtktreemodelsort.obj \
		$(GTK)\gtk\gtktreeselection.obj \
		$(GTK)\gtk\gtktreesortable.obj \
		$(GTK)\gtk\gtktreestore.obj \
		$(GTK)\gtk\gtktreeview.obj \
		$(GTK)\gtk\gtktreeviewcolumn.obj \
		$(GTK)\gtk\gtktypebuiltins.obj \
!ifndef GIT
		$(GTK)\gtk\gtkuimanager.obj \
!endif
		$(GTK)\gtk\gtkvolumebutton.obj \
		$(GTK)\gtk\gtkviewport.obj \
		$(GTK)\gtk\gtkwidget.obj \
		$(GTK)\gtk\gtkwidgetpath.obj \
		$(GTK)\gtk\gtkwindow.obj \
		$(GTK)\gtk\gtkwin32theme.obj \
		\
		$(GTK)\gtk\gtkclipboard.obj \
		$(GTK)\gtk\gtkdnd.obj \
		\
		$(GTK)\gtk\gtkappchooseronlinepk.obj \
		\
		$(GTK)\gtk\gtkprint-win32.obj \
		$(GTK)\gtk\gtkprintoperation-win32.obj \
		$(GTK)\gtk\gtkwin32.obj \
		\
		$(GTK)\gtk\gtkwin32embed.obj \
		$(GTK)\gtk\gtkwin32embedwidget.obj \
		$(GTK)\gtk\gtkmountoperation-stub.obj \
		\
!ifdef GIT
		$(GTK)\gtk\deprecated\gtkaction.obj \
		$(GTK)\gtk\deprecated\gtkactiongroup.obj \
		$(GTK)\gtk\deprecated\gtkactivatable.obj \
!endif
		$(GTK)\gtk\deprecated\gtkcolorsel.obj \
		$(GTK)\gtk\deprecated\gtkcolorseldialog.obj \
		$(GTK)\gtk\deprecated\gtkfontsel.obj \
		$(GTK)\gtk\deprecated\gtkgradient.obj \
		$(GTK)\gtk\deprecated\gtkhandlebox.obj \
		$(GTK)\gtk\deprecated\gtkhbbox.obj \
		$(GTK)\gtk\deprecated\gtkhbox.obj \
		$(GTK)\gtk\deprecated\gtkhpaned.obj \
		$(GTK)\gtk\deprecated\gtkhscale.obj \
		$(GTK)\gtk\deprecated\gtkhscrollbar.obj \
		$(GTK)\gtk\deprecated\gtkhseparator.obj \
		$(GTK)\gtk\deprecated\gtkhsv.obj \
!ifdef GIT
		$(GTK)\gtk\deprecated\gtkiconfactory.obj \
		$(GTK)\gtk\deprecated\gtkimagemenuitem.obj \
		$(GTK)\gtk\deprecated\gtkradioaction.obj \
!endif
		$(GTK)\gtk\deprecated\gtkrc.obj \
!ifdef GIT
		$(GTK)\gtk\deprecated\gtkrecentaction.obj \
		$(GTK)\gtk\deprecated\gtkstock.obj \
!endif
		$(GTK)\gtk\deprecated\gtkstyle.obj \
		$(GTK)\gtk\deprecated\gtksymboliccolor.obj \
		$(GTK)\gtk\deprecated\gtktable.obj \
		$(GTK)\gtk\deprecated\gtktearoffmenuitem.obj \
!ifdef GIT
		$(GTK)\gtk\deprecated\gtktoggleaction.obj \
		$(GTK)\gtk\deprecated\gtkuimanager.obj \
!endif
		$(GTK)\gtk\deprecated\gtkvbbox.obj \
		$(GTK)\gtk\deprecated\gtkvbox.obj \
		$(GTK)\gtk\deprecated\gtkvscale.obj \
		$(GTK)\gtk\deprecated\gtkvscrollbar.obj \
		$(GTK)\gtk\deprecated\gtkvseparator.obj \
		$(GTK)\gtk\deprecated\gtkvpaned.obj \
		\
		$(GTK)\gtk\a11y\gtkaccessibility.obj \
		$(GTK)\gtk\a11y\gtkaccessibilitymisc.obj \
		$(GTK)\gtk\a11y\gtkaccessibilityutil.obj \
		$(GTK)\gtk\a11y\gtkarrowaccessible.obj \
		$(GTK)\gtk\a11y\gtkbooleancellaccessible.obj \
		$(GTK)\gtk\a11y\gtkbuttonaccessible.obj \
		$(GTK)\gtk\a11y\gtkcellaccessible.obj \
		$(GTK)\gtk\a11y\gtkcellaccessibleparent.obj \
		$(GTK)\gtk\a11y\gtkcheckmenuitemaccessible.obj \
		$(GTK)\gtk\a11y\gtkcolorswatchaccessible.obj \
		$(GTK)\gtk\a11y\gtkcomboboxaccessible.obj \
		$(GTK)\gtk\a11y\gtkcontaineraccessible.obj \
		$(GTK)\gtk\a11y\gtkcontainercellaccessible.obj \
		$(GTK)\gtk\a11y\gtkentryaccessible.obj \
		$(GTK)\gtk\a11y\gtkexpanderaccessible.obj \
		$(GTK)\gtk\a11y\gtkframeaccessible.obj \
		$(GTK)\gtk\a11y\gtkiconviewaccessible.obj \
		$(GTK)\gtk\a11y\gtkimageaccessible.obj \
		$(GTK)\gtk\a11y\gtkimagecellaccessible.obj \
		$(GTK)\gtk\a11y\gtklabelaccessible.obj \
		$(GTK)\gtk\a11y\gtklevelbaraccessible.obj \
		$(GTK)\gtk\a11y\gtklinkbuttonaccessible.obj \
!ifdef GIT
		$(GTK)\gtk\a11y\gtklistboxaccessible.obj \
!endif
		$(GTK)\gtk\a11y\gtklockbuttonaccessible.obj \
		$(GTK)\gtk\a11y\gtkmenuaccessible.obj \
		$(GTK)\gtk\a11y\gtkmenushellaccessible.obj \
		$(GTK)\gtk\a11y\gtkmenuitemaccessible.obj \
		$(GTK)\gtk\a11y\gtknotebookaccessible.obj \
		$(GTK)\gtk\a11y\gtknotebookpageaccessible.obj \
		$(GTK)\gtk\a11y\gtkpanedaccessible.obj \
		$(GTK)\gtk\a11y\gtkprogressbaraccessible.obj \
		$(GTK)\gtk\a11y\gtkradiobuttonaccessible.obj \
		$(GTK)\gtk\a11y\gtkradiomenuitemaccessible.obj \
		$(GTK)\gtk\a11y\gtkrangeaccessible.obj \
		$(GTK)\gtk\a11y\gtkrenderercellaccessible.obj \
		$(GTK)\gtk\a11y\gtkscaleaccessible.obj \
		$(GTK)\gtk\a11y\gtkscalebuttonaccessible.obj \
		$(GTK)\gtk\a11y\gtkscrolledwindowaccessible.obj \
		$(GTK)\gtk\a11y\gtkspinbuttonaccessible.obj \
		$(GTK)\gtk\a11y\gtkspinneraccessible.obj \
		$(GTK)\gtk\a11y\gtkstatusbaraccessible.obj \
		$(GTK)\gtk\a11y\gtkswitchaccessible.obj \
		$(GTK)\gtk\a11y\gtktextcellaccessible.obj \
		$(GTK)\gtk\a11y\gtktextviewaccessible.obj \
		$(GTK)\gtk\a11y\gtktogglebuttonaccessible.obj \
		$(GTK)\gtk\a11y\gtktoplevelaccessible.obj \
		$(GTK)\gtk\a11y\gtktreeviewaccessible.obj \
		$(GTK)\gtk\a11y\gtkwidgetaccessible.obj \
		$(GTK)\gtk\a11y\gtkwindowaccessible.obj \
		$(NULL)

$(GTK)\gtk\libgtk-win32-3.0-0.dll: iwm\crt\iwmcrt.lib $(GTK)\gtk\gtk.def $(GTK)\gtk\gtk-win32.res $(gtk_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(GTK)\gtk\gtk.def /IMPLIB:$(GTK)\gtk\gtk-win32-3.0.lib $(ATK)\atk\atk-1.0.lib $(CAIRO)\src\cairo.lib $(CAIRO)\util\cairo-gobject\cairo-gobject.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gio\gio-2.0.lib $(GLIB)\gmodule\gmodule-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gdk\gdk-win32-3.0.lib $(ICONVMLANG)\intl.lib $(PANGO)\pango\pango-1.0.lib $(PANGO)\pango\pangocairo-1.0.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib ole32.lib shell32.lib user32.lib winspool.lib ws2_32.lib $(gtk_OBJECTS) $(GTK)\gtk\gtk-win32.res
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

!ifdef GIT
$(GTK)\gtk\gtk.def: $(gtk_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(gtk_OBJECTS)
!endif

$(GTK)\gtk\gtk-win32.res: $*.rc
	$(RC) $(RCFLAGS) $*.rc

!ifdef GIT
$(GTK)\gtk\gtk-win32.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GTK_MAJOR_VERSION@=$(GTK_MAJOR_VERSION) @GTK_MINOR_VERSION@=$(GTK_MINOR_VERSION) @GTK_MICRO_VERSION@=$(GTK_MICRO_VERSION) @GTK_VERSION@=$(GTK_VERSION) @GTK_API_VERSION@=3.0 @LT_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

!ifdef GIT
$(gtk_OBJECTS): $(GTK)\config.h $(GTK)\gtk\gtkdbusgenerated.h $(GTK)\gtk\gtkmarshalers.h $(GTK)\gtk\gtkresources.h $(GTK)\gtk\gtktypebuiltins.h $(GTK)\gtk\gtkprivatetypebuiltins.h $(GTK)\gtk\gtkversion.h $(GTK)\gtk\gtkwin32css.h $(GTK)\gtk\gtkappchooserwidget.c.stamp $(GTK)\gtk\gtkappchooserdialog.c.stamp $(GTK)\gtk\gtkplacessidebar.c.stamp
!else
$(gtk_OBJECTS): $(GTK)\config.h
!endif
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Gtk\" /DGTK_COMPILATION /DGTK_VERSION=\"$(GTK_VERSION)\" /DGTK_BINARY_VERSION=\"$(GTK_VERSION)\" /DGTK_HOST=\"win32\" /DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED /DGTK_PRINT_BACKENDS=\"file,lpr\" /DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED /DGTK_PRINT_PREVIEW_COMMAND="\"evince --unlink-tempfile --preview %f\"" /DGTK_LIBDIR=\"/target/lib\" /FImsvc_recommended_pragmas.h /I$(GTK) /I$(GTK)\gdk /I$(GTK)\gtk /I$(ATK) /I$(CAIRO)\src /I$(CAIRO)\util\cairo-gobject /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $*.c

!ifdef GIT
$(GTK)\gtk\gtkdbusgenerated.c $(GTK)\gtk\gtkdbusgenerated.h: $(GTK)\gtk\gtkdbusinterfaces.xml $(GLIB)\gio\gdbus-2.0\codegen\gdbus-codegen $(GLIB)\gio\gdbus-2.0\codegen\config.py
	set UNINSTALLED_GLIB_SRCDIR=$(GLIB)
	set UNINSTALLED_GLIB_BUILDDIR=$(GLIB)
	$(PYTHON) $(GLIB)\gio\gdbus-2.0\codegen\gdbus-codegen \
		--interface-prefix org.Gtk. \
		--generate-c-code gtkdbusgenerated \
		--c-namespace _Gtk \
		$(GTK)\gtk\gtkdbusinterfaces.xml
	move /y gtkdbusgenerated.c $(GTK)\gtk
	move /y gtkdbusgenerated.h $(GTK)\gtk

$(GTK)\gtk\gtkmarshalers.c: $(GLIB)\gobject\glib-genmarshal.exe $*.list
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	$(GLIB)\gobject\glib-genmarshal.exe --prefix=_gtk_marshal $*.list --body --valist-marshallers > $@
	del iconv.dll
	del intl.dll
	del libglib-2.0-0.dll

$(GTK)\gtk\gtkmarshalers.h: $(GLIB)\gobject\glib-genmarshal.exe $*.list
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	$(GLIB)\gobject\glib-genmarshal.exe --prefix=_gtk_marshal $*.list --header --valist-marshallers > $@
	del iconv.dll
	del intl.dll
	del libglib-2.0-0.dll

dnd_CURSORS= \
		$(GTK)\gtk\cursor_dnd_ask.png \
		$(GTK)\gtk\cursor_dnd_copy.png \
		$(GTK)\gtk\cursor_dnd_link.png \
		$(GTK)\gtk\cursor_dnd_move.png \
		$(GTK)\gtk\cursor_dnd_none.png

$(GTK)\gtk\gtkresources.c: $(GTK)\gtk\gtk.gresource.xml $(GTK)\gtk\gtk-default.css $(GTK)\gtk\gtk-win32.css $(dnd_CURSORS)
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(GLIB)\gio\libgio-2.0-0.dll .
	copy /y $(GLIB)\gmodule\libgmodule-2.0-0.dll .
	copy /y $(GLIB)\gobject\libgobject-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	copy /y $(LIBFFI)\src\libffi-5.dll .
	copy /y $(ZLIB)\zlib1.dll .
	$(GLIB)\gio\glib-compile-resources.exe $(GTK)\gtk\gtk.gresource.xml --target=$@ --sourcedir=$(GTK)\gtk --c-name _gtk --generate-source --manual-register
	del libglib-2.0-0.dll
	del libgio-2.0-0.dll
	del libgmodule-2.0-0.dll
	del libgobject-2.0-0.dll
	del iconv.dll
	del intl.dll
	del libffi-5.dll
	del zlib1.dll

$(GTK)\gtk\gtkresources.h: $(GTK)\gtk\gtk.gresource.xml
	copy /y $(GLIB)\glib\libglib-2.0-0.dll .
	copy /y $(GLIB)\gio\libgio-2.0-0.dll .
	copy /y $(GLIB)\gmodule\libgmodule-2.0-0.dll .
	copy /y $(GLIB)\gobject\libgobject-2.0-0.dll .
	copy /y $(ICONVMLANG)\iconv.dll .
	copy /y $(ICONVMLANG)\intl.dll .
	copy /y $(LIBFFI)\src\libffi-5.dll .
	copy /y $(ZLIB)\zlib1.dll .
	$(GLIB)\gio\glib-compile-resources.exe $(GTK)\gtk\gtk.gresource.xml --target=$@ --sourcedir=$(GTK)\gtk --c-name _gtk --generate-header --manual-register
	del libglib-2.0-0.dll
	del libgio-2.0-0.dll
	del libgmodule-2.0-0.dll
	del libgobject-2.0-0.dll
	del iconv.dll
	del intl.dll
	del libffi-5.dll
	del zlib1.dll

gtk_0_headers= \
		$(GTK)\gtk\gtk.h \
		$(GTK)\gtk\gtkx.h \
		$(GTK)\gtk\gtk-a11y.h \
		$(GTK)\gtk\gtkaboutdialog.h \
		$(GTK)\gtk\gtkaccelgroup.h \
		$(GTK)\gtk\gtkaccellabel.h \
		$(GTK)\gtk\gtkaccelmap.h \
		$(GTK)\gtk\gtkaccessible.h \
		$(GTK)\gtk\gtkactionable.h \
		$(GTK)\gtk\gtkadjustment.h \
		$(GTK)\gtk\gtkalignment.h \
		$(GTK)\gtk\gtkappchooser.h \
		$(GTK)\gtk\gtkappchooserbutton.h \
		$(GTK)\gtk\gtkappchooserdialog.h \
		$(GTK)\gtk\gtkappchooserwidget.h \
		$(GTK)\gtk\gtkapplication.h \
		$(GTK)\gtk\gtkapplicationwindow.h \
		$(GTK)\gtk\gtkarrow.h \
		$(GTK)\gtk\gtkaspectframe.h \
		$(GTK)\gtk\gtkassistant.h \
		$(GTK)\gtk\gtkbbox.h \
		$(GTK)\gtk\gtkbin.h \
		$(GTK)\gtk\gtkbindings.h \
		$(GTK)\gtk\gtkborder.h \
		$(GTK)\gtk\gtkbox.h \
		$(GTK)\gtk\gtkbuilder.h \
		$(GTK)\gtk\gtkbuildable.h \
		$(GTK)\gtk\gtkbutton.h \
		$(GTK)\gtk\gtkcalendar.h \
		$(GTK)\gtk\gtkcellarea.h \
		$(GTK)\gtk\gtkcellareacontext.h \
		$(GTK)\gtk\gtkcellareabox.h \
		$(GTK)\gtk\gtkcelleditable.h \
		$(GTK)\gtk\gtkcelllayout.h \
		$(GTK)\gtk\gtkcellrenderer.h \
		$(GTK)\gtk\gtkcellrendereraccel.h \
		$(GTK)\gtk\gtkcellrenderercombo.h \
		$(GTK)\gtk\gtkcellrendererpixbuf.h \
		$(GTK)\gtk\gtkcellrendererprogress.h \
		$(GTK)\gtk\gtkcellrendererspin.h \
		$(GTK)\gtk\gtkcellrendererspinner.h \
		$(GTK)\gtk\gtkcellrenderertext.h \
		$(GTK)\gtk\gtkcellrenderertoggle.h \
		$(GTK)\gtk\gtkcellview.h \
		$(GTK)\gtk\gtkcheckbutton.h \
		$(GTK)\gtk\gtkcheckmenuitem.h \
		$(GTK)\gtk\gtkclipboard.h \
		$(GTK)\gtk\gtkcolorbutton.h \
		$(GTK)\gtk\gtkcolorchooser.h \
		$(GTK)\gtk\gtkcolorchooserwidget.h
gtk_1_headers= \
		$(GTK)\gtk\gtkcolorchooserdialog.h \
		$(GTK)\gtk\gtkcolorutils.h \
		$(GTK)\gtk\gtkcombobox.h \
		$(GTK)\gtk\gtkcomboboxtext.h \
		$(GTK)\gtk\gtkcontainer.h \
		$(GTK)\gtk\gtkcssprovider.h \
		$(GTK)\gtk\gtkcsssection.h \
		$(GTK)\gtk\gtkdebug.h \
		$(GTK)\gtk\gtkdialog.h \
		$(GTK)\gtk\gtkdnd.h \
		$(GTK)\gtk\gtkdrawingarea.h \
		$(GTK)\gtk\gtkeditable.h \
		$(GTK)\gtk\gtkentry.h \
		$(GTK)\gtk\gtkentrybuffer.h \
		$(GTK)\gtk\gtkentrycompletion.h \
		$(GTK)\gtk\gtkenums.h \
		$(GTK)\gtk\gtkeventbox.h \
		$(GTK)\gtk\gtkexpander.h \
		$(GTK)\gtk\gtkfilechooser.h \
		$(GTK)\gtk\gtkfilechooserbutton.h \
		$(GTK)\gtk\gtkfilechooserdialog.h \
		$(GTK)\gtk\gtkfilechooserwidget.h \
		$(GTK)\gtk\gtkfilefilter.h \
		$(GTK)\gtk\gtkfixed.h \
		$(GTK)\gtk\gtkfontbutton.h \
		$(GTK)\gtk\gtkfontchooser.h \
		$(GTK)\gtk\gtkfontchooserdialog.h  \
		$(GTK)\gtk\gtkfontchooserwidget.h \
		$(GTK)\gtk\gtkframe.h \
		$(GTK)\gtk\gtkgrid.h \
		$(GTK)\gtk\gtkheaderbar.h \
		$(GTK)\gtk\gtkicontheme.h \
		$(GTK)\gtk\gtkiconview.h \
		$(GTK)\gtk\gtkimage.h \
		$(GTK)\gtk\gtkimcontext.h \
		$(GTK)\gtk\gtkimcontextinfo.h \
		$(GTK)\gtk\gtkimcontextsimple.h \
		$(GTK)\gtk\gtkimmodule.h \
		$(GTK)\gtk\gtkimmulticontext.h \
		$(GTK)\gtk\gtkinfobar.h \
		$(GTK)\gtk\gtkinvisible.h \
		$(GTK)\gtk\gtklabel.h \
		$(GTK)\gtk\gtklayout.h \
		$(GTK)\gtk\gtklevelbar.h \
		$(GTK)\gtk\gtklinkbutton.h \
#		$(GTK)\gtk\gtklistbox.h \
		$(GTK)\gtk\gtkliststore.h \
		$(GTK)\gtk\gtklockbutton.h \
		$(GTK)\gtk\gtkmain.h
gtk_2_headers= \
		$(GTK)\gtk\gtkmenu.h \
		$(GTK)\gtk\gtkmenubar.h \
		$(GTK)\gtk\gtkmenubutton.h \
		$(GTK)\gtk\gtkmenuitem.h \
		$(GTK)\gtk\gtkmenushell.h \
		$(GTK)\gtk\gtkmenutoolbutton.h \
		$(GTK)\gtk\gtkmessagedialog.h \
		$(GTK)\gtk\gtkmisc.h \
		$(GTK)\gtk\gtkmodules.h \
		$(GTK)\gtk\gtkmountoperation.h \
		$(GTK)\gtk\gtknotebook.h \
		$(GTK)\gtk\gtknumerableicon.h \
		$(GTK)\gtk\gtkoffscreenwindow.h \
		$(GTK)\gtk\gtkorientable.h \
		$(GTK)\gtk\gtkoverlay.h \
		$(GTK)\gtk\gtkpagesetup.h \
		$(GTK)\gtk\gtkpaned.h \
		$(GTK)\gtk\gtkpapersize.h \
		$(GTK)\gtk\gtkplacessidebar.h \
		$(GTK)\gtk\gtkplug.h \
		$(GTK)\gtk\gtkprintcontext.h \
		$(GTK)\gtk\gtkprintoperation.h \
		$(GTK)\gtk\gtkprintoperationpreview.h \
		$(GTK)\gtk\gtkprintsettings.h \
		$(GTK)\gtk\gtkprogressbar.h \
		$(GTK)\gtk\gtkradiobutton.h \
		$(GTK)\gtk\gtkradiomenuitem.h \
		$(GTK)\gtk\gtkradiotoolbutton.h \
		$(GTK)\gtk\gtkrange.h \
		$(GTK)\gtk\gtkrecentchooser.h \
		$(GTK)\gtk\gtkrecentchooserdialog.h \
		$(GTK)\gtk\gtkrecentchoosermenu.h \
		$(GTK)\gtk\gtkrecentchooserwidget.h \
		$(GTK)\gtk\gtkrecentfilter.h \
		$(GTK)\gtk\gtkrecentmanager.h \
		$(GTK)\gtk\gtkrevealer.h \
		$(GTK)\gtk\gtkscale.h \
		$(GTK)\gtk\gtkscalebutton.h \
		$(GTK)\gtk\gtkscrollable.h \
		$(GTK)\gtk\gtkscrollbar.h \
		$(GTK)\gtk\gtkscrolledwindow.h \
		$(GTK)\gtk\gtksearchbar.h \
		$(GTK)\gtk\gtksearchentry.h \
		$(GTK)\gtk\gtkselection.h \
		$(GTK)\gtk\gtkseparator.h \
		$(GTK)\gtk\gtkseparatormenuitem.h \
		$(GTK)\gtk\gtkseparatortoolitem.h \
		$(GTK)\gtk\gtksettings.h \
		$(GTK)\gtk\gtkshow.h
gtk_3_headers= \
		$(GTK)\gtk\gtksizegroup.h \
		$(GTK)\gtk\gtksizerequest.h \
		$(GTK)\gtk\gtksocket.h \
		$(GTK)\gtk\gtkspinbutton.h \
		$(GTK)\gtk\gtkspinner.h \
		$(GTK)\gtk\gtkstack.h \
		$(GTK)\gtk\gtkstackswitcher.h \
		$(GTK)\gtk\gtkstatusbar.h \
		$(GTK)\gtk\gtkstatusicon.h \
		$(GTK)\gtk\gtkstylecontext.h \
		$(GTK)\gtk\gtkstyleproperties.h \
		$(GTK)\gtk\gtkstyleprovider.h \
		$(GTK)\gtk\gtkswitch.h \
		$(GTK)\gtk\gtktestutils.h \
		$(GTK)\gtk\gtktextattributes.h \
		$(GTK)\gtk\gtktextbuffer.h \
		$(GTK)\gtk\gtktextbufferrichtext.h \
		$(GTK)\gtk\gtktextchild.h \
		$(GTK)\gtk\gtktextdisplay.h \
		$(GTK)\gtk\gtktextiter.h \
		$(GTK)\gtk\gtktextmark.h \
		$(GTK)\gtk\gtktexttag.h \
		$(GTK)\gtk\gtktexttagtable.h \
		$(GTK)\gtk\gtktextview.h \
		$(GTK)\gtk\gtkthemingengine.h \
		$(GTK)\gtk\gtktogglebutton.h \
		$(GTK)\gtk\gtktoggletoolbutton.h \
		$(GTK)\gtk\gtktoolbar.h \
		$(GTK)\gtk\gtktoolbutton.h \
		$(GTK)\gtk\gtktoolitem.h \
		$(GTK)\gtk\gtktoolitemgroup.h \
		$(GTK)\gtk\gtktoolpalette.h \
		$(GTK)\gtk\gtktoolshell.h \
		$(GTK)\gtk\gtktooltip.h \
		$(GTK)\gtk\gtktreednd.h \
		$(GTK)\gtk\gtktreemodel.h \
		$(GTK)\gtk\gtktreemodelfilter.h \
		$(GTK)\gtk\gtktreemodelsort.h \
		$(GTK)\gtk\gtktreeselection.h \
		$(GTK)\gtk\gtktreesortable.h \
		$(GTK)\gtk\gtktreestore.h \
		$(GTK)\gtk\gtktreeview.h \
		$(GTK)\gtk\gtktreeviewcolumn.h \
		$(GTK)\gtk\gtktypes.h \
		$(GTK)\gtk\gtkviewport.h \
		$(GTK)\gtk\gtkvolumebutton.h \
		$(GTK)\gtk\gtkwidget.h \
		$(GTK)\gtk\gtkwidgetpath.h \
		$(GTK)\gtk\gtkwindow.h
gtk_4_headers= \
		$(GTK)\gtk\deprecated\gtkaction.h \
		$(GTK)\gtk\deprecated\gtkactiongroup.h \
		$(GTK)\gtk\deprecated\gtkactivatable.h \
		$(GTK)\gtk\deprecated\gtkcolorsel.h \
		$(GTK)\gtk\deprecated\gtkcolorseldialog.h \
		$(GTK)\gtk\deprecated\gtkfontsel.h \
		$(GTK)\gtk\deprecated\gtkgradient.h \
		$(GTK)\gtk\deprecated\gtkhandlebox.h \
		$(GTK)\gtk\deprecated\gtkhbbox.h \
		$(GTK)\gtk\deprecated\gtkhbox.h \
		$(GTK)\gtk\deprecated\gtkhpaned.h \
		$(GTK)\gtk\deprecated\gtkhscale.h \
		$(GTK)\gtk\deprecated\gtkhscrollbar.h \
		$(GTK)\gtk\deprecated\gtkhseparator.h \
		$(GTK)\gtk\deprecated\gtkhsv.h \
		$(GTK)\gtk\deprecated\gtkiconfactory.h \
		$(GTK)\gtk\deprecated\gtkimagemenuitem.h \
		$(GTK)\gtk\deprecated\gtkradioaction.h \
		$(GTK)\gtk\deprecated\gtkrc.h \
		$(GTK)\gtk\deprecated\gtkrecentaction.h \
		$(GTK)\gtk\deprecated\gtkstock.h \
		$(GTK)\gtk\deprecated\gtkstyle.h \
		$(GTK)\gtk\deprecated\gtksymboliccolor.h \
		$(GTK)\gtk\deprecated\gtktable.h \
		$(GTK)\gtk\deprecated\gtktearoffmenuitem.h \
		$(GTK)\gtk\deprecated\gtktoggleaction.h \
		$(GTK)\gtk\deprecated\gtkuimanager.h \
		$(GTK)\gtk\deprecated\gtkvbbox.h \
		$(GTK)\gtk\deprecated\gtkvbox.h \
		$(GTK)\gtk\deprecated\gtkvscale.h \
		$(GTK)\gtk\deprecated\gtkvscrollbar.h \
		$(GTK)\gtk\deprecated\gtkvseparator.h \
		$(GTK)\gtk\deprecated\gtkvpaned.h

$(GTK)\gtk\gtktypebuiltins.c: $(GTK)\gtk\gtktypebuiltins.c.template $(gtk_0_headers) $(gtk_1_headers) $(gtk_2_headers) $(gtk_3_headers) $(gtk_4_headers) iwm\iwm-runcommand-win32.exe
	echo $(PERL) $(GLIB)\gobject\glib-mkenums --template $(GTK)\gtk\gtktypebuiltins.c.template > glib-mkenums.tmp
	for %f in ($(gtk_0_headers)) do echo %f >> glib-mkenums.tmp
	for %f in ($(gtk_1_headers)) do echo %f >> glib-mkenums.tmp
	for %f in ($(gtk_2_headers)) do echo %f >> glib-mkenums.tmp
	for %f in ($(gtk_3_headers)) do echo %f >> glib-mkenums.tmp
	for %f in ($(gtk_4_headers)) do echo %f >> glib-mkenums.tmp
	iwm\iwm-runcommand-win32.exe glib-mkenums.tmp > $@
	del glib-mkenums.tmp

$(GTK)\gtk\gtktypebuiltins.h: $(GTK)\gtk\gtktypebuiltins.h.template $(gtk_0_headers) $(gtk_1_headers) $(gtk_2_headers) $(gtk_3_headers) $(gtk_4_headers) iwm\iwm-runcommand-win32.exe
	echo $(PERL) $(GLIB)\gobject\glib-mkenums --template $(GTK)\gtk\gtktypebuiltins.h.template > glib-mkenums.tmp
	for %f in ($(gtk_0_headers)) do echo %f >> glib-mkenums.tmp
	for %f in ($(gtk_1_headers)) do echo %f >> glib-mkenums.tmp
	for %f in ($(gtk_2_headers)) do echo %f >> glib-mkenums.tmp
	for %f in ($(gtk_3_headers)) do echo %f >> glib-mkenums.tmp
	for %f in ($(gtk_4_headers)) do echo %f >> glib-mkenums.tmp
	iwm\iwm-runcommand-win32.exe glib-mkenums.tmp > $@
	del glib-mkenums.tmp

gtk_private_type_h_sources= \
		$(GTK)\gtk\gtkcsstypesprivate.h \
		$(GTK)\gtk\gtktexthandleprivate.h

$(GTK)\gtk\gtkprivatetypebuiltins.c: $(GTK)\gtk\gtkprivatetypebuiltins.c.template $(gtk_private_type_h_sources)
	$(PERL) $(GLIB)\gobject\glib-mkenums --template $(GTK)\gtk\gtkprivatetypebuiltins.c.template $(gtk_private_type_h_sources) > $@

$(GTK)\gtk\gtkprivatetypebuiltins.h: $(GTK)\gtk\gtkprivatetypebuiltins.h.template $(gtk_private_type_h_sources)
	$(PERL) $(GLIB)\gobject\glib-mkenums --template $(GTK)\gtk\gtkprivatetypebuiltins.h.template $(gtk_private_type_h_sources) > $@

$(GTK)\gtk\gtkversion.h: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @GTK_MAJOR_VERSION@=$(GTK_MAJOR_VERSION) @GTK_MINOR_VERSION@=$(GTK_MINOR_VERSION) @GTK_MICRO_VERSION@=$(GTK_MICRO_VERSION) @GTK_BINARY_AGE@=$(GTK_BINARY_AGE) @GTK_INTERFACE_AGE@=0 < $@.in > $@

$(GTK)\gtk\gtkicontheme.obj: $(GTK)\gtk\gtkbuiltincache.h

$(GTK)\gtk\gtkbuiltincache.h: $(GTK)\gtk\gtk-renewal-icon-cache.exe $(GTK)\gtk\stamp-icons
	if exist bin rename bin bin~
	mkdir bin
	copy /y $(GDK_PIXBUF)\gdk-pixbuf\libgdk_pixbuf-2.0-0.dll bin
	copy /y $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-query-loaders.exe bin
	copy /y $(GLIB)\glib\libglib-2.0-0.dll bin
	copy /y $(GLIB)\gio\libgio-2.0-0.dll bin
	copy /y $(GLIB)\gmodule\libgmodule-2.0-0.dll bin
	copy /y $(GLIB)\gobject\libgobject-2.0-0.dll bin
	copy /y $(GLIB)\gthread\libgthread-2.0-0.dll bin
	copy /y $(ICONVMLANG)\iconv.dll bin
	copy /y $(ICONVMLANG)\intl.dll bin
	copy /y $(JPEG)\libjpeg-9.dll bin
	copy /y $(LIBFFI)\src\libffi-5.dll bin
	copy /y $(LIBPNG)\libpng15.dll bin
	copy /y $(TIFF)\libtiff\libtiff.dll bin
	copy /y $(ZLIB)\zlib1.dll bin
	copy /y $(GTK)\gtk\gtk-renewal-icon-cache.exe bin
	if exist lib rename lib lib~
	mkdir lib
	mkdir lib\gdk-pixbuf-2.0
	mkdir lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)
	mkdir lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders
	for %f in ($(gdk_pixbuf_LOADERS)) do copy /y $(GDK_PIXBUF)\gdk-pixbuf\%f.dll lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders
	bin\gdk-pixbuf-query-loaders.exe > lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders.cache
	bin\gtk-renewal-icon-cache.exe --force --ignore-theme-index --source builtin_icons $(GTK)\gtk\stock-icons > $@
	del bin\libgdk_pixbuf-2.0-0.dll
	del bin\gdk-pixbuf-query-loaders.exe
	del bin\libglib-2.0-0.dll
	del bin\libgio-2.0-0.dll
	del bin\libgmodule-2.0-0.dll
	del bin\libgobject-2.0-0.dll
	del bin\libgthread-2.0-0.dll
	del bin\iconv.dll
	del bin\intl.dll
	del bin\libjpeg-9.dll
	del bin\libffi-5.dll
	del bin\libpng15.dll
	del bin\libtiff.dll
	del bin\zlib1.dll
	del bin\gtk-renewal-icon-cache.exe
	for %f in ($(gdk_pixbuf_LOADERS)) do del lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders\%f.dll
	del lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders.cache
	rmdir bin
	rmdir lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders
	rmdir lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)
	rmdir lib\gdk-pixbuf-2.0
	rmdir lib
	if exist bin~ rename bin~ bin
	if exist lib~ rename lib~ lib

$(GTK)\gtk\gtk-renewal-icon-cache.exe: iwm\crt\iwmcrt.lib $(GTK)\gtk\updateiconcache.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(ICONVMLANG)\intl.lib $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GTK)\gtk\updateiconcache.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Gtk\" /DGTK_COMPILATION /FImsvc_recommended_pragmas.h /I$(GTK) /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(GLIB)\glib /I$(ICONVMLANG) $**

$(GTK)\gtk\stamp-icons:
	for %d in (16 24) do \
	( if exist $(GTK)\gtk\stock-icons\%d\go-next-ltr.png             copy /y $(GTK)\gtk\stock-icons\%d\go-next-ltr.png             $(GTK)\gtk\stock-icons\%d\go-previous-rtl.png \
	& if exist $(GTK)\gtk\stock-icons\%d\go-previous-ltr.png         copy /y $(GTK)\gtk\stock-icons\%d\go-previous-ltr.png         $(GTK)\gtk\stock-icons\%d\go-next-rtl.png \
	& if exist $(GTK)\gtk\stock-icons\%d\go-last-ltr.png             copy /y $(GTK)\gtk\stock-icons\%d\go-last-ltr.png             $(GTK)\gtk\stock-icons\%d\go-first-rtl.png \
	& if exist $(GTK)\gtk\stock-icons\%d\go-first-ltr.png            copy /y $(GTK)\gtk\stock-icons\%d\go-first-ltr.png            $(GTK)\gtk\stock-icons\%d\go-last-rtl.png \
	& if exist $(GTK)\gtk\stock-icons\%d\media-seek-backward-ltr.png copy /y $(GTK)\gtk\stock-icons\%d\media-seek-backward-ltr.png $(GTK)\gtk\stock-icons\%d\media-seek-forward-rtl.png \
	& if exist $(GTK)\gtk\stock-icons\%d\media-skip-backward-ltr.png copy /y $(GTK)\gtk\stock-icons\%d\media-skip-backward-ltr.png $(GTK)\gtk\stock-icons\%d\media-skip-forward-rtl.png \
	& if exist $(GTK)\gtk\stock-icons\%d\media-skip-forward-ltr.png  copy /y $(GTK)\gtk\stock-icons\%d\media-skip-forward-ltr.png  $(GTK)\gtk\stock-icons\%d\media-skip-backward-rtl.png \
	& if exist $(GTK)\gtk\stock-icons\%d\media-seek-forward-ltr.png  copy /y $(GTK)\gtk\stock-icons\%d\media-seek-forward-ltr.png  $(GTK)\gtk\stock-icons\%d\media-seek-backward-rtl.png \
	& if exist $(GTK)\gtk\stock-icons\%d\media-floppy.png            copy /y $(GTK)\gtk\stock-icons\%d\media-floppy.png            $(GTK)\gtk\stock-icons\%d\document-save.png \
	& if exist $(GTK)\gtk\stock-icons\%d\folder.png                  copy /y $(GTK)\gtk\stock-icons\%d\folder.png                  $(GTK)\gtk\stock-icons\%d\folder-remote.png \
	& if exist $(GTK)\gtk\stock-icons\%d\folder.png                  copy /y $(GTK)\gtk\stock-icons\%d\folder.png                  $(GTK)\gtk\stock-icons\%d\user-home.png \
	& if exist $(GTK)\gtk\stock-icons\%d\folder.png                  copy /y $(GTK)\gtk\stock-icons\%d\folder.png                  $(GTK)\gtk\stock-icons\%d\user-desktop.png)
	echo stamp-icons > $@

$(GTK)\gtk\gtktestutils.obj: $(GTK)\gtk\gtktypefuncs.c

$(GTK)\gtk\gtktypefuncs.c: iwm\iwm-maketypefuncs-win32.exe
	echo #include "gtk/gtk.h" > xgen-gtfsrc.c
	$(CC) /EP /I$(GTK) /I$(GTK)\gdk /I$(GTK)\gtk /I$(ATK) /I$(CAIRO)\src /I$(CAIRO)\util\cairo-gobject /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) xgen-gtfsrc.c | iwm\iwm-maketypefuncs-win32.exe > $@
	del xgen-gtfsrc.c

$(GTK)\gtk\gtkappchooserwidget.c: $@.stamp

$(GTK)\gtk\gtkappchooserwidget.c.stamp: iwm\iwm-escape-win32.exe
	if exist $*.orig move /y $*.orig $*
	copy /y $* $*.orig
	iwm\iwm-escape-win32.exe < $*.orig > $*
	echo $* > $@

$(GTK)\gtk\gtkappchooserdialog.c: $@.stamp

$(GTK)\gtk\gtkappchooserdialog.c.stamp: iwm\iwm-escape-win32.exe
	if exist $*.orig move /y $*.orig $*
	copy /y $* $*.orig
	iwm\iwm-escape-win32.exe < $*.orig > $*
	echo $* > $@

$(GTK)\gtk\gtkplacessidebar.c: $@.stamp

$(GTK)\gtk\gtkplacessidebar.c.stamp: iwm\iwm-escape-win32.exe
	if exist $*.orig move /y $*.orig $*
	copy /y $* $*.orig
	iwm\iwm-escape-win32.exe < $*.orig > $*
	echo $* > $@

iwm\iwm-maketypefuncs-win32.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\iwm-maketypefuncs-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=1 /DVERSION=\"0.0.1\" $*.rc

iwm\iwm-maketypefuncs-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**

$(GTK)\gtk\gtkwin32css.h: iwm\iwm-makegtkwin32css-win32.exe
	iwm\iwm-makegtkwin32css-win32.exe < $(GTK)\gtk\gtk-win32.css > $@

iwm\iwm-makegtkwin32css-win32.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\iwm-makegtkwin32css-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=0 /DVERSION=\"0.0.0\" $*.rc

iwm\iwm-makegtkwin32css-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**
!endif

# inputim-am-et.dll
$(GTK)\modules\input\inputim-am-et.dll: iwm\crt\iwmcrt.lib $(GTK)\modules\input\imam-et.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(GTK)\modules\input\imam-et.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GTK)\modules\input\imam-et.obj: $*.c
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# inputim-cedilla.dll
$(GTK)\modules\input\inputim-cedilla.dll: iwm\crt\iwmcrt.lib $(GTK)\modules\input\imcedilla.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(GTK)\modules\input\imcedilla.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GTK)\modules\input\imcedilla.obj: $*.c
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# inputim-cyrillic-translit.dll
$(GTK)\modules\input\inputim-cyrillic-translit.dll: iwm\crt\iwmcrt.lib $(GTK)\modules\input\imcyrillic-translit.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(GTK)\modules\input\imcyrillic-translit.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GTK)\modules\input\imcyrillic-translit.obj: $*.c
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# inputim-ime.dll
imime_OBJECTS= \
		$(GTK)\modules\input\gtkimcontextime.obj \
		$(GTK)\modules\input\imime.obj

$(GTK)\modules\input\inputim-ime.dll: iwm\crt\iwmcrt.lib $(imime_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 imm32.lib user32.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gdk\gdk-win32-$(GTK_API_VERSION).lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(PANGO)\pango\pango-1.0.lib $(PANGO)\pango\pangowin32-1.0.lib $(imime_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(imime_OBJECTS):
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $*.c

# inputim-inuktitut.dll
$(GTK)\modules\input\inputim-inuktitut.dll: iwm\crt\iwmcrt.lib $(GTK)\modules\input\iminuktitut.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(GTK)\modules\input\iminuktitut.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GTK)\modules\input\iminuktitut.obj: $*.c
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# inputim-ipa.dll
$(GTK)\modules\input\inputim-ipa.dll: iwm\crt\iwmcrt.lib $(GTK)\modules\input\imipa.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(GTK)\modules\input\imipa.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GTK)\modules\input\imipa.obj: $*.c
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# inputim-multipress.dll
multipress_OBJECTS= \
		$(GTK)\modules\input\gtkimcontextmultipress.obj \
		$(GTK)\modules\input\immultipress.obj

$(GTK)\modules\input\inputim-multipress.dll: iwm\crt\iwmcrt.lib $(multipress_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gdk\gdk-win32-$(GTK_API_VERSION).lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(PANGO)\pango\pango-1.0.lib $(multipress_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(multipress_OBJECTS):
	$(CC) $(CLFLAGS) /DMULTIPRESS_CONFDIR=\".\" /DMULTIPRESS_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $*.c

# inputim-thai.dll
imthai_OBJECTS= \
		$(GTK)\modules\input\imthai.obj \
		$(GTK)\modules\input\gtkimcontextthai.obj \
		$(GTK)\modules\input\thai-charprop.obj

$(GTK)\modules\input\inputim-thai.dll: iwm\crt\iwmcrt.lib $(imthai_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\glib\glib-2.0.lib  $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gdk\gdk-win32-$(GTK_API_VERSION).lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(imthai_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(imthai_OBJECTS):
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# inputim-ti-er.dll
$(GTK)\modules\input\inputim-ti-er.dll: iwm\crt\iwmcrt.lib $(GTK)\modules\input\imti-er.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(GTK)\modules\input\imti-er.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GTK)\modules\input\imti-er.obj: $*.c
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# inputim-ti-et.dll
$(GTK)\modules\input\inputim-ti-et.dll: iwm\crt\iwmcrt.lib $(GTK)\modules\input\imti-et.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(GTK)\modules\input\imti-et.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GTK)\modules\input\imti-et.obj: $*.c
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# inputim-viqr.dll
$(GTK)\modules\input\inputim-viqr.dll: iwm\crt\iwmcrt.lib $(GTK)\modules\input\imviqr.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:im_module_create,@5 /EXPORT:im_module_exit,@1 /EXPORT:im_module_init,@2 /EXPORT:im_module_list,@3 $(GLIB)\gobject\gobject-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(GTK)\modules\input\imviqr.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(GTK)\modules\input\imviqr.obj: $*.c
	$(CC) $(CLFLAGS) /DGTK_LOCALEDIR=\"/share/locale\" /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(ICONVMLANG) /I$(PANGO) $**

# gtk-query-immodules-x.0.exe
$(GTK)\gtk\gtk-query-immodules-$(GTK_API_VERSION).exe: iwm\crt\iwmcrt.lib $(GTK)\gtk\queryimmodules.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $(GLIB)\gmodule\gmodule-2.0.lib $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(PANGO)\pango\pango-1.0.lib $(GTK)\gtk\queryimmodules.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(GTK)\gtk\queryimmodules.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Gtk\" /DGTK_COMPILATION /FImsvc_recommended_pragmas.h /I$(GTK) /I$(GTK)\gdk /I$(ATK) /I$(CAIRO)\src /I$(GDK_PIXBUF) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(PANGO) $**

###############################################################################
# HarfBuzz                                                                    #
###############################################################################
harfbuzz: freetype glib $(HARFBUZZ)\src\libharfbuzz-$(HARFBUZZ_MAJOR_VERSION).dll

harfbuzz_OBJECTS= \
		$(HARFBUZZ)\src\hb-blob.obj \
		$(HARFBUZZ)\src\hb-buffer.obj \
		$(HARFBUZZ)\src\hb-common.obj \
		$(HARFBUZZ)\src\hb-fallback-shape.obj \
		$(HARFBUZZ)\src\hb-font.obj \
		$(HARFBUZZ)\src\hb-ot-tag.obj \
		$(HARFBUZZ)\src\hb-set.obj \
		$(HARFBUZZ)\src\hb-shape.obj \
		$(HARFBUZZ)\src\hb-shape-plan.obj \
		$(HARFBUZZ)\src\hb-shaper.obj \
		$(HARFBUZZ)\src\hb-tt-font.obj \
		$(HARFBUZZ)\src\hb-unicode.obj \
		$(HARFBUZZ)\src\hb-warning.obj \
		\
		$(HARFBUZZ)\src\hb-ot-layout.obj \
		$(HARFBUZZ)\src\hb-ot-map.obj \
		$(HARFBUZZ)\src\hb-ot-shape.obj \
		$(HARFBUZZ)\src\hb-ot-shape-complex-arabic.obj \
		$(HARFBUZZ)\src\hb-ot-shape-complex-default.obj \
		$(HARFBUZZ)\src\hb-ot-shape-complex-indic.obj \
		$(HARFBUZZ)\src\hb-ot-shape-complex-indic-table.obj \
		$(HARFBUZZ)\src\hb-ot-shape-complex-myanmar.obj \
		$(HARFBUZZ)\src\hb-ot-shape-complex-sea.obj \
		$(HARFBUZZ)\src\hb-ot-shape-complex-thai.obj \
		$(HARFBUZZ)\src\hb-ot-shape-normalize.obj \
		$(HARFBUZZ)\src\hb-ot-shape-fallback.obj \
		\
		$(HARFBUZZ)\src\hb-glib.obj \
		\
		$(HARFBUZZ)\src\hb-gobject-structs.obj \
		$(HARFBUZZ)\src\hb-gobject-enums.obj \
		\
		$(HARFBUZZ)\src\hb-ft.obj \
		\
		$(HARFBUZZ)\src\hb-uniscribe.obj

$(HARFBUZZ)\src\libharfbuzz-$(HARFBUZZ_MAJOR_VERSION).dll: iwm\crt\iwmcrt.lib $(HARFBUZZ)\src\harfbuzz.def $(harfbuzz_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(HARFBUZZ)\src\harfbuzz.def /IMPLIB:$(HARFBUZZ)\src\harfbuzz.lib $(FREETYPE)\src\freetype.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib gdi32.lib user32.lib usp10.lib $(harfbuzz_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(HARFBUZZ)\src\harfbuzz.def: $(harfbuzz_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(harfbuzz_OBJECTS)

$(harfbuzz_OBJECTS):
	$(CC) $(CLFLAGS) \
		/DHAVE_ATEXIT=1 \
		/DHAVE_CAIRO=1 \
		/DHAVE_CAIRO_FT=1 \
		/DHAVE_FREETYPE=1 \
		/DHAVE_FT_FACE_GETCHARVARIANTINDEX=1 \
		/DHAVE_GLIB=1 \
		/DHAVE_GOBJECT=1 \
		/DHAVE_GTHREAD=1 \
		/DHAVE_IO_H=1 \
		/DHAVE_MEMORY_H=1 \
		/DHAVE_OT=1 \
		/DHAVE_STDINT_H=1 \
		/DHAVE_STDLIB_H=1 \
		/DHAVE_STRING_H=1 \
		/DHAVE_SYS_STAT_H=1 \
		/DHAVE_SYS_TYPES_H=1 \
		/DHAVE_UNISCRIBE=1 \
		/DHAVE_USP10_H=1 \
		/DHAVE_WINDOWS_H=1 \
		/DHAVE__SETMODE=1 \
		/DNO_MINUS_C_MINUS_O=1 \
		/DPACKAGE_BUGREPORT=\"http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz\" \
		/DPACKAGE_NAME=\"HarfBuzz\" \
		"/DPACKAGE_STRING=\"harfbuzz $(HARFBUZZ_VERSION)\"" \
		/DPACKAGE_TARNAME=\"harfbuzz\" \
		/DPACKAGE_URL=\"http://harfbuzz.org/\" \
		/DPACKAGE_VERSION=\"$(HARFBUZZ_VERSION)\" \
		/DSTDC_HEADERS=1 \
		/I$(FREETYPE)\include /I$(GLIB) /I$(GLIB)\glib $*.cc

harfbuzz_headers= \
		$(HARFBUZZ)\src\hb.h \
		$(HARFBUZZ)\src\hb-blob.h \
		$(HARFBUZZ)\src\hb-buffer.h \
		$(HARFBUZZ)\src\hb-common.h \
		$(HARFBUZZ)\src\hb-font.h \
		$(HARFBUZZ)\src\hb-set.h \
		$(HARFBUZZ)\src\hb-shape.h \
		$(HARFBUZZ)\src\hb-shape-plan.h \
		$(HARFBUZZ)\src\hb-unicode.h \
		$(HARFBUZZ)\src\hb-version.h \
		\
		$(HARFBUZZ)\src\hb-ot.h \
		$(HARFBUZZ)\src\hb-ot-layout.h \
		$(HARFBUZZ)\src\hb-ot-tag.h \
		\
		$(HARFBUZZ)\src\hb-glib.h \
		\
		$(HARFBUZZ)\src\hb-gobject.h

$(HARFBUZZ)\src\hb-gobject-enums.cc: $(HARFBUZZ)\src\hb-gobject-enums.cc.tmpl $(harfbuzz_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums --template $(HARFBUZZ)\src\hb-gobject-enums.cc.tmpl $(harfbuzz_headers) > $@

###############################################################################
# iconvmlang                                                                  #
###############################################################################
iconvmlang: $(ICONVMLANG)\msgfmt.exe $(ICONVMLANG)\libiconv2.dll $(ICONVMLANG)\libintl3.dll

# libiconv2
$(ICONVMLANG)\libiconv2.dll: $(ICONVMLANG)\iconv.dll iwm\iwm-forwarding-win32.exe
	iwm\iwm-forwarding-win32.exe $(ICONVMLANG)\iconv.dll $@

# iconv.dll
$(ICONVMLANG)\iconv.dll: iwm\crt\iwmcrt.lib $*.res $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /EXPORT:_libiconv_version,@1 /EXPORT:iconv_canonicalize,@2 /EXPORT:libiconv,@3 /EXPORT:libiconv_close,@4 /EXPORT:libiconv_open,@5 /EXPORT:libiconv_set_relocation_prefix,@6 /EXPORT:libiconvctl,@7 /EXPORT:libiconvlist,@8 kernel32.lib ole32.lib oleaut32.lib user32.lib $*.res $*.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(ICONVMLANG)\iconv.res: $*.rc
	$(RC) $(RCFLAGS) /DMAJOR=$(ICONVMLANG_MAJOR_VERSION) /DMINOR=$(ICONVMLANG_MINOR_VERSION) /DMICRO=$(ICONVMLANG_MICRO_VERSION) /DVERSION=\"$(ICONVMLANG_VERSION)\" $**

$(ICONVMLANG)\iconv.obj: $*.c
	$(CC) $(CLFLAGS) $**

# libintl3
$(ICONVMLANG)\libintl3.dll: $(ICONVMLANG)\intl.dll iwm\iwm-forwarding-win32.exe
	iwm\iwm-forwarding-win32.exe $(ICONVMLANG)\intl.dll $@

# intl.dll
$(ICONVMLANG)\intl.dll: iwm\crt\iwmcrt.lib $(ICONVMLANG)\iconv.dll $*.res $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 \
		/EXPORT:bind_textdomain_codeset=libintl_bind_textdomain_codeset,@3 \
		/EXPORT:bindtextdomain=libintl_bindtextdomain,@4 \
		/EXPORT:dcgettext=libintl_dcgettext,@5 \
		/EXPORT:dcngettext=libintl_dcngettext,@6 \
		/EXPORT:dgettext=libintl_dgettext,@7 \
		/EXPORT:dngettext=libintl_dngettext,@8 \
		/EXPORT:gettext=libintl_gettext,@9 \
		/EXPORT:libintl_bind_textdomain_codeset,@10 \
		/EXPORT:libintl_bindtextdomain,@11 \
		/EXPORT:libintl_dcgettext,@12 \
		/EXPORT:libintl_dcngettext,@13 \
		/EXPORT:libintl_dgettext,@14 \
		/EXPORT:libintl_dngettext,@15 \
		/EXPORT:libintl_fprintf,@16 \
		/EXPORT:libintl_gettext,@17 \
		/EXPORT:libintl_ngettext,@18 \
		/EXPORT:libintl_printf,@19 \
		/EXPORT:libintl_set_relocation_prefix,@20 \
		/EXPORT:libintl_sprintf,@21 \
		/EXPORT:libintl_textdomain,@22 \
		/EXPORT:libintl_version,@23 \
		/EXPORT:libintl_vfprintf,@24 \
		/EXPORT:libintl_vprintf,@25 \
		/EXPORT:libintl_vsprintf,@26 \
		/EXPORT:ngettext=libintl_ngettext,@27 \
		/EXPORT:textdomain=libintl_textdomain,@28 $(ICONVMLANG)\iconv.lib kernel32.lib $*.res $*.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(ICONVMLANG)\intl.res: $*.rc
	$(RC) $(RCFLAGS) /DMAJOR=$(ICONVMLANG_MAJOR_VERSION) /DMINOR=$(ICONVMLANG_MINOR_VERSION) /DMICRO=$(ICONVMLANG_MICRO_VERSION) /DVERSION=\"$(ICONVMLANG_VERSION)\" $**

$(ICONVMLANG)\intl.obj: $*.c
	$(CC) $(CLFLAGS) $**

# msgfmt.exe
$(ICONVMLANG)\msgfmt.exe: iwm\crt\iwmcrt.lib $*.res $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $*.res $*.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(ICONVMLANG)\msgfmt.res: $*.rc $(ICONVMLANG)\iconvmlang.ico
	$(RC) $(RCFLAGS) /DMAJOR=$(ICONVMLANG_MAJOR_VERSION) /DMINOR=$(ICONVMLANG_MINOR_VERSION) /DMICRO=$(ICONVMLANG_MICRO_VERSION) /DVERSION=\"$(ICONVMLANG_VERSION)\" $*.rc

$(ICONVMLANG)\msgfmt.obj: $*.c
	$(CC) $(CLFLAGS) $**

###############################################################################
# JPEG                                                                        #
###############################################################################
jpeg: $(JPEG)\jpeg62.dll $(JPEG)\libjpeg-8.dll

# jpeg62.dll
$(JPEG)\jpeg62.dll: $(JPEG)\libjpeg-9.dll iwm\iwm-forwarding-win32.exe
	iwm\iwm-forwarding-win32.exe $(JPEG)\libjpeg-9.dll $@

# libjpeg-8.dll
$(JPEG)\libjpeg-8.dll: $(JPEG)\libjpeg-9.dll iwm\iwm-forwarding-win32.exe
	iwm\iwm-forwarding-win32.exe $(JPEG)\libjpeg-9.dll $@

jpeg_OBJECTS= \
		$(JPEG)\jcapimin.obj \
		$(JPEG)\jcapistd.obj \
		$(JPEG)\jcarith.obj \
		$(JPEG)\jctrans.obj \
		$(JPEG)\jcparam.obj \
		$(JPEG)\jdatadst.obj \
		$(JPEG)\jcinit.obj \
		$(JPEG)\jcmaster.obj \
		$(JPEG)\jcmarker.obj \
		$(JPEG)\jcmainct.obj \
		$(JPEG)\jcprepct.obj \
		$(JPEG)\jccoefct.obj \
		$(JPEG)\jccolor.obj \
		$(JPEG)\jcsample.obj \
		$(JPEG)\jchuff.obj \
		$(JPEG)\jcdctmgr.obj \
		$(JPEG)\jfdctfst.obj \
		$(JPEG)\jfdctflt.obj \
		$(JPEG)\jfdctint.obj \
		\
		$(JPEG)\jdapimin.obj \
		$(JPEG)\jdapistd.obj \
		$(JPEG)\jdarith.obj \
		$(JPEG)\jdtrans.obj \
		$(JPEG)\jdatasrc.obj \
		$(JPEG)\jdmaster.obj \
		$(JPEG)\jdinput.obj \
		$(JPEG)\jdmarker.obj \
		$(JPEG)\jdhuff.obj \
		$(JPEG)\jdmainct.obj \
		$(JPEG)\jdcoefct.obj \
		$(JPEG)\jdpostct.obj \
		$(JPEG)\jddctmgr.obj \
		$(JPEG)\jidctfst.obj \
		$(JPEG)\jidctflt.obj \
		$(JPEG)\jidctint.obj \
		$(JPEG)\jdsample.obj \
		$(JPEG)\jdcolor.obj \
		$(JPEG)\jquant1.obj \
		$(JPEG)\jquant2.obj \
		$(JPEG)\jdmerge.obj \
		\
		$(JPEG)\jaricom.obj \
		$(JPEG)\jcomapi.obj \
		$(JPEG)\jutils.obj \
		$(JPEG)\jerror.obj \
		$(JPEG)\jmemmgr.obj \
		\
		$(JPEG)\jmemnobs.obj

$(JPEG)\libjpeg-9.dll: iwm\crt\iwmcrt.lib $(JPEG)\jpeg.def $(jpeg_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(JPEG)\jpeg.def /IMPLIB:$(JPEG)\libjpeg.lib $(jpeg_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(JPEG)\jpeg.def: $(jpeg_OBJECTS) iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(jpeg_OBJECTS)

$(jpeg_OBJECTS): $(JPEG)\jconfig.h
	$(CC) $(CLFLAGS) /I$(JPEG) $*.c

$(JPEG)\jconfig.h: $*.vc
	copy /y $** $@

###############################################################################
# libffi                                                                      #
###############################################################################
libffi: $(LIBFFI)\src\libffi-5.dll

libffi_OBJECTS= \
		$(LIBFFI)\src\closures.obj \
		$(LIBFFI)\src\debug.obj \
		$(LIBFFI)\src\java_raw_api.obj \
		$(LIBFFI)\src\prep_cif.obj \
		$(LIBFFI)\src\raw_api.obj \
		$(LIBFFI)\src\types.obj \
		$(LIBFFI)\src\x86\ffi.obj

$(LIBFFI)\src\libffi-5.dll: iwm\crt\iwmcrt.lib $(LIBFFI)\src\ffi.def $(libffi_OBJECTS) $(LIBFFI)\src\x86\win32.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(LIBFFI)\src\ffi.def /IMPLIB:$(LIBFFI)\src\ffi.lib kernel32.lib $(libffi_OBJECTS) $(LIBFFI)\src\x86\win32.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(LIBFFI)\src\ffi.def: $(libffi_OBJECTS) $(LIBFFI)\src\x86\win32.obj iwm\iwm-makedef-win32.exe
	iwm\iwm-makedef-win32.exe -o $@ $(libffi_OBJECTS) $(LIBFFI)\src\x86\win32.obj

$(libffi_OBJECTS): $(LIBFFI)\include\ffi.h $(LIBFFI)\include\fficonfig.h
	$(CC) $(CLFLAGS) /I$(LIBFFI)\include /I$(LIBFFI)\src\x86 $*.c

$(LIBFFI)\src\x86\win32.obj: $*.asm
	$(AS) $(ASFLAGS) $**

$(LIBFFI)\src\x86\win32.asm: $(LIBFFI)\include\ffi.h $(LIBFFI)\include\fficonfig.h $*.S
	$(CC) /EP /I$(LIBFFI)\include /I$(LIBFFI)\src\x86 $*.S > $@

$(LIBFFI)\include\ffi.h: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @VERSION@=$(LIBFFI_VERSION) @TARGET@=X86_WIN32 @HAVE_LONG_DOUBLE@=1 @FFI_EXEC_TRAMPOLINE_TABLE@=0 < $@.in > $@

$(LIBFFI)\include\fficonfig.h:
	echo #define EH_FRAME_FLAGS "aw" > $@
	echo #define HAVE_ALLOCA 1 >> $@
	echo #define HAVE_AS_ASCII_PSEUDO_OP 1 >> $@
	echo #define HAVE_AS_CFI_PSEUDO_OP 1 >> $@
	echo #define HAVE_AS_STRING_PSEUDO_OP 1 >> $@
	echo #define HAVE_AS_X86_PCREL 1 >> $@
	echo #define HAVE_LONG_DOUBLE 1 >> $@
	echo #define HAVE_MEMCPY 1 >> $@
	echo #define HAVE_MEMORY_H 1 >> $@
	echo #define HAVE_STDINT_H 1 >> $@
	echo #define HAVE_STDLIB_H 1 >> $@
	echo #define HAVE_STRING_H 1 >> $@
	echo #define HAVE_SYS_STAT_H 1 >> $@
	echo #define HAVE_SYS_TYPES_H 1 >> $@
	echo #define LT_OBJDIR ".libs/" >> $@
	echo #define PACKAGE "libffi" >> $@
	echo #define PACKAGE_BUGREPORT "http://sourceware.org/libffi.html" >> $@
	echo #define PACKAGE_NAME "libffi" >> $@
	echo #define PACKAGE_STRING "libffi $(LIBFFI_VERSION)" >> $@
	echo #define PACKAGE_TARNAME "libffi" >> $@
	echo #define PACKAGE_URL "" >> $@
	echo #define PACKAGE_VERSION "$(LIBFFI_VERSION)" >> $@
	echo #define SIZEOF_DOUBLE 8 >> $@
	echo #define SIZEOF_LONG_DOUBLE 12 >> $@
	echo #define STDC_HEADERS 1 >> $@
	echo #define VERSION "$(LIBFFI_VERSION)" >> $@
	echo #if defined AC_APPLE_UNIVERSAL_BUILD >> $@
	echo # if defined __BIG_ENDIAN__ >> $@
	echo #  define WORDS_BIGENDIAN 1 >> $@
	echo # endif >> $@
	echo #else >> $@
	echo # ifndef WORDS_BIGENDIAN >> $@
	echo # endif >> $@
	echo #endif >> $@
	echo #ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE >> $@
	echo #ifdef LIBFFI_ASM >> $@
	echo #define FFI_HIDDEN(name) .hidden name >> $@
	echo #else >> $@
	echo #define FFI_HIDDEN __attribute__ ((visibility ("hidden"))) >> $@
	echo #endif >> $@
	echo #else >> $@
	echo #ifdef LIBFFI_ASM >> $@
	echo #define FFI_HIDDEN(name) >> $@
	echo #else >> $@
	echo #define FFI_HIDDEN >> $@
	echo #endif >> $@
	echo #endif >> $@

###############################################################################
# libpng                                                                      #
###############################################################################
libpng: zlib $(LIBPNG)\libpng13.dll $(LIBPNG)\libpng14.dll

# libpng13.dll
$(LIBPNG)\libpng13.dll: $(LIBPNG)\libpng15.dll iwm\iwm-forwarding-win32.exe
	iwm\iwm-forwarding-win32.exe $(LIBPNG)\libpng15.dll $@

# libpng14.dll
$(LIBPNG)\libpng14.dll: $(LIBPNG)\libpng15.dll iwm\iwm-forwarding-win32.exe
	iwm\iwm-forwarding-win32.exe $(LIBPNG)\libpng15.dll $@

libpng_OBJECTS= \
		$(LIBPNG)\png.obj \
		$(LIBPNG)\pngerror.obj \
		$(LIBPNG)\pngget.obj \
		$(LIBPNG)\pngmem.obj \
		$(LIBPNG)\pngpread.obj \
		$(LIBPNG)\pngread.obj \
		$(LIBPNG)\pngrio.obj \
		$(LIBPNG)\pngrtran.obj \
		$(LIBPNG)\pngrutil.obj \
		$(LIBPNG)\pngset.obj \
		$(LIBPNG)\pngtrans.obj \
		$(LIBPNG)\pngwio.obj \
		$(LIBPNG)\pngwrite.obj \
		$(LIBPNG)\pngwtran.obj \
		$(LIBPNG)\pngwutil.obj

$(LIBPNG)\libpng15.dll: iwm\crt\iwmcrt.lib $(LIBPNG)\scripts\pngwin.res $(libpng_OBJECTS) $(LIBPNG)\scripts\symbols.def.stamp
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(LIBPNG)\scripts\symbols.def $(ZLIB)\zdll.lib $(libpng_OBJECTS) $(LIBPNG)\scripts\pngwin.res
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(LIBPNG)\scripts\pngwin.res: $*.rc $(LIBPNG)\pnglibconf.h
	$(RC) $(RCFLAGS) /i$(LIBPNG) $*.rc

$(libpng_OBJECTS): $(LIBPNG)\pnglibconf.h
	$(CC) $(CLFLAGS) /DPNG_BUILD_DLL /DPNG_ERROR_NUMBERS_SUPPORTED /DPNG_SET_OPTION_SUPPORTED /I$(ZLIB) $*.c

$(LIBPNG)\pnglibconf.h: $(LIBPNG)\scripts\pnglibconf.h.prebuilt
	copy /y $** $@

$(LIBPNG)\scripts\symbols.def.stamp: iwm\iwm-fixer-win32.exe iwm\iwm-replace-win32.exe
	if exist $*.orig move /y $*.orig $*
	copy /y $* $*.orig
	type iwm\libpng\symbols.def.patch | iwm\iwm-replace-win32.exe @LIBPNG@=$(LIBPNG) | iwm\iwm-fixer-win32.exe -p0
	echo $* > $@

###############################################################################
# Pango                                                                       #
###############################################################################
pango: cairo fontconfig harfbuzz glib \
		$(PANGO)\pango\libpango-1.0-0.dll \
		$(PANGO)\pango\libpangoft2-1.0-0.dll \
		$(PANGO)\pango\libpangowin32-1.0-0.dll \
		$(PANGO)\pango\libpangocairo-1.0-0.dll \
		$(PANGO)\modules\basic\pango-basic-fc.dll \
		$(PANGO)\modules\basic\pango-basic-win32.dll \
		$(PANGO)\pango\pango-querymodules.exe \
		iwm\pango-makealiases-win32.exe

!ifdef GIT
$(PANGO)\config.h: $@.win32.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @PANGO_VERSION@=$(PANGO_VERSION) @PANGO_BINARY_AGE@=$(PANGO_BINARY_AGE) @PANGO_INTERFACE_AGE@=0 @PANGO_VERSION_MAJOR@=$(PANGO_MAJOR_VERSION) @PANGO_VERSION_MICRO@=$(PANGO_MICRO_VERSION) @PANGO_VERSION_MINOR@=$(PANGO_MINOR_VERSION) < $@.win32.in > $@
!else
$(PANGO)\config.h: $@.win32
	copy /y $** $@
!endif

# pango
pango_OBJECTS= \
		$(PANGO)\pango\break.obj \
		$(PANGO)\pango\ellipsize.obj \
		$(PANGO)\pango\fonts.obj \
		$(PANGO)\pango\glyphstring.obj \
		$(PANGO)\pango\modules.obj \
		$(PANGO)\pango\pango-attributes.obj \
		$(PANGO)\pango\pango-bidi-type.obj \
		$(PANGO)\pango\pango-color.obj \
		$(PANGO)\pango\pango-context.obj \
		$(PANGO)\pango\pango-coverage.obj \
		$(PANGO)\pango\pango-engine.obj \
		$(PANGO)\pango\pango-fontmap.obj \
		$(PANGO)\pango\pango-fontset.obj \
		$(PANGO)\pango\pango-glyph-item.obj \
		$(PANGO)\pango\pango-gravity.obj \
		$(PANGO)\pango\pango-item.obj \
		$(PANGO)\pango\pango-language.obj \
		$(PANGO)\pango\pango-layout.obj \
		$(PANGO)\pango\pango-markup.obj \
		$(PANGO)\pango\pango-matrix.obj \
		$(PANGO)\pango\pango-renderer.obj \
		$(PANGO)\pango\pango-script.obj \
		$(PANGO)\pango\pango-tabs.obj \
		$(PANGO)\pango\pango-utils.obj \
		$(PANGO)\pango\reorder-items.obj \
		$(PANGO)\pango\shape.obj \
		$(PANGO)\pango\pango-enum-types.obj \
		$(PANGO)\pango\module-defs-lang.obj \
		\
		$(PANGO)\pango\mini-fribidi\fribidi.obj \
		$(PANGO)\pango\mini-fribidi\fribidi_types.obj \
		$(PANGO)\pango\mini-fribidi\fribidi_char_type.obj

!ifdef GIT
$(PANGO)\pango\libpango-1.0-0.dll: iwm\crt\iwmcrt.lib $(PANGO)\pango\pango.res $(pango_OBJECTS) $(PANGO)\pango\arabic-lang.obj $(PANGO)\pango\indic-lang.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(PANGO)\pango\pango.def /IMPLIB:$(PANGO)\pango\pango-1.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gmodule\gmodule-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(PANGO)\pango\pango.res $(pango_OBJECTS) $(PANGO)\pango\arabic-lang.obj $(PANGO)\pango\indic-lang.obj
!else
$(PANGO)\pango\libpango-1.0-0.dll: iwm\crt\iwmcrt.lib $(PANGO)\pango\pango.res $(pango_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(PANGO)\pango\pango.def /IMPLIB:$(PANGO)\pango\pango-1.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gmodule\gmodule-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(PANGO)\pango\pango.res $(pango_OBJECTS)
!endif
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(PANGO)\pango\pango.res: $*.rc
	$(RC) $(RCFLAGS) $*.rc

!ifdef GIT
$(PANGO)\pango\pango.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @PANGO_VERSION_MAJOR@=$(PANGO_MAJOR_VERSION) @PANGO_VERSION_MINOR@=$(PANGO_MINOR_VERSION) @PANGO_VERSION_MICRO@=$(PANGO_MICRO_VERSION) @PANGO_API_VERSION@=1.0 @PANGO_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(pango_OBJECTS): $(PANGO)\config.h $(PANGO)\pango\pango-features.h $(PANGO)\pango\pango-enum-types.h
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(PANGO)\pango /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $*.c

!ifdef GIT
pango_headers= \
		$(PANGO)\pango\pango.h \
		$(PANGO)\pango\pango-attributes.h \
		$(PANGO)\pango\pango-bidi-type.h \
		$(PANGO)\pango\pango-break.h \
		$(PANGO)\pango\pango-context.h \
		$(PANGO)\pango\pango-coverage.h \
		$(PANGO)\pango\pango-engine.h \
		$(PANGO)\pango\pango-font.h \
		$(PANGO)\pango\pango-fontmap.h \
		$(PANGO)\pango\pango-fontset.h \
		$(PANGO)\pango\pango-glyph.h \
		$(PANGO)\pango\pango-glyph-item.h \
		$(PANGO)\pango\pango-gravity.h \
		$(PANGO)\pango\pango-item.h \
		$(PANGO)\pango\pango-language.h \
		$(PANGO)\pango\pango-layout.h \
		$(PANGO)\pango\pango-matrix.h \
		$(PANGO)\pango\pango-modules.h \
		$(PANGO)\pango\pango-renderer.h \
		$(PANGO)\pango\pango-script.h \
		$(PANGO)\pango\pango-tabs.h \
		$(PANGO)\pango\pango-types.h \
		$(PANGO)\pango\pango-utils.h

$(PANGO)\pango\pango-enum-types.c: $(pango_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#include <pango.h>" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		$** > $@

$(PANGO)\pango\pango-enum-types.h: $(pango_headers)
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#ifndef __PANGO_ENUM_TYPES_H__\n#define __PANGO_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--vhead "GType @enum_name@_get_type (void);\n#define PANGO_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
		--ftail "G_END_DECLS\n#endif /* __PANGO_ENUM_TYPES_H__ */" \
		$** > $@

$(PANGO)\pango\pango-features.h:
	echo #ifndef PANGO_FEATURES_H > $@
	echo #define PANGO_FEATURES_H >> $@
	echo. >> $@
	echo #define PANGO_VERSION_MAJOR $(PANGO_MAJOR_VERSION) >> $@
	echo #define PANGO_VERSION_MINOR $(PANGO_MINOR_VERSION) >> $@
	echo #define PANGO_VERSION_MICRO $(PANGO_MICRO_VERSION) >> $@
	echo. >> $@
	echo #define PANGO_VERSION_STRING "$(PANGO_VERSION)" >> $@
	echo. >> $@
	echo #endif >> $@

$(PANGO)\pango\module-defs-lang.obj: $(PANGO)\pango\module-defs.h

$(PANGO)\pango\module-defs-lang.c: $@.win32
	copy /y $** $@

$(PANGO)\pango\module-defs.h: $@.win32
	copy /y $** $@

$(PANGO)\pango\arabic-lang.obj: $(PANGO)\modules\arabic\arabic-lang.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /DPANGO_MODULE_PREFIX=_pango_arabic_lang /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(PANGO)\pango /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $**

$(PANGO)\pango\indic-lang.obj: $(PANGO)\modules\indic\indic-lang.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /DPANGO_MODULE_PREFIX=_pango_indic_lang /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(PANGO)\pango /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $**
!endif

$(PANGO)\pango\pango-language.c: $(PANGO)\pango\pango-language-sample-table.h.stamp

$(PANGO)\pango\pango-language-sample-table.h.stamp: iwm\iwm-escape-win32.exe
	if exist $*.orig move /y $*.orig $*
	copy /y $* $*.orig
	iwm\iwm-escape-win32.exe < $*.orig > $*
	echo $* > $@

# pangoft2
pangoft2_OBJECTS= \
		$(PANGO)\pango\pangofc-font.obj \
		$(PANGO)\pango\pangofc-fontmap.obj \
		$(PANGO)\pango\pangofc-decoder.obj \
		$(PANGO)\pango\pangoft2.obj \
		\
		$(PANGO)\pango\module-defs-fc.obj \
		$(PANGO)\pango\pangoft2-fontmap.obj \
		$(PANGO)\pango\pangoft2-render.obj \
		$(PANGO)\pango\pango-ot-buffer.obj \
		$(PANGO)\pango\pango-ot-info.obj \
		$(PANGO)\pango\pango-ot-ruleset.obj \
		$(PANGO)\pango\pango-ot-tag.obj

$(PANGO)\pango\libpangoft2-1.0-0.dll: iwm\crt\iwmcrt.lib $(PANGO)\pango\pangoft2.res $(pangoft2_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(PANGO)\pango\pangoft2.def /IMPLIB:$(PANGO)\pango\pangoft2-1.0.lib $(FONTCONFIG)\src\fontconfig.lib $(FREETYPE)\src\freetype.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(HARFBUZZ)\src\harfbuzz.lib $(PANGO)\pango\pango-1.0.lib $(PANGO)\pango\pangoft2.res $(pangoft2_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(PANGO)\pango\pangoft2.res: $*.rc
	$(RC) $(RCFLAGS) $**

!ifdef GIT
$(PANGO)\pango\pangoft2.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @PANGO_VERSION_MAJOR@=$(PANGO_MAJOR_VERSION) @PANGO_VERSION_MINOR@=$(PANGO_MINOR_VERSION) @PANGO_VERSION_MICRO@=$(PANGO_MICRO_VERSION) @PANGO_API_VERSION@=1.0 @PANGO_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(pangoft2_OBJECTS): $(PANGO)\config.h
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /DPANGO_MODULE_PREFIX=_pango_basic_ft2 /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(PANGO)\pango /I$(FONTCONFIG) /I$(FREETYPE)\include /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(HARFBUZZ)\src $*.c

!ifdef GIT
$(PANGO)\pango\module-defs-fc.c: $@.win32
	echo #include "module-defs.h" > $@
	echo. >> $@
	echo PangoIncludedModule _pango_included_fc_modules[] = { >> $@
	echo   {NULL, NULL, NULL, NULL} >> $@
	echo }; >> $@
!endif

# pangowin32
pangowin32_OBJECTS= \
		$(PANGO)\pango\module-defs-win32.obj \
		$(PANGO)\pango\pangowin32.obj \
		$(PANGO)\pango\pangowin32-fontcache.obj \
		$(PANGO)\pango\pangowin32-fontmap.obj

!ifdef GIT
$(PANGO)\pango\libpangowin32-1.0-0.dll: iwm\crt\iwmcrt.lib $(PANGO)\pango\pangowin32.res $(pangowin32_OBJECTS) $(PANGO)\pango\basic-win32.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(PANGO)\pango\pangowin32.def /IMPLIB:$(PANGO)\pango\pangowin32-1.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(PANGO)\pango\pango-1.0.lib gdi32.lib user32.lib usp10.lib $(PANGO)\pango\pangowin32.res $(pangowin32_OBJECTS) $(PANGO)\pango\basic-win32.obj
!else
$(PANGO)\pango\libpangowin32-1.0-0.dll: iwm\crt\iwmcrt.lib $(PANGO)\pango\pangowin32.res $(pangowin32_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(PANGO)\pango\pangowin32.def /IMPLIB:$(PANGO)\pango\pangowin32-1.0.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(PANGO)\pango\pango-1.0.lib gdi32.lib user32.lib usp10.lib $(PANGO)\pango\pangowin32.res $(pangowin32_OBJECTS)
!endif
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(PANGO)\pango\pangowin32.res: $*.rc
	$(RC) $(RCFLAGS) $**

!ifdef GIT
$(PANGO)\pango\pangowin32.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @PANGO_VERSION_MAJOR@=$(PANGO_MAJOR_VERSION) @PANGO_VERSION_MINOR@=$(PANGO_MINOR_VERSION) @PANGO_VERSION_MICRO@=$(PANGO_MICRO_VERSION) @PANGO_API_VERSION@=1.0 @PANGO_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(pangowin32_OBJECTS): $(PANGO)\config.h
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /DPANGO_MODULE_PREFIX=_pango_basic_win32 /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $*.c

!ifdef GIT
$(PANGO)\pango\module-defs-win32.c: $@.win32
	copy /y $** $@

$(PANGO)\pango\basic-win32.obj: $(PANGO)\modules\basic\basic-win32.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /DPANGO_MODULE_PREFIX=_pango_basic_win32 /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(PANGO)\pango /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $**
!endif

# pangocairo
pangocairo_OBJECTS= \
		$(PANGO)\pango\pangocairo-context.obj \
		$(PANGO)\pango\pangocairo-font.obj \
		$(PANGO)\pango\pangocairo-fontmap.obj \
		$(PANGO)\pango\pangocairo-render.obj \
		\
		$(PANGO)\pango\pangocairo-win32font.obj \
		$(PANGO)\pango\pangocairo-win32fontmap.obj \
		\
		$(PANGO)\pango\pangocairo-fcfont.obj \
		$(PANGO)\pango\pangocairo-fcfontmap.obj

$(PANGO)\pango\libpangocairo-1.0-0.dll: iwm\crt\iwmcrt.lib $(PANGO)\pango\pangocairo.res $(pangocairo_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(PANGO)\pango\pangocairo.def /IMPLIB:$(PANGO)\pango\pangocairo-1.0.lib $(CAIRO)\src\cairo.lib $(FONTCONFIG)\src\fontconfig.lib $(FREETYPE)\src\freetype.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(PANGO)\pango\pango-1.0.lib $(PANGO)\pango\pangoft2-1.0.lib $(PANGO)\pango\pangowin32-1.0.lib gdi32.lib $(PANGO)\pango\pangocairo.res $(pangocairo_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(PANGO)\pango\pangocairo.res: $*.rc
	$(RC) $(RCFLAGS) $**

!ifdef GIT
$(PANGO)\pango\pangocairo.rc: $@.in iwm\iwm-replace-win32.exe
	iwm\iwm-replace-win32.exe @PANGO_VERSION_MAJOR@=$(PANGO_MAJOR_VERSION) @PANGO_VERSION_MINOR@=$(PANGO_MINOR_VERSION) @PANGO_VERSION_MICRO@=$(PANGO_MICRO_VERSION) @PANGO_API_VERSION@=1.0 @PANGO_CURRENT_MINUS_AGE@=0 < $@.in > $@
!endif

$(pangocairo_OBJECTS): $(PANGO)\config.h
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(PANGO)\pango /I$(CAIRO)\src /I$(FONTCONFIG) /I$(FREETYPE)\include /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $*.c

# pango-basic-fc
$(PANGO)\modules\basic\pango-basic-fc.dll: iwm\crt\iwmcrt.lib $(PANGO)\modules\basic\basic-fc.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(PANGO)\modules\module.def $(FONTCONFIG)\src\fontconfig.lib $(FREETYPE)\src\freetype.lib $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(HARFBUZZ)\src\harfbuzz.lib $(PANGO)\pango\pango-1.0.lib $(PANGO)\pango\pangoft2-1.0.lib $(PANGO)\modules\basic\basic-fc.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(PANGO)\modules\basic\basic-fc.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(PANGO)\pango /I$(FONTCONFIG) /I$(FREETYPE)\include /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule /I$(HARFBUZZ)\src $**

# pango-basic-win32
$(PANGO)\modules\basic\pango-basic-win32.dll: iwm\crt\iwmcrt.lib $(PANGO)\modules\basic\basic-win32.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(PANGO)\modules\module.def $(GLIB)\glib\glib-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(PANGO)\pango\pango-1.0.lib $(PANGO)\pango\pangowin32-1.0.lib gdi32.lib usp10.lib $(PANGO)\modules\basic\basic-win32.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(PANGO)\modules\basic\basic-win32.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(PANGO)\pango /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $**

# pango-querymodules
$(PANGO)\pango\pango-querymodules.exe: iwm\crt\iwmcrt.lib $(PANGO)\pango\querymodules.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 $(GLIB)\glib\glib-2.0.lib $(GLIB)\gmodule\gmodule-2.0.lib $(GLIB)\gobject\gobject-2.0.lib $(PANGO)\pango\pango-1.0.lib $(PANGO)\pango\querymodules.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

$(PANGO)\pango\querymodules.obj: $*.c
	$(CC) $(CLFLAGS) /DG_LOG_DOMAIN=\"Pango\" /DPANGO_ENABLE_BACKEND /DPANGO_ENABLE_ENGINE /DLIBDIR=\"/target/lib\" /FImsvc_recommended_pragmas.h /I$(PANGO) /I$(GLIB) /I$(GLIB)\glib /I$(GLIB)\gmodule $**

# pango-makealiases-win32
iwm\pango-makealiases-win32.exe: iwm\crt\iwmcrt.lib $*.res $*.obj
	$(LINK) $(LNFLAGS) $(ICFLAGS) /SUBSYSTEM:CONSOLE,5.01 kernel32.lib gdi32.lib user32.lib $*.res $*.obj
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\pango-makealiases-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=0 /DVERSION=\"0.0.0\" $*.rc

iwm\pango-makealiases-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**

###############################################################################
# TIFF                                                                        #
###############################################################################
tiff: jpeg zlib $(TIFF)\libtiff\libtiff3.dll

# libtiff3
$(TIFF)\libtiff\libtiff3.dll: $(TIFF)\libtiff\libtiff.dll iwm\iwm-forwarding-win32.exe
	iwm\iwm-forwarding-win32.exe $(TIFF)\libtiff\libtiff.dll $@

tiff_OBJECTS= \
		$(TIFF)\libtiff\tif_aux.obj \
		$(TIFF)\libtiff\tif_close.obj \
		$(TIFF)\libtiff\tif_codec.obj \
		$(TIFF)\libtiff\tif_color.obj \
		$(TIFF)\libtiff\tif_compress.obj \
		$(TIFF)\libtiff\tif_dir.obj \
		$(TIFF)\libtiff\tif_dirinfo.obj \
		$(TIFF)\libtiff\tif_dirread.obj \
		$(TIFF)\libtiff\tif_dirwrite.obj \
		$(TIFF)\libtiff\tif_dumpmode.obj \
		$(TIFF)\libtiff\tif_error.obj \
		$(TIFF)\libtiff\tif_extension.obj \
		$(TIFF)\libtiff\tif_fax3.obj \
		$(TIFF)\libtiff\tif_fax3sm.obj \
		$(TIFF)\libtiff\tif_getimage.obj \
		$(TIFF)\libtiff\tif_jbig.obj \
		$(TIFF)\libtiff\tif_jpeg.obj \
		$(TIFF)\libtiff\tif_jpeg_12.obj \
		$(TIFF)\libtiff\tif_ojpeg.obj \
		$(TIFF)\libtiff\tif_flush.obj \
		$(TIFF)\libtiff\tif_luv.obj \
		$(TIFF)\libtiff\tif_lzw.obj \
		$(TIFF)\libtiff\tif_next.obj \
		$(TIFF)\libtiff\tif_open.obj \
		$(TIFF)\libtiff\tif_packbits.obj \
		$(TIFF)\libtiff\tif_pixarlog.obj \
		$(TIFF)\libtiff\tif_predict.obj \
		$(TIFF)\libtiff\tif_print.obj \
		$(TIFF)\libtiff\tif_read.obj \
#		$(TIFF)\libtiff\tif_stream.obj \
		$(TIFF)\libtiff\tif_swab.obj \
		$(TIFF)\libtiff\tif_strip.obj \
		$(TIFF)\libtiff\tif_thunder.obj \
		$(TIFF)\libtiff\tif_tile.obj \
		$(TIFF)\libtiff\tif_version.obj \
		$(TIFF)\libtiff\tif_warning.obj \
		$(TIFF)\libtiff\tif_write.obj \
		$(TIFF)\libtiff\tif_zip.obj \
		$(TIFF)\libtiff\tif_win32.obj


$(TIFF)\libtiff\libtiff.dll: iwm\crt\iwmcrt.lib $(tiff_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(TIFF)\libtiff\libtiff.def $(JPEG)\libjpeg.lib $(ZLIB)\zdll.lib user32.lib $(tiff_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(tiff_OBJECTS): $(TIFF)\libtiff\tif_config.h $(TIFF)\libtiff\tiffconf.h
	$(CC) $(CLFLAGS) /DTIF_PLATFORM_WINDOWED /DCCITT_SUPPORT /DPACKBITS_SUPPORT /DLZW_SUPPORT /DTHUNDER_SUPPORT /DNEXT_SUPPORT /DLOGLUV_SUPPORT /DJPEG_SUPPORT /DOJPEG_SUPPORT /DZIP_SUPPORT /DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP /DSTRIP_SIZE_DEFAULT=8192 /DDEFAULT_EXTRASAMPLE_AS_ALPHA /DCHECK_JPEG_YCBCR_SUBSAMPLING /DUSE_WIN32_FILEIO /I$(JPEG) /I$(ZLIB) $*.c

$(TIFF)\libtiff\tif_config.h: $(TIFF)\libtiff\tif_config.vc.h
	copy /y $** $@

$(TIFF)\libtiff\tiffconf.h: $(TIFF)\libtiff\tiffconf.vc.h
	copy /y $** $@

###############################################################################
# zlib                                                                        #
###############################################################################
zlib: $(ZLIB)\zlib1.dll

zlib_OBJECTS= \
		$(ZLIB)\adler32.obj \
		$(ZLIB)\compress.obj \
		$(ZLIB)\crc32.obj \
		$(ZLIB)\deflate.obj \
		$(ZLIB)\gzclose.obj \
		$(ZLIB)\gzlib.obj \
		$(ZLIB)\gzread.obj \
		$(ZLIB)\gzwrite.obj \
		$(ZLIB)\infback.obj \
		$(ZLIB)\inffast.obj \
		$(ZLIB)\inflate.obj \
		$(ZLIB)\inftrees.obj \
		$(ZLIB)\trees.obj \
		$(ZLIB)\uncompr.obj \
		$(ZLIB)\zutil.obj

$(ZLIB)\zlib1.dll: iwm\crt\iwmcrt.lib $(ZLIB)\zlib1.res $(zlib_OBJECTS)
	$(LINK) $(LNFLAGS) $(ICFLAGS) /DLL /SUBSYSTEM:WINDOWS,5.01 /DEF:$(ZLIB)\win32\zlib.def /IMPLIB:$(ZLIB)\zdll.lib $(ZLIB)\zlib1.res $(zlib_OBJECTS)
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#2

$(ZLIB)\zlib1.res: $(ZLIB)\win32\zlib1.rc
	$(RC) $(RCFLAGS) $**

$(zlib_OBJECTS):
	$(CC) $(CLFLAGS) $*.c

###############################################################################
# IWM                                                                         #
###############################################################################
# iwmdirent
iwm\dirent\dirent.obj: $*.c $*.h iwm\dirent\tdirent.c
	$(CC) $(CLFLAGS) $*.c

iwm\dirent\wdirent.obj: $*.c iwm\dirent\dirent.h iwm\dirent\tdirent.c
	$(CC) $(CLFLAGS) $*.c

# iwm-escape-win32
iwm\iwm-escape-win32.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\iwm-escape-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=0 /DVERSION=\"0.0.0\" $*.rc

iwm\iwm-escape-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**

# iwm-fixer-win32
iwm\iwm-fixer-win32.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\iwm-fixer-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=1 /DVERSION=\"0.0.1\" $*.rc

iwm\iwm-fixer-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**

# iwm-forwarding-win32
iwm\iwm-forwarding-win32.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 shlwapi.lib user32.lib $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\iwm-forwarding-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=0 /DVERSION=\"0.0.0\" $*.rc

iwm\iwm-forwarding-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**

# iwm-makedef-win32
iwm\iwm-makedef-win32.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 gdi32.lib user32.lib $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\iwm-makedef-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=2 /DVERSION=\"0.0.2\" $*.rc

iwm\iwm-makedef-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**

# iwm-replace-win32
iwm\iwm-replace-win32.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\iwm-replace-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=1 /DVERSION=\"0.0.1\" $*.rc

iwm\iwm-replace-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**

# iwm-runcommand-win32
iwm\iwm-runcommand-win32.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\iwm-runcommand-win32.res: $*.rc iwm\gtklab.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=0 /DVERSION=\"0.0.0\" $*.rc

iwm\iwm-runcommand-win32.obj: $*.c
	$(CC) $(CLFLAGS) $**

# iwmcrt.lib
iwmcrt_OBJECTS= \
		iwm\crt\atexit.obj \
		iwm\crt\dllmain.obj \
		iwm\crt\dllmaincrtstartup.obj \
		iwm\crt\fstat32.obj \
		iwm\crt\fstat32i64.obj \
		iwm\crt\fstat64i32.obj \
		iwm\crt\iwmcrt.obj \
		iwm\crt\maincrtstartup.obj \
		iwm\crt\onexit.obj \
		iwm\crt\report_rangecheckfailure.obj \
		iwm\crt\security.obj \
		iwm\crt\set_invalid_parameter_handler.obj \
		iwm\crt\stat32.obj \
		iwm\crt\stat32i64.obj \
		iwm\crt\stat64i32.obj \
		iwm\crt\tlstable.obj \
		iwm\crt\winmaincrtstartup.obj \
		iwm\crt\wmaincrtstartup.obj \
		iwm\crt\wstat32.obj \
		iwm\crt\wstat32i64.obj \
		iwm\crt\wstat64i32.obj \
		iwm\crt\wwinmaincrtstartup.obj

iwmcrt_asm_OBJECTS= \
		iwm\crt\alldiv.obj \
		iwm\crt\alldvrm.obj \
		iwm\crt\allmul.obj \
		iwm\crt\alloca.obj \
		iwm\crt\alloca8.obj \
		iwm\crt\alloca16.obj \
		iwm\crt\allrem.obj \
		iwm\crt\allshl.obj \
		iwm\crt\allshr.obj \
		iwm\crt\aulldiv.obj \
		iwm\crt\aulldvrm.obj \
		iwm\crt\aullrem.obj \
		iwm\crt\aullshr.obj \
		iwm\crt\chkstk.obj

iwm\crt\iwmcrt.lib: $*.def $(iwmcrt_OBJECTS) $(iwmcrt_asm_OBJECTS) iwm\crt\tlsarray.obj
	lib $(LBFLAGS) /DEF:$*.def
	lib $(LBFLAGS) $@ $(iwmcrt_OBJECTS) $(iwmcrt_asm_OBJECTS) iwm\crt\tlsarray.obj

iwm\crt\iwmcrt.def: iwm\crt\iwmcrt-makedef.exe
	iwm\crt\iwmcrt-makedef.exe > $@

$(iwmcrt_OBJECTS): iwm\crt\iwmcrt.h iwm\crt\main.c
	$(CC) $(CLFLAGS) $*.c

$(iwmcrt_asm_OBJECTS):
	$(AS) $(ASFLAGS) $*.asm

iwm\crt\tlsarray.obj: iwm\crt\iwmcrt-tlsarray.exe
	iwm\crt\iwmcrt-tlsarray.exe > $@

# iwmcrt-makedef
iwm\crt\iwmcrt-makedef.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\crt\iwmcrt-makedef.res: $*.rc iwm\crt\iwmcrt.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=1 /DVERSION=\"0.0.1\" $*.rc

iwm\crt\iwmcrt-makedef.obj: $*.c
	$(CC) $(CLFLAGS) $**

# iwmcrt-tlsarray
iwm\crt\iwmcrt-tlsarray.exe: $*.res $*.obj
	$(LINK) $(LNFLAGS) /SUBSYSTEM:CONSOLE,5.01 $**
	if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@;#1

iwm\crt\iwmcrt-tlsarray.res: $*.rc iwm\crt\iwmcrt.ico
	$(RC) $(RCFLAGS) /DMAJOR=0 /DMINOR=0 /DMICRO=0 /DVERSION=\"0.0.0\" $*.rc

iwm\crt\iwmcrt-tlsarray.obj: $*.c
	$(CC) $(CLFLAGS) $**


###############################################################################
#                                                                             #
# Clean                                                                       #
#                                                                             #
###############################################################################
clean: atk_clean cairo_clean expat_clean fontconfig_clean freetype_clean gdk_pixbuf_clean glib_clean gtk_clean harfbuzz_clean iconvmlang_clean jpeg_clean libffi_clean libpng_clean pango_clean tiff_clean zlib_clean iwm_clean

!ifdef GIT
git_clean: atk_clean gdk_pixbuf_clean glib_clean gtk_clean pango_clean
!endif

# ATK
atk_CLEANS= \
		$(ATK)\atk\libatk-1.0-0.dll \
		$(ATK)\atk\libatk-1.0-0.dll.manifest \
		$(ATK)\atk\atk-1.0.exp \
		$(ATK)\atk\atk-1.0.lib \
		$(ATK)\atk\atk.def \
		$(ATK)\atk\atk.res \
!ifdef GIT
		$(ATK)\atk\atk.rc \
!endif
		$(ATK)\atk\*.obj \
		$(ATK)\config.h \
!ifdef GIT
		$(ATK)\atk\atk-enum-types.c \
		$(ATK)\atk\atk-enum-types.h \
!endif
		$(ATK)\atk\atkmarshal.c \
		$(ATK)\atk\atkmarshal.h

atk_clean:
	for %f in ($(atk_CLEANS)) do if exist %f del /q %f

# cairo
cairo_CLEANS= \
		$(CAIRO)\src\libcairo-2.dll \
		$(CAIRO)\src\libcairo-2.dll.manifest \
		$(CAIRO)\src\cairo.exp \
		$(CAIRO)\src\cairo.lib \
		$(CAIRO)\src\cairo.def \
		$(CAIRO)\src\*.obj \
		$(CAIRO)\src\cairo-features.h \
		$(CAIRO)\util\cairo-gobject\libcairo-gobject-2.dll \
		$(CAIRO)\util\cairo-gobject\libcairo-gobject-2.dll.manifest \
		$(CAIRO)\util\cairo-gobject\cairo-gobject.exp \
		$(CAIRO)\util\cairo-gobject\cairo-gobject.lib \
		$(CAIRO)\util\cairo-gobject\cairo-gobject.def \
		$(CAIRO)\util\cairo-gobject\*.obj \
		$(PIXMAN)\pixman\*.obj

cairo_clean:
	for %f in ($(cairo_CLEANS)) do if exist %f del /q %f

# Expat
expat_CLEANS= \
		$(EXPAT)\lib\libexpat.dll \
		$(EXPAT)\lib\libexpat.dll.manifest \
		$(EXPAT)\lib\libexpat.exp \
		$(EXPAT)\lib\libexpat.lib \
		$(EXPAT)\lib\*.obj

expat_clean:
	for %f in ($(expat_CLEANS)) do if exist %f del /q %f

# fontconfig
fontconfig_CLEANS= \
		$(FONTCONFIG)\src\libfontconfig-1.dll \
		$(FONTCONFIG)\src\libfontconfig-1.dll.manifest \
		$(FONTCONFIG)\src\fontconfig.exp \
		$(FONTCONFIG)\src\fontconfig.lib \
		$(FONTCONFIG)\src\fontconfig.def \
		$(FONTCONFIG)\src\*.obj \
		$(FONTCONFIG)\src\fcaliastail.h \
		$(FONTCONFIG)\src\fcftaliastail.h \
		$(FONTCONFIG)\fc-arch\fcarch.h \
		$(FONTCONFIG)\fc-arch\fc-arch.exe \
		$(FONTCONFIG)\fc-arch\fc-arch.obj \
		$(FONTCONFIG)\fc-case\fccase.h \
		$(FONTCONFIG)\fc-case\fc-case.exe \
		$(FONTCONFIG)\fc-case\fc-case.obj \
		$(FONTCONFIG)\fc-glyphname\fcglyphname.h \
		$(FONTCONFIG)\fc-glyphname\fc-glyphname.exe \
		$(FONTCONFIG)\fc-glyphname\fc-glyphname.obj \
		$(FONTCONFIG)\fc-lang\fclang.h \
		$(FONTCONFIG)\fc-lang\fc-lang.exe \
		$(FONTCONFIG)\fc-lang\fc-lang.obj

fontconfig_clean:
	for %f in ($(fontconfig_CLEANS)) do if exist %f del /q %f

# FreeType
freetype_CLEANS= \
		$(FREETYPE)\src\freetype6.dll \
		$(FREETYPE)\src\freetype6.dll.manifest \
		$(FREETYPE)\src\freetype.exp \
		$(FREETYPE)\src\freetype.lib \
		$(FREETYPE)\src\freetype.def \
		$(FREETYPE)\src\autofit\*.obj \
		$(FREETYPE)\src\base\*.obj \
		$(FREETYPE)\src\bdf\*.obj \
		$(FREETYPE)\src\bzip2\*.obj \
		$(FREETYPE)\src\cache\*.obj \
		$(FREETYPE)\src\cff\*.obj \
		$(FREETYPE)\src\cid\*.obj \
		$(FREETYPE)\src\gxvalid\*.obj \
		$(FREETYPE)\src\gzip\*.obj \
		$(FREETYPE)\src\lzw\*.obj \
		$(FREETYPE)\src\otvalid\*.obj \
		$(FREETYPE)\src\pcf\*.obj \
		$(FREETYPE)\src\pfr\*.obj \
		$(FREETYPE)\src\psaux\*.obj \
		$(FREETYPE)\src\pshinter\*.obj \
		$(FREETYPE)\src\psnames\*.obj \
		$(FREETYPE)\src\raster\*.obj \
		$(FREETYPE)\src\sfnt\*.obj \
		$(FREETYPE)\src\smooth\*.obj \
		$(FREETYPE)\src\truetype\*.obj \
		$(FREETYPE)\src\type1\*.obj \
		$(FREETYPE)\src\type42\*.obj \
		$(FREETYPE)\src\winfonts\*.obj

freetype_clean:
	for %f in ($(freetype_CLEANS)) do if exist %f del /q %f

# GDK-Pixbuf
gdk_pixbuf_CLEANS= \
		$(GDK_PIXBUF)\gdk-pixbuf\libgdk_pixbuf-2.0-0.dll \
		$(GDK_PIXBUF)\gdk-pixbuf\libgdk_pixbuf-2.0-0.dll.manifest \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.exp \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib \
!ifdef GIT
		$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.def \
!endif
		$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.res \
!ifdef GIT
		$(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf.rc \
!endif
		$(GDK_PIXBUF)\config.h \
!ifdef GIT
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-enum-types.c \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-enum-types.h \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-features.h \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-marshal.c \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-marshal.h \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-csource.exe \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-csource.exe.manifest \
!endif
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-query-loaders.exe \
		$(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-query-loaders.exe.manifest \
		$(GDK_PIXBUF)\gdk-pixbuf\*.obj \
		$(GDK_PIXBUF)\gdk-pixbuf\pixops\*.obj

gdk_pixbuf_clean:
	for %f in ($(gdk_pixbuf_CLEANS)) do if exist %f del /q %f
	for %f in ($(gdk_pixbuf_LOADERS)) do for %e in (dll dll.manifest exp lib) do if exist $(GDK_PIXBUF)\gdk-pixbuf\%f.%e del /q $(GDK_PIXBUF)\gdk-pixbuf\%f.%e

# GLib
glib_CLEANS= \
		$(GLIB)\config.h \
		$(GLIB)\glib\glibconfig.h \
		$(GLIB)\glib\libglib-2.0-0.dll \
		$(GLIB)\glib\libglib-2.0-0.dll.manifest \
		$(GLIB)\glib\glib-2.0.exp \
		$(GLIB)\glib\glib-2.0.lib \
!ifndef GIT
		$(GLIB)\glib\glib.def \
!endif
		$(GLIB)\glib\glib.res \
!ifdef GIT
		$(GLIB)\glib\glib.rc \
!endif
		$(GLIB)\glib\gspawn-win32-helper.exe \
		$(GLIB)\glib\gspawn-win32-helper.exe.manifest \
		$(GLIB)\glib\gspawn-win32-helper-console.exe \
		$(GLIB)\glib\gspawn-win32-helper-console.exe.manifest \
!ifdef GIT
		$(GLIB)\glib\gspawn-win32-helper-console.c \
!endif
		$(GLIB)\glib\*.obj \
		$(GLIB)\glib\deprecated\*.obj \
		$(GLIB)\glib\gnulib\*.obj \
		$(GLIB)\glib\libcharset\localcharset.obj \
		$(GLIB)\glib\pcre\*.obj \
		$(GLIB)\gmodule\libgmodule-2.0-0.dll \
		$(GLIB)\gmodule\libgmodule-2.0-0.dll.manifest \
		$(GLIB)\gmodule\gmodule-2.0.exp \
		$(GLIB)\gmodule\gmodule-2.0.lib \
		$(GLIB)\gmodule\gmodule.def \
		$(GLIB)\gmodule\gmodule.res \
!ifdef GIT
		$(GLIB)\gmodule\gmodule.rc \
!endif
		$(GLIB)\gmodule\gmodule.obj \
		$(GLIB)\gmodule\gmoduleconf.h \
		$(GLIB)\gthread\libgthread-2.0-0.dll \
		$(GLIB)\gthread\libgthread-2.0-0.dll.manifest \
		$(GLIB)\gthread\gthread-2.0.exp \
		$(GLIB)\gthread\gthread-2.0.lib \
		$(GLIB)\gthread\gthread.res \
!ifdef GIT
		$(GLIB)\gthread\gthread.rc \
!endif
		$(GLIB)\gthread\gthread-impl.obj \
		$(GLIB)\gobject\libgobject-2.0-0.dll \
		$(GLIB)\gobject\libgobject-2.0-0.dll.manifest \
		$(GLIB)\gobject\gobject-2.0.exp \
		$(GLIB)\gobject\gobject-2.0.lib \
		$(GLIB)\gobject\gobject.def \
		$(GLIB)\gobject\gobject.res \
!ifdef GIT
		$(GLIB)\gobject\gobject.rc \
!endif
		$(GLIB)\gobject\gobject-query.exe \
		$(GLIB)\gobject\gobject-query.exe.manifest \
		$(GLIB)\gobject\glib-genmarshal.exe \
		$(GLIB)\gobject\glib-genmarshal.exe.manifest \
		$(GLIB)\gobject\*.obj \
!ifdef GIT
		$(GLIB)\gobject\gmarshal.strings \
		$(GLIB)\gobject\glib-mkenums \
!endif
		$(GLIB)\gio\libgio-2.0-0.dll \
		$(GLIB)\gio\libgio-2.0-0.dll.manifest \
		$(GLIB)\gio\gio-2.0-0.exp \
		$(GLIB)\gio\gio-2.0-0.lib \
		$(GLIB)\gio\gio.def \
		$(GLIB)\gio\gio.res \
!ifdef GIT
		$(GLIB)\gio\gio.rc \
		$(GLIB)\gio\gioenumtypes.c \
		$(GLIB)\gio\gioenumtypes.h \
		$(GLIB)\gio\gdbus-daemon-generated.c \
		$(GLIB)\gio\gdbus-daemon-generated.h \
		$(GLIB)\gio\gdbus-2.0\codegen\config.py \
		$(GLIB)\gio\gdbus-2.0\codegen\gdbus-codegen \
		$(GLIB)\gio\gnetworking.h \
!endif
		$(GLIB)\gio\glib-compile-schemas.exe \
		$(GLIB)\gio\glib-compile-schemas.exe.manifest \
		$(GLIB)\gio\glib-compile-resources.exe \
		$(GLIB)\gio\glib-compile-resources.exe.manifest \
		$(GLIB)\gio\*.obj \
		$(GLIB)\gio\win32\*.obj \
		$(GLIB)\gio\gvdb\gvdb-reader.obj

glib_clean:
	for %f in ($(glib_CLEANS)) do if exist %f del /q %f

# GTK+
gdk_CLEANS= \
		$(GTK)\config.h \
		$(GTK)\gdk\libgdk-win32-3.0-0.dll \
		$(GTK)\gdk\libgdk-win32-3.0-0.dll.manifest \
		$(GTK)\gdk\gdk-win32-3.0.exp \
		$(GTK)\gdk\gdk-win32-3.0.lib \
!ifdef GIT
		$(GTK)\gdk\gdk.def \
!endif
		$(GTK)\gdk\win32\rc\gdk.res \
!ifdef GIT
		$(GTK)\gdk\win32\rc\gdk.rc \
!endif
		$(GTK)\gdk\gdkconfig.h \
!ifdef GIT
		$(GTK)\gdk\gdkenumtypes.c \
		$(GTK)\gdk\gdkenumtypes.h \
		$(GTK)\gdk\gdkmarshalers.c \
		$(GTK)\gdk\gdkmarshalers.h \
		$(GTK)\gdk\gdkversionmacros.h \
!endif
		$(GTK)\gdk\*.obj \
		$(GTK)\gdk\win32\*.obj
gtk_CLEANS= \
		$(GTK)\gtk\libgtk-win32-3.0-0.dll \
		$(GTK)\gtk\libgtk-win32-3.0-0.dll.manifest \
		$(GTK)\gtk\gtk-win32-3.0.exp \
		$(GTK)\gtk\gtk-win32-3.0.lib \
!ifdef GIT
		$(GTK)\gtk\gtk.def \
!endif
		$(GTK)\gtk\gtk-win32.res \
!ifdef GIT
		$(GTK)\gtk\gtk-win32.rc \
		$(GTK)\gtk\gtkmarshalers.c \
		$(GTK)\gtk\gtkmarshalers.h \
		$(GTK)\gtk\gtktypebuiltins.c \
		$(GTK)\gtk\gtktypebuiltins.h \
		$(GTK)\gtk\gtkprivatetypebuiltins.c \
		$(GTK)\gtk\gtkprivatetypebuiltins.h \
		$(GTK)\gtk\gtkversion.h \
		$(GTK)\gtk\gtkbuiltincache.h \
		$(GTK)\gtk\gtk-renewal-icon-cache.exe \
		$(GTK)\gtk\gtk-renewal-icon-cache.exe.manifest \
		$(GTK)\gtk\stamp-icons \
		$(GTK)\gtk\gtktypefuncs.c \
		$(GTK)\gtk\gtkappchooserwidget.c.stamp \
		$(GTK)\gtk\gtkappchooserdialog.c.stamp \
		$(GTK)\gtk\gtkplacessidebar.c.stamp \
		iwm\iwm-maketypefuncs-win32.exe \
		iwm\iwm-maketypefuncs-win32.exe.manifest \
		iwm\iwm-maketypefuncs-win32.res \
		iwm\iwm-maketypefuncs-win32.obj \
		$(GTK)\gtk\gtkwin32css.h \
		iwm\iwm-makegtkwin32css-win32.exe \
		iwm\iwm-makegtkwin32css-win32.exe.manifest \
		iwm\iwm-makegtkwin32css-win32.res \
		iwm\iwm-makegtkwin32css-win32.obj \
!endif
		$(GTK)\gtk\*.obj \
		$(GTK)\gtk\deprecated\*.obj \
		$(GTK)\gtk\a11y\*.obj \
		$(GTK)\gtk\gtk-query-immodules-3.0.exe \
		$(GTK)\gtk\gtk-query-immodules-3.0.exe.manifest
!ifdef GIT
gtk_stock_icons_CLEANS= \
		go-previous-rtl.png \
		go-next-rtl.png \
		go-first-rtl.png \
		go-last-rtl.png \
		media-seek-forward-rtl.png \
		media-skip-forward-rtl.png \
		media-skip-backward-rtl.png \
		media-seek-backward-rtl.png \
		document-save.png \
		folder-remote.png \
		user-home.png \
		user-desktop.png
!endif
gtk_modules_0_CLEANS= \
		$(GTK)\modules\input\inputim-am-et.dll \
		$(GTK)\modules\input\inputim-am-et.dll.manifest \
		$(GTK)\modules\input\inputim-am-et.exp \
		$(GTK)\modules\input\inputim-am-et.lib \
		$(GTK)\modules\input\inputim-cedilla.dll \
		$(GTK)\modules\input\inputim-cedilla.dll.manifest \
		$(GTK)\modules\input\inputim-cedilla.exp \
		$(GTK)\modules\input\inputim-cedilla.lib \
		$(GTK)\modules\input\inputim-cyrillic-translit.dll \
		$(GTK)\modules\input\inputim-cyrillic-translit.dll.manifest \
		$(GTK)\modules\input\inputim-cyrillic-translit.exp \
		$(GTK)\modules\input\inputim-cyrillic-translit.lib \
		$(GTK)\modules\input\inputim-ime.dll \
		$(GTK)\modules\input\inputim-ime.dll.manifest \
		$(GTK)\modules\input\inputim-ime.exp \
		$(GTK)\modules\input\inputim-ime.lib \
		$(GTK)\modules\input\inputim-inuktitut.dll \
		$(GTK)\modules\input\inputim-inuktitut.dll.manifest \
		$(GTK)\modules\input\inputim-inuktitut.exp \
		$(GTK)\modules\input\inputim-inuktitut.lib
gtk_modules_1_CLEANS= \
		$(GTK)\modules\input\inputim-ipa.dll \
		$(GTK)\modules\input\inputim-ipa.dll.manifest \
		$(GTK)\modules\input\inputim-ipa.exp \
		$(GTK)\modules\input\inputim-ipa.lib \
		$(GTK)\modules\input\inputim-multipress.dll \
		$(GTK)\modules\input\inputim-multipress.dll.manifest \
		$(GTK)\modules\input\inputim-multipress.exp \
		$(GTK)\modules\input\inputim-multipress.lib \
		$(GTK)\modules\input\inputim-thai.dll \
		$(GTK)\modules\input\inputim-thai.dll.manifest \
		$(GTK)\modules\input\inputim-thai.exp \
		$(GTK)\modules\input\inputim-thai.lib \
		$(GTK)\modules\input\inputim-ti-er.dll \
		$(GTK)\modules\input\inputim-ti-er.dll.manifest \
		$(GTK)\modules\input\inputim-ti-er.exp \
		$(GTK)\modules\input\inputim-ti-er.lib \
		$(GTK)\modules\input\inputim-ti-et.dll \
		$(GTK)\modules\input\inputim-ti-et.dll.manifest \
		$(GTK)\modules\input\inputim-ti-et.exp \
		$(GTK)\modules\input\inputim-ti-et.lib \
		$(GTK)\modules\input\inputim-viqr.dll \
		$(GTK)\modules\input\inputim-viqr.dll.manifest \
		$(GTK)\modules\input\inputim-viqr.exp \
		$(GTK)\modules\input\inputim-viqr.lib \
		$(GTK)\modules\input\*.obj

gtk_clean:
	for %f in ($(gdk_CLEANS)) do if exist %f del /q %f
	for %f in ($(gtk_CLEANS)) do if exist %f del /q %f
	for %f in ($(gtk_modules_0_CLEANS)) do if exist %f del /q %f
	for %f in ($(gtk_modules_1_CLEANS)) do if exist %f del /q %f
!ifdef GIT
	for %d in (16 24) do for %f in ($(gtk_stock_icons_CLEANS)) do if exist $(GTK)\gtk\stock-icons\%d\%f del /q $(GTK)\gtk\stock-icons\%d\%f
	if exist $(GTK)\gtk\gtkappchooserwidget.c.orig move /y $(GTK)\gtk\gtkappchooserwidget.c.orig $(GTK)\gtk\gtkappchooserwidget.c
	if exist $(GTK)\gtk\gtkappchooserdialog.c.orig move /y $(GTK)\gtk\gtkappchooserdialog.c.orig $(GTK)\gtk\gtkappchooserdialog.c
	if exist $(GTK)\gtk\gtkplacessidebar.c.orig move /y $(GTK)\gtk\gtkplacessidebar.c.orig $(GTK)\gtk\gtkplacessidebar.c
!endif

# harfbuzz_clean
harfbuzz_CLEANS= \
		$(HARFBUZZ)\src\libharfbuzz-$(HARFBUZZ_MAJOR_VERSION).dll \
		$(HARFBUZZ)\src\libharfbuzz-$(HARFBUZZ_MAJOR_VERSION).dll.manifest \
		$(HARFBUZZ)\src\harfbuzz.exp \
		$(HARFBUZZ)\src\harfbuzz.lib \
		$(HARFBUZZ)\src\harfbuzz.def \
		$(HARFBUZZ)\src\hb-gobject-enums.cc \
		$(HARFBUZZ)\src\*.obj

harfbuzz_clean:
	for %f in ($(harfbuzz_CLEANS)) do if exist %f del /q %f

# iconvmlang
iconvmlang_CLEANS= \
		$(ICONVMLANG)\libiconv2.dll \
		$(ICONVMLANG)\iconv.dll \
		$(ICONVMLANG)\iconv.dll.manifest \
		$(ICONVMLANG)\iconv.exp \
		$(ICONVMLANG)\iconv.lib \
		$(ICONVMLANG)\iconv.res \
		$(ICONVMLANG)\iconv.obj \
		$(ICONVMLANG)\libintl3.dll \
		$(ICONVMLANG)\intl.dll \
		$(ICONVMLANG)\intl.dll.manifest \
		$(ICONVMLANG)\intl.exp \
		$(ICONVMLANG)\intl.lib \
		$(ICONVMLANG)\intl.res \
		$(ICONVMLANG)\intl.obj \
		$(ICONVMLANG)\msgfmt.exe \
		$(ICONVMLANG)\msgfmt.exe.manifest \
		$(ICONVMLANG)\msgfmt.res \
		$(ICONVMLANG)\msgfmt.obj

iconvmlang_clean:
	for %f in ($(iconvmlang_CLEANS)) do if exist %f del /q %f

# JPEG
jpeg_CLEANS= \
		$(JPEG)\jpeg62.dll \
		$(JPEG)\libjpeg-8.dll \
		$(JPEG)\libjpeg-9.dll \
		$(JPEG)\libjpeg-9.dll.manifest \
		$(JPEG)\libjpeg.exp \
		$(JPEG)\libjpeg.lib \
		$(JPEG)\jpeg.def \
		$(JPEG)\jconfig.h \
		$(JPEG)\*.obj

jpeg_clean:
	for %f in ($(jpeg_CLEANS)) do if exist %f del /q %f

# libffi
libffi_CLEANS= \
		$(LIBFFI)\src\libffi-5.dll \
		$(LIBFFI)\src\ffi.exp \
		$(LIBFFI)\src\ffi.lib \
		$(LIBFFI)\src\ffi.def \
		$(LIBFFI)\include\ffi.h \
		$(LIBFFI)\include\fficonfig.h \
		$(LIBFFI)\src\x86\win32.asm \
		$(LIBFFI)\src\x86\*.obj \
		$(LIBFFI)\src\*.obj

libffi_clean:
	for %f in ($(libffi_CLEANS)) do if exist %f del /q %f

# libpng
libpng_CLEANS= \
		$(LIBPNG)\libpng13.dll \
		$(LIBPNG)\libpng14.dll \
		$(LIBPNG)\libpng15.dll \
		$(LIBPNG)\libpng15.dll.manifest \
		$(LIBPNG)\libpng15.exp \
		$(LIBPNG)\libpng15.lib \
		$(LIBPNG)\pnglibconf.h \
		$(LIBPNG)\scripts\pngwin.res \
		$(LIBPNG)\*.obj \
		$(LIBPNG)\scripts\symbols.def.stamp

libpng_clean:
	for %f in ($(libpng_CLEANS)) do if exist %f del /q %f
	if exist $(LIBPNG)\scripts\symbols.def.orig move /y $(LIBPNG)\scripts\symbols.def.orig $(LIBPNG)\scripts\symbols.def

# Pango
pango_CLEANS= \
		$(PANGO)\config.h \
		$(PANGO)\pango\libpango-1.0-0.dll \
		$(PANGO)\pango\libpango-1.0-0.dll.manifest \
		$(PANGO)\pango\pango-1.0.exp \
		$(PANGO)\pango\pango-1.0.lib \
		$(PANGO)\pango\pango.res \
!ifdef GIT
		$(PANGO)\pango\pango.rc \
		$(PANGO)\pango\pango-enum-types.c \
		$(PANGO)\pango\pango-enum-types.h \
		$(PANGO)\pango\pango-features.h \
		$(PANGO)\pango\module-defs-lang.c \
		$(PANGO)\pango\module-defs.h \
!endif
		$(PANGO)\pango\libpangoft2-1.0-0.dll \
		$(PANGO)\pango\libpangoft2-1.0-0.dll.manifest \
		$(PANGO)\pango\pangoft2-1.0.exp \
		$(PANGO)\pango\pangoft2-1.0.lib \
		$(PANGO)\pango\pangoft2.res \
!ifdef GIT
		$(PANGO)\pango\pangofc2.rc \
		$(PANGO)\pango\module-defs-fc.c \
!endif
		$(PANGO)\pango\libpangowin32-1.0-0.dll \
		$(PANGO)\pango\libpangowin32-1.0-0.dll.manifest \
		$(PANGO)\pango\pangowin32-1.0.exp \
		$(PANGO)\pango\pangowin32-1.0.lib \
		$(PANGO)\pango\pangowin32.res \
!ifdef GIT
		$(PANGO)\pango\pangowin32.rc \
		$(PANGO)\pango\module-defs-win32.c \
!endif
		$(PANGO)\pango\libpangocairo-1.0-0.dll \
		$(PANGO)\pango\libpangocairo-1.0-0.dll.manifest \
		$(PANGO)\pango\pangocairo-1.0.exp \
		$(PANGO)\pango\pangocairo-1.0.lib \
		$(PANGO)\pango\pangocairo.res \
!ifdef GIT
		$(PANGO)\pango\pangocairo.rc \
!endif
		$(PANGO)\pango\pango-querymodules.exe \
		$(PANGO)\pango\pango-querymodules.exe.manifest \
		$(PANGO)\pango\mini-fribidi\*.obj \
		$(PANGO)\pango\opentype\*.obj \
		$(PANGO)\pango\*.obj \
		iwm\pango-makealiases-win32.exe \
		iwm\pango-makealiases-win32.exe.manifest \
		iwm\pango-makealiases-win32.obj \
		iwm\pango-makealiases-win32.res \
		$(PANGO)\pango\pango-language-sample-table.h.stamp
pango_modules_CLEANS= \
		$(PANGO)\modules\basic\pango-basic-fc.dll \
		$(PANGO)\modules\basic\pango-basic-fc.dll.manifest \
		$(PANGO)\modules\basic\pango-basic-fc.exp \
		$(PANGO)\modules\basic\pango-basic-fc.lib \
		$(PANGO)\modules\basic\basic-fc.obj \
		$(PANGO)\modules\basic\pango-basic-win32.dll \
		$(PANGO)\modules\basic\pango-basic-win32.dll.manifest \
		$(PANGO)\modules\basic\pango-basic-win32.exp \
		$(PANGO)\modules\basic\pango-basic-win32.lib \
		$(PANGO)\modules\basic\basic-win32.obj

pango_clean:
	for %f in ($(pango_CLEANS)) do if exist %f del /q %f
	for %f in ($(pango_modules_CLEANS)) do if exist %f del /q %f
	if exist $(PANGO)\pango\pango-language-sample-table.h.orig move /y $(PANGO)\pango\pango-language-sample-table.h.orig $(PANGO)\pango\pango-language-sample-table.h

# TIFF
tiff_CLEANS= \
		$(TIFF)\libtiff\libtiff3.dll \
		$(TIFF)\libtiff\libtiff.dll \
		$(TIFF)\libtiff\libtiff.dll.manifest \
		$(TIFF)\libtiff\libtiff.exp \
		$(TIFF)\libtiff\libtiff.lib \
		$(TIFF)\libtiff\tif_config.h \
		$(TIFF)\libtiff\tiffconf.h \
		$(TIFF)\libtiff\*.obj

tiff_clean:
	for %f in ($(tiff_CLEANS)) do if exist %f del /q %f

# zlib
zlib_CLEANS= \
		$(ZLIB)\zlib1.dll \
		$(ZLIB)\zlib1.dll.manifest \
		$(ZLIB)\zdll.exp \
		$(ZLIB)\zdll.lib \
		$(ZLIB)\zlib1.res \
		$(ZLIB)\*.obj

zlib_clean:
	for %f in ($(zlib_CLEANS)) do if exist %f del /q %f

# iwm
iwm_CLEANS= \
		iwm\iwm-escape-win32.exe \
		iwm\iwm-escape-win32.exe.manifest \
		iwm\iwm-escape-win32.res \
		iwm\iwm-escape-win32.obj \
		iwm\iwm-fixer-win32.exe \
		iwm\iwm-fixer-win32.exe.manifest \
		iwm\iwm-fixer-win32.obj \
		iwm\iwm-fixer-win32.res \
		iwm\iwm-forwarding-win32.exe \
		iwm\iwm-forwarding-win32.exe.manifest \
		iwm\iwm-forwarding-win32.obj \
		iwm\iwm-forwarding-win32.res \
		iwm\iwm-makedef-win32.exe \
		iwm\iwm-makedef-win32.exe.manifest \
		iwm\iwm-makedef-win32.obj \
		iwm\iwm-makedef-win32.res \
		iwm\iwm-replace-win32.exe \
		iwm\iwm-replace-win32.exe.manifest \
		iwm\iwm-replace-win32.obj \
		iwm\iwm-replace-win32.res \
		iwm\iwm-runcommand-win32.exe \
		iwm\iwm-runcommand-win32.exe.manifest \
		iwm\iwm-runcommand-win32.obj \
		iwm\iwm-runcommand-win32.res
iwmcrt_CLEANS= \
		iwm\crt\iwmcrt.def \
		iwm\crt\iwmcrt.exp \
		iwm\crt\iwmcrt.lib \
		iwm\crt\iwmcrt-makedef.exe \
		iwm\crt\iwmcrt-makedef.exe.manifest \
		iwm\crt\iwmcrt-makedef.res \
		iwm\crt\iwmcrt-tlsarray.exe \
		iwm\crt\iwmcrt-tlsarray.exe.manifest \
		iwm\crt\iwmcrt-tlsarray.res \
		iwm\crt\*.obj
iwmdirent_CLEANS= \
		iwm\dirent\dirent.obj \
		iwm\dirent\wdirent.obj

iwm_clean:
	for %f in ($(iwm_CLEANS)) do if exist %f del /q %f
	for %f in ($(iwmcrt_CLEANS)) do if exist %f del /q %f
	for %f in ($(iwmdirent_CLEANS)) do if exist %f del /q %f


###############################################################################
#                                                                             #
# Install & Uninstall                                                         #
#                                                                             #
###############################################################################
atk_HEADERS= \
		atk.h \
		atkaction.h \
		atkcomponent.h \
		atkdocument.h \
		atkeditabletext.h \
		atkgobjectaccessible.h \
		atkhyperlink.h \
		atkhyperlinkimpl.h \
		atkhypertext.h \
		atknoopobject.h \
		atknoopobjectfactory.h \
		atkobject.h \
		atkobjectfactory.h \
		atkplug.h \
		atkimage.h \
		atkregistry.h \
		atkrelation.h \
		atkrelationtype.h \
		atkrelationset.h \
		atkselection.h \
		atksocket.h \
		atkstate.h \
		atkstateset.h \
		atkstreamablecontent.h \
		atktable.h \
		atktext.h \
		atkutil.h \
		atkmisc.h \
		atkvalue.h \
		atkversion.h \
		atkwindow.h \
		\
		atk-enum-types.h
cairo_HEADERS= \
		cairo.h \
		cairo-deprecated.h \
		cairo-features.h \
		cairo-ps.h \
		cairo-pdf.h \
		cairo-svg.h \
		cairo-ft.h \
		cairo-win32.h
freetype_HEADERS= \
		freetype.h \
		ftadvanc.h \
		ftbbox.h \
		ftbdf.h \
		ftbitmap.h \
		ftbzip2.h \
		ftcache.h \
		ftchapters.h \
		ftcid.h \
		fterrdef.h \
		fterrors.h \
		ftgasp.h \
		ftglyph.h \
		ftgxval.h \
		ftgzip.h \
		ftimage.h \
		ftincrem.h \
		ftlcdfil.h \
		ftlist.h \
		ftlzw.h \
		ftmac.h \
		ftmm.h \
		ftmodapi.h \
		ftmoderr.h \
		ftotval.h \
		ftoutln.h \
		ftpfr.h \
		ftrender.h \
		ftsizes.h \
		ftsnames.h \
		ftstroke.h \
		ftsynth.h \
		ftsystem.h \
		fttrigon.h \
		fttypes.h \
		ftwinfnt.h \
		ftxf86.h \
		t1tables.h \
		ttnameid.h \
		tttables.h \
		tttags.h \
		ttunpat.h
freetype_config_HEADERS= \
		ftconfig.h \
		ftheader.h \
		ftmodule.h \
		ftoption.h \
		ftstdlib.h
freetype_internal_HEADERS= \
		autohint.h \
		ftcalc.h \
		ftdebug.h \
		ftdriver.h \
		ftgloadr.h \
		ftmemory.h \
		ftobjs.h \
		ftpic.h \
		ftrfork.h \
		ftserv.h \
		ftstream.h \
		fttrace.h \
		ftvalid.h \
		internal.h \
		psaux.h \
		pshints.h \
		sfnt.h \
		t1types.h \
		tttypes.h
gdk_pixbuf_HEADERS= \
		gdk-pixbuf.h \
		gdk-pixbuf-core.h \
		gdk-pixbuf-transform.h \
		gdk-pixbuf-io.h \
		gdk-pixbuf-animation.h \
		gdk-pixbuf-simple-anim.h \
		gdk-pixbuf-loader.h \
		\
		gdk-pixbuf-enum-types.h \
		gdk-pixbuf-marshal.h \
		gdk-pixbuf-features.h \
		gdk-pixdata.h
glib_HEADERS= \
		galloca.h \
		garray.h \
		gasyncqueue.h \
		gatomic.h \
		gbacktrace.h \
		gbase64.h \
		gbitlock.h \
		gbookmarkfile.h \
		gbytes.h \
		gcharset.h \
		gchecksum.h \
		gconvert.h \
		gdataset.h \
		gdate.h \
		gdatetime.h \
		gdir.h \
		genviron.h \
		gerror.h \
		gfileutils.h \
		ggettext.h \
		ghash.h \
		ghmac.h \
		ghook.h \
		ghostutils.h \
		gi18n.h \
		gi18n-lib.h \
		giochannel.h \
		gkeyfile.h \
		glist.h \
		gmacros.h \
		gmain.h \
		gmappedfile.h \
		gmarkup.h \
		gmem.h \
		gmessages.h \
		gnode.h \
		goption.h \
		gpattern.h \
		gpoll.h \
		gprimes.h \
		gqsort.h \
		gquark.h \
		gqueue.h \
		grand.h \
		gregex.h \
		gscanner.h \
		gsequence.h \
		gshell.h \
		gslice.h \
		gslist.h \
		gspawn.h \
		gstdio.h \
		gstrfuncs.h \
		gtestutils.h \
		gstring.h \
		gstringchunk.h \
		gthread.h \
		gthreadpool.h \
		gtimer.h \
		gtimezone.h \
		gtrashstack.h \
		gtree.h \
		gtypes.h \
		gunicode.h \
		gurifuncs.h \
		gutils.h \
		gvarianttype.h \
		gvariant.h \
		gversion.h \
		gversionmacros.h \
		gwin32.h \
		gprintf.h
glib_deprecated_HEADERS= \
		gallocator.h \
		gcache.h \
		gcompletion.h \
		gmain.h \
		grel.h \
		gthread.h
gio_HEADERS= \
		gappinfo.h \
		gasyncinitable.h \
		gasyncresult.h \
		gbufferedinputstream.h \
		gbufferedoutputstream.h \
!ifdef GIT
		gbytesicon.h \
!endif
		gcancellable.h \
		gcontenttype.h \
		gcharsetconverter.h \
		gconverter.h \
		gconverterinputstream.h \
		gconverteroutputstream.h \
		gdatainputstream.h \
		gdataoutputstream.h \
		gdrive.h \
		gemblem.h \
		gemblemedicon.h \
		gfile.h \
		gfileattribute.h \
		gfileenumerator.h \
		gfileicon.h \
		gfileinfo.h \
		gfileinputstream.h \
		gfilemonitor.h \
		gfilenamecompleter.h \
		gfileoutputstream.h \
		gfileiostream.h \
		gfilterinputstream.h \
		gfilteroutputstream.h \
		gicon.h \
		ginetaddress.h \
		ginetaddressmask.h \
		ginetsocketaddress.h \
		ginputstream.h \
		ginitable.h \
		gio.h \
		giotypes.h \
		gioenums.h \
		gioerror.h \
		giomodule.h \
		gioscheduler.h \
		giostream.h \
		gloadableicon.h \
		gmount.h \
		gmemoryinputstream.h \
		gmemoryoutputstream.h \
		gmountoperation.h \
		gnativevolumemonitor.h \
		gnetworkaddress.h \
		gnetworking.h \
		gnetworkmonitor.h \
		gnetworkservice.h \
		goutputstream.h \
		gpermission.h \
		gpollableinputstream.h \
		gpollableoutputstream.h \
		gpollableutils.h \
		gproxyaddress.h \
		gproxy.h \
		gproxyaddressenumerator.h \
		gproxyresolver.h \
		gresolver.h \
		gresource.h \
		gseekable.h \
		gsimpleasyncresult.h \
		gsimplepermission.h \
		gsocket.h \
		gsocketaddress.h \
		gsocketaddressenumerator.h \
		gsocketclient.h \
		gsocketconnectable.h \
		gsocketconnection.h \
		gsocketcontrolmessage.h \
		gsocketlistener.h \
		gsocketservice.h \
		gsrvtarget.h \
		gsimpleproxyresolver.h \
		gtask.h \
		gtcpconnection.h \
		gtcpwrapperconnection.h \
		gthreadedsocketservice.h \
		gthemedicon.h \
		gtlsbackend.h \
		gtlscertificate.h \
		gtlsclientconnection.h \
		gtlsconnection.h \
		gtlsdatabase.h \
		gtlsfiledatabase.h \
		gtlsinteraction.h \
		gtlspassword.h \
		gtlsserverconnection.h \
		gvfs.h \
		gvolume.h \
		gvolumemonitor.h \
		gzlibcompressor.h \
		gzlibdecompressor.h \
		\
		gapplication.h \
		gapplicationcommandline.h \
		\
		gactiongroup.h \
		gactionmap.h \
		gsimpleactiongroup.h \
		gremoteactiongroup.h \
		gactiongroupexporter.h \
		gdbusactiongroup.h \
		gaction.h \
		gsimpleaction.h \
		\
		gmenumodel.h \
		gmenu.h \
		gmenuexporter.h \
		gdbusmenumodel.h \
		\
		gsettingsbackend.h \
		gsettingsschema.h \
		gsettings.h \
		\
		gdbusauthobserver.h \
		gcredentials.h \
		gdbusutils.h \
		gdbuserror.h \
		gdbusaddress.h \
		gdbusconnection.h \
		gdbusmessage.h \
		gdbusnameowning.h \
		gdbusnamewatching.h \
		gdbusproxy.h \
		gdbusintrospection.h \
		gdbusmethodinvocation.h \
		gdbusserver.h \
		gdbusinterface.h \
		gdbusinterfaceskeleton.h \
		gdbusobject.h \
		gdbusobjectskeleton.h \
		gdbusobjectproxy.h \
		gdbusobjectmanager.h \
		gdbusobjectmanagerclient.h \
		gdbusobjectmanagerserver.h \
		gtestdbus.h \
		\
		gioenumtypes.h
gobject_HEADERS= \
		glib-types.h \
		gbinding.h \
		gboxed.h \
		gclosure.h \
		genums.h \
		gmarshal.h \
		gobject.h \
		gparam.h \
		gparamspecs.h \
		gsignal.h \
		gsourceclosure.h \
		gtype.h \
		gtypemodule.h \
		gtypeplugin.h \
		gvalue.h \
		gvaluearray.h \
		gvaluecollector.h \
		gvaluetypes.h
gdk_HEADERS= \
		gdk.h \
		gdkapplaunchcontext.h \
		gdkcairo.h \
		gdkcolor.h \
		gdkcursor.h \
		gdkdevice.h \
		gdkdevicemanager.h \
		gdkdisplay.h \
		gdkdisplaymanager.h \
		gdkdnd.h \
		gdkevents.h \
		gdkframetimings.h \
		gdkkeys.h \
		gdkkeysyms.h \
		gdkkeysyms-compat.h \
		gdkmain.h \
		gdkpango.h \
		gdkframeclock.h \
		gdkpixbuf.h \
		gdkprivate.h \
		gdkproperty.h \
		gdkrectangle.h \
		gdkrgba.h \
		gdkscreen.h \
		gdkselection.h \
		gdktestutils.h \
		gdkthreads.h \
		gdktypes.h \
		gdkvisual.h \
		gdkwindow.h \
		\
		gdkenumtypes.h \
		gdkversionmacros.h \
		\
		gdkconfig.h
gdkwin32_HEADERS= \
		gdkwin32cursor.h \
		gdkwin32display.h \
		gdkwin32displaymanager.h \
		gdkwin32dnd.h \
		gdkwin32keys.h \
		gdkwin32screen.h \
		gdkwin32window.h
gtk_0_HEADERS= \
		gtk.h \
		gtkx.h \
		gtkaboutdialog.h \
		gtkaccelgroup.h \
		gtkaccellabel.h \
		gtkaccelmap.h \
		gtkaccessible.h \
		gtkactionable.h \
!ifndef GIT
		gtkaction.h \
		gtkactiongroup.h \
		gtkactivatable.h \
!endif
		gtkadjustment.h \
		gtkalignment.h \
		gtkappchooser.h \
		gtkappchooserbutton.h \
		gtkappchooserdialog.h \
		gtkappchooserwidget.h \
		gtkapplication.h \
		gtkapplicationwindow.h \
		gtkarrow.h \
		gtkaspectframe.h \
		gtkassistant.h \
		gtkbbox.h \
		gtkbin.h \
		gtkbindings.h \
		gtkborder.h \
		gtkbox.h \
		gtkbuilder.h \
		gtkbuildable.h \
		gtkbutton.h \
		gtkcalendar.h \
		gtkcellarea.h \
		gtkcellareacontext.h \
		gtkcellareabox.h \
		gtkcelleditable.h \
		gtkcelllayout.h \
		gtkcellrenderer.h \
		gtkcellrendereraccel.h \
		gtkcellrenderercombo.h \
		gtkcellrendererpixbuf.h \
		gtkcellrendererprogress.h \
		gtkcellrendererspin.h \
		gtkcellrendererspinner.h \
		gtkcellrenderertext.h \
		gtkcellrenderertoggle.h \
		gtkcellview.h \
		gtkcheckbutton.h \
		gtkcheckmenuitem.h \
		gtkclipboard.h \
		gtkcolorbutton.h \
		gtkcolorchooser.h \
		gtkcolorchooserwidget.h \
		gtkcolorchooserdialog.h \
		gtkcolorutils.h \
		gtkcombobox.h \
		gtkcomboboxtext.h \
		gtkcontainer.h \
		gtkcssprovider.h \
		gtkcsssection.h \
		gtkdebug.h \
		gtkdialog.h \
		gtkdnd.h \
		gtkdrawingarea.h \
		gtkeditable.h \
		gtkentry.h \
		gtkentrybuffer.h \
		gtkentrycompletion.h \
		gtkenums.h \
		gtkeventbox.h \
		gtkexpander.h \
		gtkfilechooser.h \
		gtkfilechooserbutton.h \
		gtkfilechooserdialog.h \
		gtkfilechooserwidget.h \
		gtkfilefilter.h \
		gtkfixed.h \
		gtkfontbutton.h \
		gtkfontchooser.h \
		gtkfontchooserdialog.h \
		gtkfontchooserwidget.h \
		gtkframe.h \
		gtkgrid.h \
!ifdef GIT
		gtkheaderbar.h \
!else
		gtkiconfactory.h \
!endif
		gtkicontheme.h \
		gtkiconview.h \
		gtkimage.h \
!ifndef GIT
		gtkimagemenuitem.h \
!endif
		gtkimcontext.h \
		gtkimcontextinfo.h \
		gtkimcontextsimple.h \
		gtkimmodule.h \
		gtkimmulticontext.h \
		gtkinfobar.h \
		gtkinvisible.h \
		gtklabel.h \
		gtklayout.h \
		gtklevelbar.h \
		gtklinkbutton.h \
!ifdef GIT
		gtklistbox.h \
!endif
		gtkliststore.h \
		gtklockbutton.h \
		gtkmain.h \
		gtkmenu.h \
		gtkmenubar.h
gtk_1_HEADERS= \
		gtkmenuitem.h \
		gtkmenubutton.h \
		gtkmenushell.h \
		gtkmenutoolbutton.h \
		gtkmessagedialog.h \
		gtkmisc.h \
		gtkmodules.h \
		gtkmountoperation.h \
		gtknotebook.h \
		gtknumerableicon.h \
		gtkoffscreenwindow.h \
		gtkorientable.h \
		gtkoverlay.h \
		gtkpagesetup.h \
		gtkpaned.h \
		gtkpapersize.h \
!ifdef GIT
		gtkplacessidebar.h \
!endif
		gtkplug.h \
		gtkprintcontext.h \
		gtkprintoperation.h \
		gtkprintoperationpreview.h \
		gtkprintsettings.h \
		gtkprogressbar.h \
!ifndef GIT
		gtkradioaction.h \
!endif
		gtkradiobutton.h \
		gtkradiomenuitem.h \
		gtkradiotoolbutton.h \
		gtkrange.h \
!ifndef GIT
		gtkrecentaction.h \
!endif
		gtkrecentchooser.h \
		gtkrecentchooserdialog.h \
		gtkrecentchoosermenu.h \
		gtkrecentchooserwidget.h \
		gtkrecentfilter.h \
		gtkrecentmanager.h \
!ifdef GIT
		gtkrevealer.h \
!endif
		gtkscale.h \
		gtkscalebutton.h \
		gtkscrollable.h \
		gtkscrollbar.h \
		gtkscrolledwindow.h \
!ifdef GIT
		gtksearchbar.h \
!endif
		gtksearchentry.h \
		gtkselection.h \
		gtkseparator.h \
		gtkseparatormenuitem.h \
		gtkseparatortoolitem.h \
		gtksettings.h \
		gtkshow.h \
		gtksizegroup.h \
		gtksizerequest.h \
		gtksocket.h \
		gtkspinbutton.h \
		gtkspinner.h \
!ifdef GIT
		gtkstack.h \
		gtkstackswitcher.h \
!endif
		gtkstatusbar.h \
		gtkstatusicon.h \
!ifndef GIT
		gtkstock.h \
!endif
		gtkstylecontext.h \
		gtkstyleproperties.h \
		gtkstyleprovider.h \
		gtkswitch.h \
		gtktestutils.h \
		gtktextattributes.h \
		gtktextbuffer.h \
		gtktextbufferrichtext.h \
		gtktextchild.h \
		gtktextdisplay.h \
		gtktextiter.h \
		gtktextmark.h \
		gtktexttag.h \
		gtktexttagtable.h \
		gtktextview.h \
		gtkthemingengine.h \
!ifndef GIT
		gtktoggleaction.h \
!endif
		gtktogglebutton.h \
		gtktoggletoolbutton.h \
		gtktoolbar.h \
		gtktoolbutton.h \
		gtktoolitem.h \
		gtktoolitemgroup.h \
		gtktoolpalette.h \
		gtktoolshell.h \
		gtktooltip.h \
		gtktreednd.h \
		gtktreemodel.h \
		gtktreemodelfilter.h \
		gtktreemodelsort.h \
		gtktreeselection.h \
		gtktreesortable.h \
		gtktreestore.h \
		gtktreeview.h \
		gtktreeviewcolumn.h \
		gtktypes.h \
!ifndef GIT
		gtkuimanager.h \
!endif
		gtkviewport.h \
		gtkvolumebutton.h \
		gtkwidget.h \
		gtkwidgetpath.h \
		gtkwindow.h \
		\
		gtktextlayout.h \
		\
		gtktypebuiltins.h \
		\
		gtkversion.h
gtk_deprecated_HEADERS= \
!ifdef GIT
		gtkaction.h \
		gtkactiongroup.h \
		gtkactivatable.h \
!endif
		gtkcolorsel.h \
		gtkcolorseldialog.h \
		gtkfontsel.h \
		gtkgradient.h \
		gtkhandlebox.h \
		gtkhbbox.h \
		gtkhbox.h \
		gtkhpaned.h \
		gtkhscale.h \
		gtkhscrollbar.h \
		gtkhseparator.h \
		gtkhsv.h \
!ifdef GIT
		gtkiconfactory.h \
		gtkimagemenuitem.h \
		gtkradioaction.h \
!endif
		gtkrc.h \
!ifdef GIT
		gtkrecentaction.h \
		gtkstock.h \
!endif
		gtkstyle.h \
		gtksymboliccolor.h \
		gtktable.h \
		gtktearoffmenuitem.h \
!ifdef GIT
		gtktoggleaction.h \
		gtkuimanager.h \
!endif
		gtkvbbox.h \
		gtkvbox.h \
		gtkvscale.h \
		gtkvscrollbar.h \
		gtkvseparator.h \
		gtkvpaned.h
gtk_a11y_HEADERS= \
		gtkarrowaccessible.h \
		gtkbooleancellaccessible.h \
		gtkbuttonaccessible.h \
		gtkcellaccessible.h \
		gtkcellaccessibleparent.h \
		gtkcheckmenuitemaccessible.h \
		gtkcomboboxaccessible.h \
		gtkcontaineraccessible.h \
		gtkcontainercellaccessible.h \
		gtkentryaccessible.h \
		gtkexpanderaccessible.h \
		gtkframeaccessible.h \
		gtkiconviewaccessible.h \
		gtkimageaccessible.h \
		gtkimagecellaccessible.h \
		gtklabelaccessible.h \
		gtklevelbaraccessible.h \
		gtklinkbuttonaccessible.h \
!ifdef GIT
		gtklistboxaccessible.h \
!endif
		gtklockbuttonaccessible.h \
		gtkmenuaccessible.h \
		gtkmenuitemaccessible.h \
		gtkmenushellaccessible.h \
		gtknotebookaccessible.h \
		gtknotebookpageaccessible.h \
		gtkpanedaccessible.h \
		gtkprogressbaraccessible.h \
		gtkradiobuttonaccessible.h \
		gtkradiomenuitemaccessible.h \
		gtkrangeaccessible.h \
		gtkrenderercellaccessible.h \
		gtkscaleaccessible.h \
		gtkscalebuttonaccessible.h \
		gtkscrolledwindowaccessible.h \
		gtkspinbuttonaccessible.h \
		gtkspinneraccessible.h \
		gtkstatusbaraccessible.h \
		gtkswitchaccessible.h \
		gtktextcellaccessible.h \
		gtktextviewaccessible.h \
		gtktogglebuttonaccessible.h \
		gtktoplevelaccessible.h \
		gtktreeviewaccessible.h \
		gtkwidgetaccessible.h \
		gtkwindowaccessible.h
gtk_MODULES= \
		inputim-am-et.dll \
		inputim-cedilla.dll \
		inputim-cyrillic-translit.dll \
		inputim-ime.dll \
		inputim-inuktitut.dll \
		inputim-ipa.dll \
		inputim-multipress.dll \
		inputim-thai.dll \
		inputim-ti-er.dll \
		inputim-ti-et.dll \
		inputim-viqr.dll
harfbuzz_HEADERS= \
		hb.h \
		hb-blob.h \
		hb-buffer.h \
		hb-common.h \
		hb-font.h \
		hb-set.h \
		hb-shape.h \
		hb-shape-plan.h \
		hb-unicode.h \
		hb-version.h \
		\
		hb-ot.h \
		hb-ot-layout.h \
		hb-ot-tag.h \
		\
		hb-glib.h \
		\
		hb-gobject.h \
		\
		hb-ft.h \
		\
		hb-uniscribe.h
pango_HEADERS= \
		pango.h \
		pango-attributes.h \
		pango-bidi-type.h \
		pango-break.h \
		pango-context.h \
		pango-coverage.h \
		pango-engine.h \
		pango-enum-types.h \
		pango-features.h \
		pango-font.h \
		pango-fontmap.h \
		pango-fontset.h \
		pango-glyph.h \
		pango-glyph-item.h \
		pango-gravity.h \
		pango-item.h \
		pango-language.h \
		pango-layout.h \
		pango-matrix.h \
		pango-modules.h \
		pango-renderer.h \
		pango-script.h \
		pango-tabs.h \
		pango-types.h \
		pango-utils.h \
		\
		pango-features.h \
		pango-enum-types.h \
		\
		pango-ot.h \
		pangofc-font.h \
		pangofc-fontmap.h \
		pangofc-decoder.h \
		pangoft2.h \
		\
		pangocairo.h \
		\
		pangowin32.h
PO=		af am an ang ar as ast az az_IR be be@latin bg bn bn_IN br bs ca \
		ca@valencia crh cs csb cy da de dz el en en@shaw en_CA en_GB eo es et \
		eu fa fi fr ga gl gu he hi hr hu hy ia id io is it ja ka kg kk km kn \
		ko ku ky lg li lt lv mai mg mi mk ml mn mr ms my nb nds ne nl nn nso \
		oc or pa pl ps pt pt_BR ro ru rw si sk sl sq sr sr@ije sr@latin sv ta \
		te th tk tl tr tt ug uk ur uz uz@cyrillic vi wa xh yi zh_CN zh_HK \
		zh_TW zu

###############################################################################
# Install                                                                     #
###############################################################################
install: all
# Folders
	if not exist $(PREFIX) mkdir $(PREFIX)
	if not exist $(PREFIX)\bin mkdir $(PREFIX)\bin
	if not exist $(PREFIX)\lib mkdir $(PREFIX)\lib
	if not exist $(PREFIX)\include mkdir $(PREFIX)\include
# Documents
	if not exist $(PREFIX)\doc mkdir $(PREFIX)\doc
	if not exist $(PREFIX)\doc\$(ATK) mkdir $(PREFIX)\doc\$(ATK)
	if not exist $(PREFIX)\doc\$(CAIRO) mkdir $(PREFIX)\doc\$(CAIRO)
	if not exist $(PREFIX)\doc\$(EXPAT) mkdir $(PREFIX)\doc\$(EXPAT)
	if not exist $(PREFIX)\doc\$(FONTCONFIG) mkdir $(PREFIX)\doc\$(FONTCONFIG)
	if not exist $(PREFIX)\doc\$(FREETYPE) mkdir $(PREFIX)\doc\$(FREETYPE)
	if not exist $(PREFIX)\doc\$(GDK_PIXBUF) mkdir $(PREFIX)\doc\$(GDK_PIXBUF)
	if not exist $(PREFIX)\doc\$(GLIB) mkdir $(PREFIX)\doc\$(GLIB)
	if not exist $(PREFIX)\doc\$(GTK) mkdir $(PREFIX)\doc\$(GTK)
	if not exist $(PREFIX)\doc\$(HARFBUZZ) mkdir $(PREFIX)\doc\$(HARFBUZZ)
	if not exist $(PREFIX)\doc\$(ICONVMLANG) mkdir $(PREFIX)\doc\$(ICONVMLANG)
	if not exist $(PREFIX)\doc\$(JPEG) mkdir $(PREFIX)\doc\$(JPEG)
	if not exist $(PREFIX)\doc\$(LIBFFI) mkdir $(PREFIX)\doc\$(LIBFFI)
	if not exist $(PREFIX)\doc\$(LIBPNG) mkdir $(PREFIX)\doc\$(LIBPNG)
	if not exist $(PREFIX)\doc\$(PANGO) mkdir $(PREFIX)\doc\$(PANGO)
	if not exist $(PREFIX)\doc\$(PIXMAN) mkdir $(PREFIX)\doc\$(PIXMAN)
	if not exist $(PREFIX)\doc\$(TIFF) mkdir $(PREFIX)\doc\$(TIFF)
	if not exist $(PREFIX)\doc\$(ZLIB) mkdir $(PREFIX)\doc\$(ZLIB)
	copy /y $(ATK)\COPYING $(PREFIX)\doc\$(ATK)
	copy /y $(CAIRO)\COPYING $(PREFIX)\doc\$(CAIRO)
	copy /y $(CAIRO)\COPYING-LGPL-2.1 $(PREFIX)\doc\$(CAIRO)
	copy /y $(CAIRO)\COPYING-MPL-1.1 $(PREFIX)\doc\$(CAIRO)
	copy /y $(EXPAT)\COPYING $(PREFIX)\doc\$(EXPAT)
	copy /y $(FONTCONFIG)\COPYING $(PREFIX)\doc\$(FONTCONFIG)
	copy /y $(FREETYPE)\docs\LICENSE.TXT $(PREFIX)\doc\$(FREETYPE)
	copy /y $(FREETYPE)\docs\FTL.TXT $(PREFIX)\doc\$(FREETYPE)
	copy /y $(FREETYPE)\docs\GPLv2.TXT $(PREFIX)\doc\$(FREETYPE)
	copy /y $(GDK_PIXBUF)\COPYING $(PREFIX)\doc\$(GDK_PIXBUF)
	copy /y $(GLIB)\COPYING $(PREFIX)\doc\$(GLIB)
	copy /y $(GTK)\COPYING $(PREFIX)\doc\$(GTK)
	copy /y $(HARFBUZZ)\COPYING $(PREFIX)\doc\$(HARFBUZZ)
	copy /y $(ICONVMLANG)\COPYING $(PREFIX)\doc\$(ICONVMLANG)
	copy /y $(JPEG)\README $(PREFIX)\doc\$(JPEG)
	copy /y $(LIBFFI)\LICENSE $(PREFIX)\doc\$(LIBFFI)
	copy /y $(LIBPNG)\LICENSE $(PREFIX)\doc\$(LIBPNG)
	copy /y $(PANGO)\COPYING $(PREFIX)\doc\$(PANGO)
	copy /y $(PIXMAN)\COPYING $(PREFIX)\doc\$(PIXMAN)
	copy /y $(TIFF)\COPYRIGHT $(PREFIX)\doc\$(TIFF)
	copy /y $(ZLIB)\README $(PREFIX)\doc\$(ZLIB)
	if not exist $(PREFIX)\README copy /y README $(PREFIX)
# ATK
	copy /y $(ATK)\atk\libatk-1.0-0.dll $(PREFIX)\bin
	copy /y $(ATK)\atk\atk-1.0.lib $(PREFIX)\lib
	if not exist $(PREFIX)\include\atk mkdir $(PREFIX)\include\atk
	for %f in ($(atk_HEADERS)) do copy /y $(ATK)\atk\%f $(PREFIX)\include\atk
# cairo
	copy /y $(CAIRO)\src\libcairo-2.dll $(PREFIX)\bin
	copy /y $(CAIRO)\src\cairo.lib $(PREFIX)\lib
	copy /y $(CAIRO)\cairo-version.h $(PREFIX)\include
	for %f in ($(cairo_HEADERS)) do copy /y $(CAIRO)\src\%f $(PREFIX)\include
	copy /y $(CAIRO)\util\cairo-gobject\libcairo-gobject-2.dll $(PREFIX)\bin
	copy /y $(CAIRO)\util\cairo-gobject\cairo-gobject.lib $(PREFIX)\lib
# Expat
	copy /y $(EXPAT)\lib\libexpat.dll $(PREFIX)\bin
	copy /y $(EXPAT)\lib\libexpat.lib $(PREFIX)\lib
	copy /y $(EXPAT)\lib\expat.h $(PREFIX)\include
# fontconfig
	copy /y $(FONTCONFIG)\src\libfontconfig-1.dll $(PREFIX)\bin
	copy /y $(FONTCONFIG)\src\fontconfig.lib $(PREFIX)\lib
	if not exist $(PREFIX)\include\fontconfig mkdir $(PREFIX)\include\fontconfig
	copy /y $(FONTCONFIG)\fontconfig\fcfreetype.h $(PREFIX)\include\fontconfig
	copy /y $(FONTCONFIG)\fontconfig\fcprivate.h $(PREFIX)\include\fontconfig
	copy /y $(FONTCONFIG)\fontconfig\fontconfig.h $(PREFIX)\include\fontconfig
# FreeType
	copy /y $(FREETYPE)\src\freetype6.dll $(PREFIX)\bin
	copy /y $(FREETYPE)\src\freetype.lib $(PREFIX)\lib
	if not exist $(PREFIX)\include\freetype mkdir $(PREFIX)\include\freetype
	if not exist $(PREFIX)\include\freetype\config mkdir $(PREFIX)\include\freetype\config
	if not exist $(PREFIX)\include\freetype\internal mkdir $(PREFIX)\include\freetype\internal
	copy /y $(FREETYPE)\include\ft2build.h $(PREFIX)\include
	for %f in ($(freetype_HEADERS)) do copy /y $(FREETYPE)\include\freetype\%f $(PREFIX)\include\freetype
	for %f in ($(freetype_config_HEADERS)) do copy /y $(FREETYPE)\include\freetype\config\%f $(PREFIX)\include\freetype\config
	for %f in ($(freetype_internal_HEADERS)) do copy /y $(FREETYPE)\include\freetype\internal\%f $(PREFIX)\include\freetype\internal
# GDK-Pixbuf
	copy /y $(GDK_PIXBUF)\gdk-pixbuf\libgdk_pixbuf-2.0-0.dll $(PREFIX)\bin
	copy /y $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-query-loaders.exe $(PREFIX)\bin
	copy /y $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $(PREFIX)\lib
	if not exist $(PREFIX)\include\gdk-pixbuf mkdir $(PREFIX)\include\gdk-pixbuf
	for %f in ($(gdk_pixbuf_HEADERS)) do copy /y $(GDK_PIXBUF)\gdk-pixbuf\%f $(PREFIX)\include\gdk-pixbuf
	if not exist $(PREFIX)\lib\gdk-pixbuf-2.0 mkdir $(PREFIX)\lib\gdk-pixbuf-2.0
	if not exist $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION) mkdir $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)
	if not exist $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders mkdir $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders
	for %f in ($(gdk_pixbuf_LOADERS)) do copy /y $(GDK_PIXBUF)\gdk-pixbuf\%f.dll $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders
# GLib
	copy /y $(GLIB)\glib\libglib-2.0-0.dll $(PREFIX)\bin
	copy /y $(GLIB)\glib\gspawn-win32-helper.exe $(PREFIX)\bin
	copy /y $(GLIB)\glib\gspawn-win32-helper-console.exe $(PREFIX)\bin
	copy /y $(GLIB)\gmodule\libgmodule-2.0-0.dll $(PREFIX)\bin
	copy /y $(GLIB)\gthread\libgthread-2.0-0.dll $(PREFIX)\bin
	copy /y $(GLIB)\gobject\libgobject-2.0-0.dll $(PREFIX)\bin
	copy /y $(GLIB)\gobject\gobject-query.exe $(PREFIX)\bin
	copy /y $(GLIB)\gobject\glib-genmarshal.exe $(PREFIX)\bin
	copy /y $(GLIB)\gio\libgio-2.0-0.dll $(PREFIX)\bin
	copy /y $(GLIB)\gio\glib-compile-schemas.exe $(PREFIX)\bin
	copy /y $(GLIB)\gio\glib-compile-resources.exe $(PREFIX)\bin
	copy /y $(GLIB)\glib\glib-2.0.lib $(PREFIX)\lib
	copy /y $(GLIB)\gmodule\gmodule-2.0.lib $(PREFIX)\lib
	copy /y $(GLIB)\gthread\gthread-2.0.lib $(PREFIX)\lib
	copy /y $(GLIB)\gobject\gobject-2.0.lib $(PREFIX)\lib
	copy /y $(GLIB)\gio\gio-2.0.lib $(PREFIX)\lib
	copy /y $(GLIB)\glib\glib.h $(PREFIX)\include
	copy /y $(GLIB)\glib\glibconfig.h $(PREFIX)\include
	copy /y $(GLIB)\glib\glib-object.h $(PREFIX)\include
	copy /y $(GLIB)\gmodule\gmodule.h $(PREFIX)\include
	if not exist $(PREFIX)\include\glib mkdir $(PREFIX)\include\glib
	for %f in ($(glib_HEADERS)) do copy /y $(GLIB)\glib\%f $(PREFIX)\include\glib
	if not exist $(PREFIX)\include\glib\deprecated mkdir $(PREFIX)\include\glib\deprecated
	for %f in ($(glib_deprecated_HEADERS)) do copy /y $(GLIB)\glib\deprecated\%f $(PREFIX)\include\glib\deprecated
	if not exist $(PREFIX)\include\gobject mkdir $(PREFIX)\include\gobject
	for %f in ($(gobject_HEADERS)) do copy /y $(GLIB)\gobject\%f $(PREFIX)\include\gobject
	if not exist $(PREFIX)\include\gio mkdir $(PREFIX)\include\gio
	for %f in ($(gio_HEADERS)) do copy /y $(GLIB)\gio\%f $(PREFIX)\include\gio
# GTK+
	copy /y $(GTK)\gdk\libgdk-win32-$(GTK_API_VERSION)-0.dll $(PREFIX)\bin
	copy /y $(GTK)\gtk\libgtk-win32-$(GTK_API_VERSION)-0.dll $(PREFIX)\bin
	copy /y $(GTK)\gtk\gtk-query-immodules-$(GTK_API_VERSION).exe $(PREFIX)\bin
	copy /y $(GTK)\gdk\gdk-win32-$(GTK_API_VERSION).lib $(PREFIX)\lib
	copy /y $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $(PREFIX)\lib
	if not exist $(PREFIX)\include\gdk mkdir $(PREFIX)\include\gdk
	if not exist $(PREFIX)\include\gdk\win32 mkdir $(PREFIX)\include\gdk\win32
	copy /y $(GTK)\gdk\win32\gdkwin32.h $(PREFIX)\include\gdk
	for %f in ($(gdk_HEADERS)) do copy /y $(GTK)\gdk\%f $(PREFIX)\include\gdk
	for %f in ($(gdkwin32_HEADERS)) do copy /y $(GTK)\gdk\win32\%f $(PREFIX)\include\gdk\win32
	if not exist $(PREFIX)\include\gtk mkdir $(PREFIX)\include\gtk
	for %f in ($(gtk_0_HEADERS)) do copy /y $(GTK)\gtk\%f $(PREFIX)\include\gtk
	for %f in ($(gtk_1_HEADERS)) do copy /y $(GTK)\gtk\%f $(PREFIX)\include\gtk
	if not exist $(PREFIX)\include\gtk\a11y mkdir $(PREFIX)\include\gtk\a11y
	for %f in ($(gtk_a11y_HEADERS)) do copy /y $(GTK)\gtk\a11y\%f $(PREFIX)\include\gtk\a11y
	if not exist $(PREFIX)\include\gtk\deprecated mkdir $(PREFIX)\include\gtk\deprecated
	for %f in ($(gtk_deprecated_HEADERS)) do copy /y $(GTK)\gtk\deprecated\%f $(PREFIX)\include\gtk\deprecated
	if not exist $(PREFIX)\lib\gtk-$(GTK_API_VERSION) mkdir $(PREFIX)\lib\gtk-$(GTK_API_VERSION)
	if not exist $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION) mkdir $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)
	if not exist $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\engines mkdir $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\engines
	if not exist $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules mkdir $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules
	for %f in ($(gtk_MODULES)) do copy /y $(GTK)\modules\input\%f $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules
# harfbuzz
	copy /y $(HARFBUZZ)\src\libharfbuzz-$(HARFBUZZ_MAJOR_VERSION).dll $(PREFIX)\bin
	copy /y $(HARFBUZZ)\src\harfbuzz.lib $(PREFIX)\lib
	for %f in ($(harfbuzz_HEADERS)) do copy /y $(HARFBUZZ)\src\%f $(PREFIX)\include
# iconvmlang
	copy /y $(ICONVMLANG)\libiconv2.dll $(PREFIX)\bin
	copy /y $(ICONVMLANG)\iconv.dll $(PREFIX)\bin
	copy /y $(ICONVMLANG)\iconv.lib $(PREFIX)\lib
	copy /y $(ICONVMLANG)\iconv.h $(PREFIX)\include
	copy /y $(ICONVMLANG)\libintl3.dll $(PREFIX)\bin
	copy /y $(ICONVMLANG)\intl.dll $(PREFIX)\bin
	copy /y $(ICONVMLANG)\intl.lib $(PREFIX)\lib
	copy /y $(ICONVMLANG)\libintl.h $(PREFIX)\include
	copy /y $(ICONVMLANG)\msgfmt.exe $(PREFIX)\bin
# JPEG
	copy /y $(JPEG)\jpeg62.dll $(PREFIX)\bin
	copy /y $(JPEG)\libjpeg-8.dll $(PREFIX)\bin
	copy /y $(JPEG)\libjpeg-9.dll $(PREFIX)\bin
	copy /y $(JPEG)\libjpeg.lib $(PREFIX)\lib
	copy /y $(JPEG)\jconfig.h $(PREFIX)\include
	copy /y $(JPEG)\jerror.h $(PREFIX)\include
	copy /y $(JPEG)\jmorecfg.h $(PREFIX)\include
	copy /y $(JPEG)\jpeglib.h $(PREFIX)\include
# libffi
	copy /y $(LIBFFI)\src\libffi-5.dll $(PREFIX)\bin
	copy /y $(LIBFFI)\src\ffi.lib $(PREFIX)\lib
	copy /y $(LIBFFI)\include\ffi.h $(PREFIX)\include
	copy /y $(LIBFFI)\src\x86\ffitarget.h $(PREFIX)\include
# libpng
	copy /y $(LIBPNG)\libpng13.dll $(PREFIX)\bin
	copy /y $(LIBPNG)\libpng14.dll $(PREFIX)\bin
	copy /y $(LIBPNG)\libpng15.dll $(PREFIX)\bin
	copy /y $(LIBPNG)\libpng15.lib $(PREFIX)\lib
	copy /y $(LIBPNG)\png.h $(PREFIX)\include
	copy /y $(LIBPNG)\pngconf.h $(PREFIX)\include
	copy /y $(LIBPNG)\pnglibconf.h $(PREFIX)\include
# Pango
	copy /y $(PANGO)\pango\libpango-1.0-0.dll $(PREFIX)\bin
	copy /y $(PANGO)\pango\libpangoft2-1.0-0.dll $(PREFIX)\bin
	copy /y $(PANGO)\pango\libpangowin32-1.0-0.dll $(PREFIX)\bin
	copy /y $(PANGO)\pango\libpangocairo-1.0-0.dll $(PREFIX)\bin
	copy /y $(PANGO)\pango\pango-querymodules.exe $(PREFIX)\bin
	copy /y iwm\pango-makealiases-win32.exe $(PREFIX)\bin
	copy /y $(PANGO)\pango\pango-1.0.lib $(PREFIX)\lib
	copy /y $(PANGO)\pango\pangoft2-1.0.lib $(PREFIX)\lib
	copy /y $(PANGO)\pango\pangowin32-1.0.lib $(PREFIX)\lib
	copy /y $(PANGO)\pango\pangocairo-1.0.lib $(PREFIX)\lib
	if not exist $(PREFIX)\include\pango mkdir $(PREFIX)\include\pango
	for %f in ($(pango_HEADERS)) do copy /y $(PANGO)\pango\%f $(PREFIX)\include\pango
	if not exist $(PREFIX)\lib\pango mkdir $(PREFIX)\lib\pango
	if not exist $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION) mkdir $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)
	if not exist $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules mkdir $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules
	copy /y $(PANGO)\modules\basic\pango-basic-fc.dll $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules
	copy /y $(PANGO)\modules\basic\pango-basic-win32.dll $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules
# TIFF
	copy /y $(TIFF)\libtiff\libtiff3.dll $(PREFIX)\bin
	copy /y $(TIFF)\libtiff\libtiff.dll $(PREFIX)\bin
	copy /y $(TIFF)\libtiff\libtiff.lib $(PREFIX)\lib
	copy /y $(TIFF)\libtiff\tiff.h $(PREFIX)\include
	copy /y $(TIFF)\libtiff\tiffconf.h $(PREFIX)\include
	copy /y $(TIFF)\libtiff\tiffio.h $(PREFIX)\include
	copy /y $(TIFF)\libtiff\tiffvers.h $(PREFIX)\include
# zlib
	copy /y $(ZLIB)\zlib1.dll $(PREFIX)\bin
	copy /y $(ZLIB)\zdll.lib $(PREFIX)\lib
	copy /y $(ZLIB)\zlib.h $(PREFIX)\include
	copy /y $(ZLIB)\zconf.h $(PREFIX)\include
# PO
	if not exist $(PREFIX)\share mkdir $(PREFIX)\share
	if not exist $(PREFIX)\share\locale mkdir $(PREFIX)\share\locale
	for %d in ($(PO)) do if not exist $(PREFIX)\share\locale\%d mkdir $(PREFIX)\share\locale\%d
	for %d in ($(PO)) do if not exist $(PREFIX)\share\locale\%d\LC_MESSAGES mkdir $(PREFIX)\share\locale\%d\LC_MESSAGES
!ifdef GIT
	for %f in ($(PO)) do if exist $(ATK)\po\%f.po $(ICONVMLANG)\msgfmt.exe $(ATK)\po\%f.po -o $(PREFIX)\share\locale\%f\LC_MESSAGES\atk10.mo
	for %f in ($(PO)) do if exist $(GDK_PIXBUF)\po\%f.po $(ICONVMLANG)\msgfmt.exe $(GLIB)\po\%f.po -o $(PREFIX)\share\locale\%f\LC_MESSAGES\gdk-pixbuf.mo
	for %f in ($(PO)) do if exist $(GLIB)\po\%f.po $(ICONVMLANG)\msgfmt.exe $(GLIB)\po\%f.po -o $(PREFIX)\share\locale\%f\LC_MESSAGES\glib20.mo
	for %f in ($(PO)) do if exist $(GTK)\po\%f.po $(ICONVMLANG)\msgfmt.exe $(GTK)\po\%f.po -o $(PREFIX)\share\locale\%f\LC_MESSAGES\gtk30.mo
!else
	for %f in ($(PO)) do if exist $(ATK)\po\%f.gmo copy /y $(ATK)\po\%f.gmo $(PREFIX)\share\locale\%f\LC_MESSAGES\atk10.mo
	for %f in ($(PO)) do if exist $(GDK_PIXBUF)\po\%f.gmo copy /y $(GDK_PIXBUF)\po\%f.gmo $(PREFIX)\share\locale\%f\LC_MESSAGES\gdk-pixbuf.mo
	for %f in ($(PO)) do if exist $(GLIB)\po\%f.gmo copy /y $(GLIB)\po\%f.gmo $(PREFIX)\share\locale\%f\LC_MESSAGES\glib20.mo
	for %f in ($(PO)) do if exist $(GTK)\po\%f.gmo copy /y $(GTK)\po\%f.gmo $(PREFIX)\share\locale\%f\LC_MESSAGES\gtk30.mo
!endif
# Config
	if not exist $(PREFIX)\etc mkdir $(PREFIX)\etc
	if not exist $(PREFIX)\etc\gtk-$(GTK_API_VERSION) mkdir $(PREFIX)\etc\gtk-$(GTK_API_VERSION)
	if not exist $(PREFIX)\etc\pango mkdir $(PREFIX)\etc\pango
	if not exist $(PREFIX)\share\glib-2.0 mkdir $(PREFIX)\share\glib-2.0
	if not exist $(PREFIX)\share\glib-2.0\schemas mkdir $(PREFIX)\share\glib-2.0\schemas
	iwm\pango-makealiases-win32.exe > $(PREFIX)\etc\pango\pango.aliases
	$(PREFIX)\bin\pango-querymodules.exe > $(PREFIX)\etc\pango\pango.modules
	$(PREFIX)\bin\gdk-pixbuf-query-loaders.exe > $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders.cache
	$(PREFIX)\bin\gtk-query-immodules-$(GTK_API_VERSION).exe > $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules.cache
	copy /y $(GTK)\modules\input\im-multipress.conf $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules
	copy /y $(GTK)\gtk\org.gtk.Settings.FileChooser.gschema.xml $(PREFIX)\share\glib-2.0\schemas
	$(GLIB)\gio\glib-compile-schemas.exe $(PREFIX)\share\glib-2.0\schemas

###############################################################################
# Uninstall                                                                   #
###############################################################################
uninstall:
# ATK
	if exist $(PREFIX)\bin\libatk-1.0-0.dll del /q $(PREFIX)\bin\libatk-1.0-0.dll
	if exist $(PREFIX)\lib\atk-1.0.lib del /q $(PREFIX)\lib\atk-1.0.lib
	for %f in ($(atk_HEADERS)) do if exist $(PREFIX)\include\atk\%f del /q $(PREFIX)\include\atk\%f
# cairo
	if exist $(PREFIX)\bin\libcairo-2.dll del /q $(PREFIX)\bin\libcairo-2.dll
	if exist $(PREFIX)\bin\libcairo-gobject-2.dll del /q $(PREFIX)\bin\libcairo-gobject-2.dll
	if exist $(PREFIX)\lib\cairo.lib del /q $(PREFIX)\lib\cairo.lib
	if exist $(PREFIX)\lib\cairo-gobject.lib del /q $(PREFIX)\lib\cairo-gobject.lib
	if exist $(PREFIX)\include\cairo-version.h del /q $(PREFIX)\include\cairo-version.h
	for %f in ($(cairo_HEADERS)) do if exist $(PREFIX)\include\%f del /q $(PREFIX)\include\%f
# Expat
	if exist $(PREFIX)\bin\libexpat.dll del /q $(PREFIX)\bin\libexpat.dll
	if exist $(PREFIX)\lib\libexpat.lib del /q $(PREFIX)\lib\libexpat.lib
	if exist $(PREFIX)\include\expat.h del /q $(PREFIX)\include\expat.h
# fontconfig
	if exist $(PREFIX)\bin\libfontconfig-1.dll del /q $(PREFIX)\bin\libfontconfig-1.dll
	if exist $(PREFIX)\lib\fontconfig.lib del /q $(PREFIX)\lib\fontconfig.lib
	if exist $(PREFIX)\include\fontconfig\fcfreetype.h del /q $(PREFIX)\include\fontconfig\fcfreetype.h
	if exist $(PREFIX)\include\fontconfig\fcprivate.h del /q $(PREFIX)\include\fontconfig\fcprivate.h
	if exist $(PREFIX)\include\fontconfig\fontconfig.h del /q $(PREFIX)\include\fontconfig\fontconfig.h
# FreeType
	if exist $(PREFIX)\bin\freetype6.dll del /q $(PREFIX)\bin\freetype6.dll
	if exist $(PREFIX)\lib\freetype.lib del /q $(PREFIX)\lib\freetype.lib
	if exist $(PREFIX)\include\ft2build.h del /q $(PREFIX)\include\ft2build.h
	for %f in ($(freetype_HEADERS)) do if exist $(PREFIX)\include\freetype\%f del /q $(PREFIX)\include\freetype\%f
	for %f in ($(freetype_config_HEADERS)) do if exist $(PREFIX)\include\freetype\config\%f del /q $(PREFIX)\include\freetype\config\%f
	for %f in ($(freetype_internal_HEADERS)) do if exist $(PREFIX)\include\freetype\internal\%f del /q $(PREFIX)\include\freetype\internal\%f
# GDK-Pixbuf
	if exist $(PREFIX)\bin\libgdk_pixbuf-2.0-0.dll del /q $(PREFIX)\bin\libgdk_pixbuf-2.0-0.dll
	if exist $(PREFIX)\bin\gdk-pixbuf-query-loaders.exe del /q $(PREFIX)\bin\gdk-pixbuf-query-loaders.exe
	if exist $(PREFIX)\lib\gdk_pixbuf-2.0.lib del /q $(PREFIX)\lib\gdk_pixbuf-2.0.lib
	for %f in ($(gdk_pixbuf_HEADERS)) do if exist $(PREFIX)\include\gdk-pixbuf\%f del /q $(PREFIX)\include\gdk-pixbuf\%f
	for %f in ($(gdk_pixbuf_LOADERS)) do if exist $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders\%f.dll del /q $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders\%f.dll
# GLib
	if exist $(PREFIX)\bin\libglib-2.0-0.dll del /q $(PREFIX)\bin\libglib-2.0-0.dll
	if exist $(PREFIX)\bin\gspawn-win32-helper.exe del /q $(PREFIX)\bin\gspawn-win32-helper.exe
	if exist $(PREFIX)\bin\gspawn-win32-helper-console.exe del /q $(PREFIX)\bin\gspawn-win32-helper-console.exe
	if exist $(PREFIX)\bin\libgmodule-2.0-0.dll del /q $(PREFIX)\bin\libgmodule-2.0-0.dll
	if exist $(PREFIX)\bin\libgthread-2.0-0.dll del /q $(PREFIX)\bin\libgthread-2.0-0.dll
	if exist $(PREFIX)\bin\libgobject-2.0-0.dll del /q $(PREFIX)\bin\libgobject-2.0-0.dll
	if exist $(PREFIX)\bin\gobject-query.exe del /q $(PREFIX)\bin\gobject-query.exe
	if exist $(PREFIX)\bin\glib-genmarshal.exe del /q $(PREFIX)\bin\glib-genmarshal.exe
	if exist $(PREFIX)\bin\libgio-2.0-0.dll del /q $(PREFIX)\bin\libgio-2.0-0.dll
	if exist $(PREFIX)\bin\glib-compile-schemas.exe del /q $(PREFIX)\bin\glib-compile-schemas.exe
	if exist $(PREFIX)\bin\glib-compile-resources.exe del /q $(PREFIX)\bin\glib-compile-resources.exe
	if exist $(PREFIX)\lib\glib-2.0.lib del /q $(PREFIX)\lib\glib-2.0.lib
	if exist $(PREFIX)\lib\gmodule-2.0.lib del /q $(PREFIX)\lib\gmodule-2.0.lib
	if exist $(PREFIX)\lib\gthread-2.0.lib del /q $(PREFIX)\lib\gthread-2.0.lib
	if exist $(PREFIX)\lib\gobject-2.0.lib del /q $(PREFIX)\lib\gobject-2.0.lib
	if exist $(PREFIX)\lib\gio-2.0.lib del /q $(PREFIX)\lib\gio-2.0.lib
	if exist $(PREFIX)\include\glib.h del /q $(PREFIX)\include\glib.h
	if exist $(PREFIX)\include\glibconfig.h del /q $(PREFIX)\include\glibconfig.h
	if exist $(PREFIX)\include\glib-object.h del /q $(PREFIX)\include\glib-object.h
	if exist $(PREFIX)\include\gmodule.h del /q $(PREFIX)\include\gmodule.h
	for %f in ($(glib_HEADERS)) do if exist $(PREFIX)\include\glib\%f del /q $(PREFIX)\include\glib\%f
	for %f in ($(glib_deprecated_HEADERS)) do if exist $(PREFIX)\include\glib\deprecated\%f del /q $(PREFIX)\include\glib\deprecated\%f
	for %f in ($(gobject_HEADERS)) do if exist $(PREFIX)\include\gobject\%f del /q $(PREFIX)\include\gobject\%f
	for %f in ($(gio_HEADERS)) do if exist $(PREFIX)\include\gio\%f del /q $(PREFIX)\include\gio\%f
# GTK+
	if exist $(PREFIX)\bin\libgdk-win32-$(GTK_API_VERSION)-0.dll del /q $(PREFIX)\bin\libgdk-win32-$(GTK_API_VERSION)-0.dll
	if exist $(PREFIX)\bin\libgtk-win32-$(GTK_API_VERSION)-0.dll del /q $(PREFIX)\bin\libgtk-win32-$(GTK_API_VERSION)-0.dll
	if exist $(PREFIX)\bin\gtk-query-immodules-$(GTK_API_VERSION).exe del /q $(PREFIX)\bin\gtk-query-immodules-$(GTK_API_VERSION).exe
	if exist $(PREFIX)\lib\gdk-win32-$(GTK_API_VERSION).lib del /q $(PREFIX)\lib\gdk-win32-$(GTK_API_VERSION).lib
	if exist $(PREFIX)\lib\gtk-win32-$(GTK_API_VERSION).lib del /q $(PREFIX)\lib\gtk-win32-$(GTK_API_VERSION).lib
	if exist $(PREFIX)\include\gdk\gdkwin32.h del /q $(PREFIX)\include\gdk\gdkwin32.h
	for %f in ($(gdk_HEADERS)) do if exist $(PREFIX)\include\gdk\%f del /q $(PREFIX)\include\gdk\%f
	for %f in ($(gdkwin32_HEADERS)) do if exist $(PREFIX)\include\gdk\win32\%f del /q $(PREFIX)\include\gdk\win32\%f
	for %f in ($(gtk_0_HEADERS)) do if exist $(PREFIX)\include\gtk\%f del /q $(PREFIX)\include\gtk\%f
	for %f in ($(gtk_1_HEADERS)) do if exist $(PREFIX)\include\gtk\%f del /q $(PREFIX)\include\gtk\%f
	for %f in ($(gtk_a11y_HEADERS)) do if exist $(PREFIX)\include\gtk\a11y\%f del /q $(PREFIX)\include\gtk\a11y\%f
	for %f in ($(gtk_deprecated_HEADERS)) do if exist $(PREFIX)\include\gtk\deprecated\%f del /q $(PREFIX)\include\gtk\deprecated\%f
	if exist $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\engines\libwimp.dll del /q $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\engines\libwimp.dll
	for %f in ($(gtk_MODULES)) do if exist $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules\%f del /q $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules\%f
# harfbuzz
	if exist $(PREFIX)\bin\libharfbuzz-$(HARFBUZZ_MAJOR_VERSION).dll del /q $(PREFIX)\bin\libharfbuzz-$(HARFBUZZ_MAJOR_VERSION).dll
	if exist $(PREFIX)\lib\harfbuzz.lib del /q $(PREFIX)\lib\harfbuzz.lib
	for %f in ($(harfbuzz_HEADERS)) do if exist $(PREFIX)\include\%f del /q $(PREFIX)\include\%f
# iconvmlang
	if exist $(PREFIX)\bin\libiconv2.dll del /q $(PREFIX)\bin\libiconv2.dll
	if exist $(PREFIX)\bin\iconv.dll del /q $(PREFIX)\bin\iconv.dll
	if exist $(PREFIX)\lib\iconv.lib del /q $(PREFIX)\lib\iconv.lib
	if exist $(PREFIX)\include\iconv.h del /q $(PREFIX)\include\iconv.h
	if exist $(PREFIX)\bin\libintl3.dll del /q $(PREFIX)\bin\libintl3.dll
	if exist $(PREFIX)\bin\intl.dll del /q $(PREFIX)\bin\intl.dll
	if exist $(PREFIX)\lib\intl.lib del /q $(PREFIX)\lib\intl.lib
	if exist $(PREFIX)\include\libintl.h del /q $(PREFIX)\include\libintl.h
	if exist $(PREFIX)\bin\msgfmt.exe del /q $(PREFIX)\bin\msgfmt.exe
# JPEG
	if exist $(PREFIX)\bin\jpeg62.dll del /q $(PREFIX)\bin\jpeg62.dll
	if exist $(PREFIX)\bin\libjpeg-8.dll del /q $(PREFIX)\bin\libjpeg-8.dll
	if exist $(PREFIX)\bin\libjpeg-9.dll del /q $(PREFIX)\bin\libjpeg-9.dll
	if exist $(PREFIX)\lib\libjpeg.lib del /q $(PREFIX)\lib\libjpeg.lib
	if exist $(PREFIX)\include\jconfig.h del /q $(PREFIX)\include\jconfig.h
	if exist $(PREFIX)\include\jerror.h del /q $(PREFIX)\include\jerror.h
	if exist $(PREFIX)\include\jmorecfg.h del /q $(PREFIX)\include\jmorecfg.h
	if exist $(PREFIX)\include\jpeglib.h del /q $(PREFIX)\include\jpeglib.h
# libffi
	if exist $(PREFIX)\bin\libffi-5.dll del /q $(PREFIX)\bin\libffi-5.dll
	if exist $(PREFIX)\lib\ffi.lib del /q $(PREFIX)\lib\ffi.lib
	if exist $(PREFIX)\include\ffi.h del /q $(PREFIX)\include\ffi.h
	if exist $(PREFIX)\include\ffitarget.h del /q $(PREFIX)\include\ffitarget.h
# libpng
	if exist $(PREFIX)\bin\libpng13.dll del /q $(PREFIX)\bin\libpng13.dll
	if exist $(PREFIX)\bin\libpng14.dll del /q $(PREFIX)\bin\libpng14.dll
	if exist $(PREFIX)\bin\libpng15.dll del /q $(PREFIX)\bin\libpng15.dll
	if exist $(PREFIX)\lib\libpng15.lib del /q $(PREFIX)\lib\libpng15.lib
	if exist $(PREFIX)\include\png.h del /q $(PREFIX)\include\png.h
	if exist $(PREFIX)\include\pngconf.h del /q $(PREFIX)\include\pngconf.h
	if exist $(PREFIX)\include\pnglibconf.h del /q $(PREFIX)\include\pnglibconf.h
# Pango
	if exist $(PREFIX)\bin\libpango-1.0-0.dll del /q $(PREFIX)\bin\libpango-1.0-0.dll
	if exist $(PREFIX)\bin\libpangoft2-1.0-0.dll del /q $(PREFIX)\bin\libpangoft2-1.0-0.dll
	if exist $(PREFIX)\bin\libpangowin32-1.0-0.dll del /q $(PREFIX)\bin\libpangowin32-1.0-0.dll
	if exist $(PREFIX)\bin\libpangocairo-1.0-0.dll del /q $(PREFIX)\bin\libpangocairo-1.0-0.dll
	if exist $(PREFIX)\bin\pango-querymodules.exe del /q $(PREFIX)\bin\pango-querymodules.exe
	if exist $(PREFIX)\bin\pango-makealiases-win32.exe del /q $(PREFIX)\bin\pango-makealiases-win32.exe
	if exist $(PREFIX)\lib\pango-1.0.lib del /q $(PREFIX)\lib\pango-1.0.lib
	if exist $(PREFIX)\lib\pangoft2-1.0.lib del /q $(PREFIX)\lib\pangoft2-1.0.lib
	if exist $(PREFIX)\lib\pangowin32-1.0.lib del /q $(PREFIX)\lib\pangowin32-1.0.lib
	if exist $(PREFIX)\lib\pangocairo-1.0.lib del /q $(PREFIX)\lib\pangocairo-1.0.lib
	for %f in ($(pango_HEADERS)) do if exist $(PREFIX)\include\pango\%f del /q $(PREFIX)\include\pango\%f
	if exist $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules\pango-basic-fc.dll del /q $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules\pango-basic-fc.dll
	if exist $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules\pango-basic-win32.dll del /q $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules\pango-basic-win32.dll
# TIFF
	if exist $(PREFIX)\bin\libtiff3.dll del /q $(PREFIX)\bin\libtiff3.dll
	if exist $(PREFIX)\bin\libtiff.dll del /q $(PREFIX)\bin\libtiff.dll
	if exist $(PREFIX)\lib\libtiff.lib del /q $(PREFIX)\lib\libtiff.lib
	if exist $(PREFIX)\include\tiff.h del /q $(PREFIX)\include\tiff.h
	if exist $(PREFIX)\include\tiffconf.h del /q $(PREFIX)\include\tiffconf.h
	if exist $(PREFIX)\include\tiffio.h del /q $(PREFIX)\include\tiffio.h
	if exist $(PREFIX)\include\tiffvers.h del /q $(PREFIX)\include\tiffvers.h
# zlib
	if exist $(PREFIX)\bin\zlib1.dll del /q $(PREFIX)\bin\zlib1.dll
	if exist $(PREFIX)\lib\zdll.lib del /q $(PREFIX)\lib\zdll.lib
	if exist $(PREFIX)\include\zlib.h del /q $(PREFIX)\include\zlib.h
	if exist $(PREFIX)\include\zconf.h del /q $(PREFIX)\include\zconf.h
# PO
	for %d in ($(PO)) do for %f in (atk10.mo gdk-pixbuf.mo glib20.mo gtk30.mo) do if exist $(PREFIX)\share\locale\%d\LC_MESSAGES\%f del /q $(PREFIX)\share\locale\%d\LC_MESSAGES\%f
	for %d in ($(PO)) do if exist $(PREFIX)\share\locale\%d\LC_MESSAGES rmdir /q $(PREFIX)\share\locale\%d\LC_MESSAGES
	for %d in ($(PO)) do if exist $(PREFIX)\share\locale\%d rmdir /q $(PREFIX)\share\locale\%d
# Config
	if exist $(PREFIX)\etc\gtk-$(GTK_API_VERSION)\gtkrc del /q $(PREFIX)\etc\gtk-$(GTK_API_VERSION)\gtkrc
	if exist $(PREFIX)\etc\pango\pango.aliases del /q $(PREFIX)\etc\pango\pango.aliases
	if exist $(PREFIX)\etc\pango\pango.modules del /q $(PREFIX)\etc\pango\pango.modules
	if exist $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders.cache del /q $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders.cache
	if exist $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules.cache del /q $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules.cache
	if exist $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules\im-multipress.conf del /q $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules\im-multipress.conf
	if exist $(PREFIX)\share\glib-2.0\schemas\gschemas.compiled del /q $(PREFIX)\share\glib-2.0\schemas\gschemas.compiled
	if exist $(PREFIX)\share\glib-2.0\schemas\org.gtk.Settings.FileChooser.gschema.xml del /q $(PREFIX)\share\glib-2.0\schemas\org.gtk.Settings.FileChooser.gschema.xml
# Documents
	if exist $(PREFIX)\doc\$(ATK)\COPYING del /q $(PREFIX)\doc\$(ATK)\COPYING
	if exist $(PREFIX)\doc\$(CAIRO)\COPYING del /q $(PREFIX)\doc\$(CAIRO)\COPYING
	if exist $(PREFIX)\doc\$(CAIRO)\COPYING-LGPL-2.1 del /q $(PREFIX)\doc\$(CAIRO)\COPYING-LGPL-2.1
	if exist $(PREFIX)\doc\$(CAIRO)\COPYING-MPL-1.1 del /q $(PREFIX)\doc\$(CAIRO)\COPYING-MPL-1.1
	if exist $(PREFIX)\doc\$(EXPAT)\COPYING del /q $(PREFIX)\doc\$(EXPAT)\COPYING
	if exist $(PREFIX)\doc\$(FONTCONFIG)\COPYING del /q $(PREFIX)\doc\$(FONTCONFIG)\COPYING
	if exist $(PREFIX)\doc\$(FREETYPE)\LICENSE.TXT del /q $(PREFIX)\doc\$(FREETYPE)\LICENSE.TXT
	if exist $(PREFIX)\doc\$(FREETYPE)\FTL.TXT del /q $(PREFIX)\doc\$(FREETYPE)\FTL.TXT
	if exist $(PREFIX)\doc\$(FREETYPE)\GPLv2.TXT del /q $(PREFIX)\doc\$(FREETYPE)\GPLv2.TXT
	if exist $(PREFIX)\doc\$(GDK_PIXBUF)\COPYING del /q $(PREFIX)\doc\$(GDK_PIXBUF)\COPYING
	if exist $(PREFIX)\doc\$(GLIB)\COPYING del /q $(PREFIX)\doc\$(GLIB)\COPYING
	if exist $(PREFIX)\doc\$(GTK)\COPYING del /q $(PREFIX)\doc\$(GTK)\COPYING
	if exist $(PREFIX)\doc\$(HARFBUZZ)\COPYING del /q $(PREFIX)\doc\$(HARFBUZZ)\COPYING
	if exist $(PREFIX)\doc\$(JPEG)\README del /q $(PREFIX)\doc\$(JPEG)\README
	if exist $(PREFIX)\doc\$(ICONVMLANG)\COPYING del /q $(PREFIX)\doc\$(ICONVMLANG)\COPYING
	if exist $(PREFIX)\doc\$(LIBFFI)\LICENSE del /q $(PREFIX)\doc\$(LIBFFI)\LICENSE
	if exist $(PREFIX)\doc\$(LIBPNG)\LICENSE del /q $(PREFIX)\doc\$(LIBPNG)\LICENSE
	if exist $(PREFIX)\doc\$(PANGO)\COPYING del /q $(PREFIX)\doc\$(PANGO)\COPYING
	if exist $(PREFIX)\doc\$(PIXMAN)\COPYING del /q $(PREFIX)\doc\$(PIXMAN)\COPYING
	if exist $(PREFIX)\doc\$(TIFF)\COPYRIGHT del /q $(PREFIX)\doc\$(TIFF)\COPYRIGHT
	if exist $(PREFIX)\doc\$(ZLIB)\README del /q $(PREFIX)\doc\$(ZLIB)\README
	if not "$(PREFIX)"=="." if exist $(PREFIX)\README del /q $(PREFIX)\README
	-rmdir $(PREFIX)\doc\$(ATK)
	-rmdir $(PREFIX)\doc\$(CAIRO)
	-rmdir $(PREFIX)\doc\$(EXPAT)
	-rmdir $(PREFIX)\doc\$(FONTCONFIG)
	-rmdir $(PREFIX)\doc\$(FREETYPE)
	-rmdir $(PREFIX)\doc\$(GDK_PIXBUF)
	-rmdir $(PREFIX)\doc\$(GLIB)
	-rmdir $(PREFIX)\doc\$(GTK)
	-rmdir $(PREFIX)\doc\$(HARFBUZZ)
	-rmdir $(PREFIX)\doc\$(JPEG)
	-rmdir $(PREFIX)\doc\$(ICONVMLANG)
	-rmdir $(PREFIX)\doc\$(LIBFFI)
	-rmdir $(PREFIX)\doc\$(LIBPNG)
	-rmdir $(PREFIX)\doc\$(PANGO)
	-rmdir $(PREFIX)\doc\$(PIXMAN)
	-rmdir $(PREFIX)\doc\$(TIFF)
	-rmdir $(PREFIX)\doc\$(ZLIB)
	-rmdir $(PREFIX)\doc
# Folders
	-rmdir $(PREFIX)\bin
	-rmdir $(PREFIX)\etc\gtk-$(GTK_API_VERSION)
	-rmdir $(PREFIX)\etc\pango
	-rmdir $(PREFIX)\etc
	-rmdir $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders
	-rmdir $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)
	-rmdir $(PREFIX)\lib\gdk-pixbuf-2.0
	-rmdir $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\engines
	-rmdir $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules
	-rmdir $(PREFIX)\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)
	-rmdir $(PREFIX)\lib\gtk-$(GTK_API_VERSION)
	-rmdir $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)\modules
	-rmdir $(PREFIX)\lib\pango\$(PANGO_MODULE_VERSION)
	-rmdir $(PREFIX)\lib\pango
	-rmdir $(PREFIX)\lib
	-rmdir $(PREFIX)\include\atk
	-rmdir $(PREFIX)\include\fontconfig
	-rmdir $(PREFIX)\include\freetype\config
	-rmdir $(PREFIX)\include\freetype\internal
	-rmdir $(PREFIX)\include\freetype
	-rmdir $(PREFIX)\include\gdk\win32
	-rmdir $(PREFIX)\include\gdk
	-rmdir $(PREFIX)\include\gdk-pixbuf
	-rmdir $(PREFIX)\include\gio
	-rmdir $(PREFIX)\include\glib\deprecated
	-rmdir $(PREFIX)\include\glib
	-rmdir $(PREFIX)\include\gobject
	-rmdir $(PREFIX)\include\gtk\a11y
	-rmdir $(PREFIX)\include\gtk\deprecated
	-rmdir $(PREFIX)\include\gtk
	-rmdir $(PREFIX)\include\pango
	-rmdir $(PREFIX)\include
	-rmdir $(PREFIX)\share\glib-2.0\schemas
	-rmdir $(PREFIX)\share\glib-2.0
	-rmdir $(PREFIX)\share\locale
	-rmdir $(PREFIX)\share
	-rmdir $(PREFIX)


###############################################################################
#                                                                             #
# Distribute                                                                  #
#                                                                             #
###############################################################################
!ifndef GIT
dist: \
		gtk-$(VERSION).$(RELEASE)-bin.zip \
		gtk-$(VERSION).$(RELEASE)-dev.zip \
		gtk-$(VERSION).$(RELEASE)-src.zip

gtk-$(VERSION).$(RELEASE)-bin.zip: all
# Folders
	mkdir $*
	mkdir $*\bin
	mkdir $*\lib
# Documents
	mkdir $*\doc
	mkdir $*\doc\$(ATK)
	mkdir $*\doc\$(CAIRO)
	mkdir $*\doc\$(EXPAT)
	mkdir $*\doc\$(FONTCONFIG)
	mkdir $*\doc\$(FREETYPE)
	mkdir $*\doc\$(GDK_PIXBUF)
	mkdir $*\doc\$(GLIB)
	mkdir $*\doc\$(GTK)
	mkdir $*\doc\$(HARFBUZZ)
	mkdir $*\doc\$(ICONVMLANG)
	mkdir $*\doc\$(JPEG)
	mkdir $*\doc\$(LIBFFI)
	mkdir $*\doc\$(LIBPNG)
	mkdir $*\doc\$(PANGO)
	mkdir $*\doc\$(PIXMAN)
	mkdir $*\doc\$(TIFF)
	mkdir $*\doc\$(ZLIB)
	copy /y $(ATK)\COPYING $*\doc\$(ATK)
	copy /y $(CAIRO)\COPYING $*\doc\$(CAIRO)
	copy /y $(CAIRO)\COPYING-LGPL-2.1 $*\doc\$(CAIRO)
	copy /y $(CAIRO)\COPYING-MPL-1.1 $*\doc\$(CAIRO)
	copy /y $(EXPAT)\COPYING $*\doc\$(EXPAT)
	copy /y $(FONTCONFIG)\COPYING $*\doc\$(FONTCONFIG)
	copy /y $(FREETYPE)\docs\LICENSE.TXT $*\doc\$(FREETYPE)
	copy /y $(FREETYPE)\docs\FTL.TXT $*\doc\$(FREETYPE)
	copy /y $(FREETYPE)\docs\GPLv2.TXT $*\doc\$(FREETYPE)
	copy /y $(GDK_PIXBUF)\COPYING $*\doc\$(GDK_PIXBUF)
	copy /y $(GLIB)\COPYING $*\doc\$(GLIB)
	copy /y $(GTK)\COPYING $*\doc\$(GTK)
	copy /y $(HARFBUZZ)\COPYING $*\doc\$(HARFBUZZ)
	copy /y $(ICONVMLANG)\COPYING $*\doc\$(ICONVMLANG)
	copy /y $(JPEG)\README $*\doc\$(JPEG)
	copy /y $(LIBFFI)\LICENSE $*\doc\$(LIBFFI)
	copy /y $(LIBPNG)\LICENSE $*\doc\$(LIBPNG)
	copy /y $(PANGO)\COPYING $*\doc\$(PANGO)
	copy /y $(PIXMAN)\COPYING $*\doc\$(PIXMAN)
	copy /y $(TIFF)\COPYRIGHT $*\doc\$(TIFF)
	copy /y $(ZLIB)\README $*\doc\$(ZLIB)
	copy /y README $*
# ATK
	copy /y $(ATK)\atk\libatk-1.0-0.dll $*\bin
# cairo
	copy /y $(CAIRO)\src\libcairo-2.dll $*\bin
	copy /y $(CAIRO)\util\cairo-gobject\libcairo-gobject-2.dll $*\bin
# Expat
	copy /y $(EXPAT)\lib\libexpat.dll $*\bin
# fontconfig
	copy /y $(FONTCONFIG)\src\libfontconfig-1.dll $*\bin
# FreeType
	copy /y $(FREETYPE)\src\freetype6.dll $*\bin
# GDK-Pixbuf
	copy /y $(GDK_PIXBUF)\gdk-pixbuf\libgdk_pixbuf-2.0-0.dll $*\bin
	copy /y $(GDK_PIXBUF)\gdk-pixbuf\gdk-pixbuf-query-loaders.exe $*\bin
	mkdir $*\lib\gdk-pixbuf-2.0
	mkdir $*\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)
	mkdir $*\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders
	for %f in ($(gdk_pixbuf_LOADERS)) do copy /y $(GDK_PIXBUF)\gdk-pixbuf\%f.dll $*\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders
# GLib
	copy /y $(GLIB)\glib\libglib-2.0-0.dll $*\bin
	copy /y $(GLIB)\glib\gspawn-win32-helper.exe $*\bin
	copy /y $(GLIB)\glib\gspawn-win32-helper-console.exe $*\bin
	copy /y $(GLIB)\gmodule\libgmodule-2.0-0.dll $*\bin
	copy /y $(GLIB)\gthread\libgthread-2.0-0.dll $*\bin
	copy /y $(GLIB)\gobject\libgobject-2.0-0.dll $*\bin
	copy /y $(GLIB)\gobject\gobject-query.exe $*\bin
	copy /y $(GLIB)\gobject\glib-genmarshal.exe $*\bin
	copy /y $(GLIB)\gio\libgio-2.0-0.dll $*\bin
	copy /y $(GLIB)\gio\glib-compile-schemas.exe $*\bin
	copy /y $(GLIB)\gio\glib-compile-resources.exe $*\bin
# GTK+
	copy /y $(GTK)\gdk\libgdk-win32-$(GTK_API_VERSION)-0.dll $*\bin
	copy /y $(GTK)\gtk\libgtk-win32-$(GTK_API_VERSION)-0.dll $*\bin
	copy /y $(GTK)\gtk\gtk-query-immodules-$(GTK_API_VERSION).exe $*\bin
	mkdir $*\lib\gtk-$(GTK_API_VERSION)
	mkdir $*\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)
	mkdir $*\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules
	for %f in ($(gtk_MODULES)) do copy /y $(GTK)\modules\input\%f $*\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules
# harfbuzz
	copy /y $(HARFBUZZ)\src\libharfbuzz-$(HARFBUZZ_MAJOR_VERSION).dll $*\bin
# iconvmlang
	copy /y $(ICONVMLANG)\libiconv2.dll $*\bin
	copy /y $(ICONVMLANG)\iconv.dll $*\bin
	copy /y $(ICONVMLANG)\libintl3.dll $*\bin
	copy /y $(ICONVMLANG)\intl.dll $*\bin
# JPEG
	copy /y $(JPEG)\jpeg62.dll $*\bin
	copy /y $(JPEG)\libjpeg-8.dll $*\bin
	copy /y $(JPEG)\libjpeg-9.dll $*\bin
# libffi
	copy /y $(LIBFFI)\src\libffi-5.dll $*\bin
# libpng
	copy /y $(LIBPNG)\libpng13.dll $*\bin
	copy /y $(LIBPNG)\libpng14.dll $*\bin
	copy /y $(LIBPNG)\libpng15.dll $*\bin
# Pango
	copy /y $(PANGO)\pango\libpango-1.0-0.dll $*\bin
	copy /y $(PANGO)\pango\libpangoft2-1.0-0.dll $*\bin
	copy /y $(PANGO)\pango\libpangowin32-1.0-0.dll $*\bin
	copy /y $(PANGO)\pango\libpangocairo-1.0-0.dll $*\bin
	copy /y $(PANGO)\pango\pango-querymodules.exe $*\bin
	copy /y iwm\pango-makealiases-win32.exe $*\bin
	mkdir $*\lib\pango
	mkdir $*\lib\pango\$(PANGO_MODULE_VERSION)
	mkdir $*\lib\pango\$(PANGO_MODULE_VERSION)\modules
	copy /y $(PANGO)\modules\basic\pango-basic-fc.dll $*\lib\pango\$(PANGO_MODULE_VERSION)\modules
	copy /y $(PANGO)\modules\basic\pango-basic-win32.dll $*\lib\pango\$(PANGO_MODULE_VERSION)\modules
# TIFF
	copy /y $(TIFF)\libtiff\libtiff3.dll $*\bin
	copy /y $(TIFF)\libtiff\libtiff.dll $*\bin
# zlib
	copy /y $(ZLIB)\zlib1.dll $*\bin
# iwm
	copy /y iwm\pango-makealiases-win32.exe $*\bin
# PO
	mkdir $*\share
	mkdir $*\share\locale
	for %d in ($(PO)) do mkdir $*\share\locale\%d
	for %d in ($(PO)) do mkdir $*\share\locale\%d\LC_MESSAGES
	for %f in ($(PO)) do if exist $(ATK)\po\%f.gmo copy /y $(ATK)\po\%f.gmo $*\share\locale\%f\LC_MESSAGES\atk10.mo
	for %f in ($(PO)) do if exist $(GLIB)\po\%f.gmo copy /y $(GLIB)\po\%f.gmo $*\share\locale\%f\LC_MESSAGES\gdk-pixbuf.mo
	for %f in ($(PO)) do if exist $(GLIB)\po\%f.gmo copy /y $(GLIB)\po\%f.gmo $*\share\locale\%f\LC_MESSAGES\glib20.mo
	for %f in ($(PO)) do if exist $(GTK)\po\%f.gmo copy /y $(GTK)\po\%f.gmo $*\share\locale\%f\LC_MESSAGES\gtk30.mo
# Config
	mkdir $*\etc
	mkdir $*\etc\gtk-$(GTK_API_VERSION)
	mkdir $*\etc\pango
	mkdir $*\share\glib-2.0
	mkdir $*\share\glib-2.0\schemas
	iwm\iwm-replace-win32.exe @GDK_PIXBUF_VERSION@=$(GDK_PIXBUF_VERSION) < iwm\config\gdk-pixbuf.loaders > $*\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_VERSION)\loaders.cache
	iwm\iwm-replace-win32.exe @GTK_VERSION@=$(GTK_VERSION) < iwm\config\gtk.immodules > $*\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules.cache
	copy /y $(GTK)\modules\input\im-multipress.conf $*\lib\gtk-$(GTK_API_VERSION)\$(GTK_VERSION)\immodules
	iwm\iwm-replace-win32.exe @PANGO_MODULE_VERSION@=$(PANGO_MODULE_VERSION) < iwm\config\pango.modules > $*\etc\pango\pango.modules
	copy /y iwm\config\pango.aliases $*\etc\pango
	copy /y $(GTK)\gtk\org.gtk.Settings.FileChooser.gschema.xml $*\share\glib-2.0\schemas
	$(GLIB)\gio\glib-compile-schemas.exe $*\share\glib-2.0\schemas
    7za a -mx9 $@ $*
	rmdir /q /s $*

gtk-$(VERSION).$(RELEASE)-dev.zip: all
# Folders
	mkdir $*
	mkdir $*\bin
	mkdir $*\lib
	mkdir $*\include
# Documents
	mkdir $*\doc
	mkdir $*\doc\$(ATK)
	mkdir $*\doc\$(CAIRO)
	mkdir $*\doc\$(EXPAT)
	mkdir $*\doc\$(FONTCONFIG)
	mkdir $*\doc\$(FREETYPE)
	mkdir $*\doc\$(GDK_PIXBUF)
	mkdir $*\doc\$(GLIB)
	mkdir $*\doc\$(GTK)
	mkdir $*\doc\$(HARFBUZZ)
	mkdir $*\doc\$(ICONVMLANG)
	mkdir $*\doc\$(JPEG)
	mkdir $*\doc\$(LIBFFI)
	mkdir $*\doc\$(LIBPNG)
	mkdir $*\doc\$(PANGO)
	mkdir $*\doc\$(PIXMAN)
	mkdir $*\doc\$(TIFF)
	mkdir $*\doc\$(ZLIB)
	copy /y $(ATK)\COPYING $*\doc\$(ATK)
	copy /y $(CAIRO)\COPYING $*\doc\$(CAIRO)
	copy /y $(CAIRO)\COPYING-LGPL-2.1 $*\doc\$(CAIRO)
	copy /y $(CAIRO)\COPYING-MPL-1.1 $*\doc\$(CAIRO)
	copy /y $(EXPAT)\COPYING $*\doc\$(EXPAT)
	copy /y $(FONTCONFIG)\COPYING $*\doc\$(FONTCONFIG)
	copy /y $(FREETYPE)\docs\LICENSE.TXT $*\doc\$(FREETYPE)
	copy /y $(FREETYPE)\docs\FTL.TXT $*\doc\$(FREETYPE)
	copy /y $(FREETYPE)\docs\GPLv2.TXT $*\doc\$(FREETYPE)
	copy /y $(GDK_PIXBUF)\COPYING $*\doc\$(GDK_PIXBUF)
	copy /y $(GLIB)\COPYING $*\doc\$(GLIB)
	copy /y $(GTK)\COPYING $*\doc\$(GTK)
	copy /y $(HARFBUZZ)\COPYING $*\doc\$(HARFBUZZ)
	copy /y $(ICONVMLANG)\COPYING $*\doc\$(ICONVMLANG)
	copy /y $(JPEG)\README $*\doc\$(JPEG)
	copy /y $(LIBFFI)\LICENSE $*\doc\$(LIBFFI)
	copy /y $(LIBPNG)\LICENSE $*\doc\$(LIBPNG)
	copy /y $(PANGO)\COPYING $*\doc\$(PANGO)
	copy /y $(PIXMAN)\COPYING $*\doc\$(PIXMAN)
	copy /y $(TIFF)\COPYRIGHT $*\doc\$(TIFF)
	copy /y $(ZLIB)\README $*\doc\$(ZLIB)
	if not exist $*\README copy /y README $*
# ATK
	copy /y $(ATK)\atk\atk-1.0.lib $*\lib
	mkdir $*\include\atk
	for %f in ($(atk_HEADERS)) do copy /y $(ATK)\atk\%f $*\include\atk
# cairo
	copy /y $(CAIRO)\src\cairo.lib $*\lib
	copy /y $(CAIRO)\cairo-version.h $*\include
	for %f in ($(cairo_HEADERS)) do copy /y $(CAIRO)\src\%f $*\include
	copy /y $(CAIRO)\util\cairo-gobject\cairo-gobject.lib $*\lib
# Expat
	copy /y $(EXPAT)\lib\libexpat.lib $*\lib
	copy /y $(EXPAT)\lib\expat.h $*\include
# fontconfig
	copy /y $(FONTCONFIG)\src\fontconfig.lib $*\lib
	mkdir $*\include\fontconfig
	copy /y $(FONTCONFIG)\fontconfig\fcfreetype.h $*\include\fontconfig
	copy /y $(FONTCONFIG)\fontconfig\fcprivate.h $*\include\fontconfig
	copy /y $(FONTCONFIG)\fontconfig\fontconfig.h $*\include\fontconfig
# FreeType
	copy /y $(FREETYPE)\src\freetype.lib $*\lib
	if not exist $*\include\freetype mkdir $*\include\freetype
	if not exist $*\include\freetype\config mkdir $*\include\freetype\config
	if not exist $*\include\freetype\internal mkdir $*\include\freetype\internal
	copy /y $(FREETYPE)\include\ft2build.h $*\include
	for %f in ($(freetype_HEADERS)) do copy /y $(FREETYPE)\include\freetype\%f $*\include\freetype
	for %f in ($(freetype_config_HEADERS)) do copy /y $(FREETYPE)\include\freetype\config\%f $*\include\freetype\config
	for %f in ($(freetype_internal_HEADERS)) do copy /y $(FREETYPE)\include\freetype\internal\%f $*\include\freetype\internal
# GDK-Pixbuf
	copy /y $(GDK_PIXBUF)\gdk-pixbuf\gdk_pixbuf-2.0.lib $*\lib
	mkdir $*\include\gdk-pixbuf
	for %f in ($(gdk_pixbuf_HEADERS)) do copy /y $(GDK_PIXBUF)\gdk-pixbuf\%f $*\include\gdk-pixbuf
# GLib
	copy /y $(GLIB)\glib\glib-2.0.lib $*\lib
	copy /y $(GLIB)\gmodule\gmodule-2.0.lib $*\lib
	copy /y $(GLIB)\gthread\gthread-2.0.lib $*\lib
	copy /y $(GLIB)\gobject\gobject-2.0.lib $*\lib
	copy /y $(GLIB)\gio\gio-2.0.lib $*\lib
	copy /y $(GLIB)\glib\glib.h $*\include
	copy /y $(GLIB)\glib\glibconfig.h $*\include
	copy /y $(GLIB)\glib\glib-object.h $*\include
	copy /y $(GLIB)\gmodule\gmodule.h $*\include
	if not exist $*\include\glib mkdir $*\include\glib
	for %f in ($(glib_HEADERS)) do copy /y $(GLIB)\glib\%f $*\include\glib
	if not exist $*\include\glib\deprecated mkdir $*\include\glib\deprecated
	for %f in ($(glib_deprecated_HEADERS)) do copy /y $(GLIB)\glib\deprecated\%f $*\include\glib\deprecated
	if not exist $*\include\gobject mkdir $*\include\gobject
	for %f in ($(gobject_HEADERS)) do copy /y $(GLIB)\gobject\%f $*\include\gobject
	if not exist $*\include\gio mkdir $*\include\gio
	for %f in ($(gio_HEADERS)) do copy /y $(GLIB)\gio\%f $*\include\gio
# GTK+
	copy /y $(GTK)\gdk\gdk-win32-$(GTK_API_VERSION).lib $*\lib
	copy /y $(GTK)\gtk\gtk-win32-$(GTK_API_VERSION).lib $*\lib
	mkdir $*\include\gdk
	mkdir $*\include\gdk\win32
	copy /y $(GTK)\gdk\win32\gdkwin32.h $*\include\gdk
	for %f in ($(gdk_HEADERS)) do copy /y $(GTK)\gdk\%f $*\include\gdk
	for %f in ($(gdkwin32_HEADERS)) do copy /y $(GTK)\gdk\win32\%f $*\include\gdk\win32
	mkdir $*\include\gtk
	for %f in ($(gtk_0_HEADERS)) do copy /y $(GTK)\gtk\%f $*\include\gtk
	for %f in ($(gtk_1_HEADERS)) do copy /y $(GTK)\gtk\%f $*\include\gtk
	if not exist $*\include\gtk\a11y mkdir $*\include\gtk\a11y
	for %f in ($(gtk_a11y_HEADERS)) do copy /y $(GTK)\gtk\a11y\%f $*\include\gtk\a11y
	if not exist $*\include\gtk\deprecated mkdir $*\include\gtk\deprecated
	for %f in ($(gtk_deprecated_HEADERS)) do copy /y $(GTK)\gtk\deprecated\%f $*\include\gtk\deprecated
# harfbuzz
	copy /y $(HARFBUZZ)\src\harfbuzz.lib $*\lib
	for %f in ($(harfbuzz_HEADERS)) do copy /y $(HARFBUZZ)\src\%f $*\include
# iconvmalng
	copy /y $(ICONVMLANG)\iconv.lib $*\lib
	copy /y $(ICONVMLANG)\iconv.h $*\include
	copy /y $(ICONVMLANG)\intl.lib $*\lib
	copy /y $(ICONVMLANG)\libintl.h $*\include
	copy /y $(ICONVMLANG)\msgfmt.exe $*\bin
# JPEG
	copy /y $(JPEG)\libjpeg.lib $*\lib
	copy /y $(JPEG)\jconfig.h $*\include
	copy /y $(JPEG)\jerror.h $*\include
	copy /y $(JPEG)\jmorecfg.h $*\include
	copy /y $(JPEG)\jpeglib.h $*\include
# libffi
	copy /y $(LIBFFI)\src\ffi.lib $*\lib
	copy /y $(LIBFFI)\include\ffi.h $*\include
	copy /y $(LIBFFI)\src\x86\ffitarget.h $*\include
# libpng
	copy /y $(LIBPNG)\libpng15.lib $*\lib
	copy /y $(LIBPNG)\png.h $*\include
	copy /y $(LIBPNG)\pngconf.h $*\include
	copy /y $(LIBPNG)\pnglibconf.h $*\include
# Pango
	copy /y $(PANGO)\pango\pango-1.0.lib $*\lib
	copy /y $(PANGO)\pango\pangoft2-1.0.lib $*\lib
	copy /y $(PANGO)\pango\pangowin32-1.0.lib $*\lib
	copy /y $(PANGO)\pango\pangocairo-1.0.lib $*\lib
	mkdir $*\include\pango
	for %f in ($(pango_HEADERS)) do copy /y $(PANGO)\pango\%f $*\include\pango
# TIFF
	copy /y $(TIFF)\libtiff\libtiff.lib $*\lib
	copy /y $(TIFF)\libtiff\tiff.h $*\include
	copy /y $(TIFF)\libtiff\tiffconf.h $*\include
	copy /y $(TIFF)\libtiff\tiffio.h $*\include
	copy /y $(TIFF)\libtiff\tiffvers.h $*\include
# zlib
	copy /y $(ZLIB)\zdll.lib $*\lib
	copy /y $(ZLIB)\zlib.h $*\include
	copy /y $(ZLIB)\zconf.h $*\include
    7za a -mx9 $@ $*
	rmdir /q /s $*

gtk-$(VERSION).$(RELEASE)-src.zip:
	mkdir $*
	mkdir $*\iwm
	mkdir $*\iwm\config
	mkdir $*\iwm\crt
	mkdir $*\iwm\dirent
	mkdir $*\iwm\fontconfig
	mkdir $*\iwm\libpng
	copy /y atk-$(ATK_VERSION).tar.xz $*
	copy /y $(CAIRO).tar.xz $*
	copy /y $(EXPAT).tar.gz $*
	copy /y $(FONTCONFIG).tar.bz2 $*
	copy /y $(FREETYPE).tar.bz2 $*
	copy /y gdk-pixbuf-$(GDK_PIXBUF_VERSION).tar.xz $*
	copy /y glib-$(GLIB_VERSION).tar.xz $*
	copy /y "gtk+-$(GTK_VERSION).tar.xz" $*
	copy /y $(HARFBUZZ).tar.bz2 $*
	copy /y $(ICONVMLANG).tar.gz $*
	copy /y jpegsrc.v9.tar.gz $*
	copy /y $(LIBFFI).tar.gz $*
	copy /y $(LIBPNG).tar.xz $*
	copy /y pango-$(PANGO_VERSION).tar.xz $*
	copy /y $(PIXMAN).tar.gz $*
	copy /y $(TIFF).tar.gz $*
	copy /y $(ZLIB).tar.xz $*
	copy /y autogen.bat $*
	copy /y Makefile $*
	copy /y README $*
	copy /y iwm\iwm-escape-win32.c $*\iwm
	copy /y iwm\iwm-escape-win32.rc $*\iwm
	copy /y iwm\iwm-fixer-win32.c $*\iwm
	copy /y iwm\iwm-fixer-win32.rc $*\iwm
	copy /y iwm\iwm-forwarding-win32.c $*\iwm
	copy /y iwm\iwm-forwarding-win32.rc $*\iwm
	copy /y iwm\iwm-makedef-win32.c $*\iwm
	copy /y iwm\iwm-makedef-win32.rc $*\iwm
	copy /y iwm\iwm-makegtkwin32css-win32.c $*\iwm
	copy /y iwm\iwm-makegtkwin32css-win32.rc $*\iwm
	copy /y iwm\iwm-maketypefuncs-win32.c $*\iwm
	copy /y iwm\iwm-maketypefuncs-win32.rc $*\iwm
	copy /y iwm\iwm-replace-win32.c $*\iwm
	copy /y iwm\iwm-replace-win32.rc $*\iwm
	copy /y iwm\iwm-runcommand-win32.c $*\iwm
	copy /y iwm\iwm-runcommand-win32.rc $*\iwm
	copy /y iwm\pango-makealiases-win32.c $*\iwm
	copy /y iwm\pango-makealiases-win32.rc $*\iwm
	copy /y iwm\gtklab.ico $*\iwm
	copy /y iwm\config\gdk-pixbuf.loaders $*\iwm\config
	copy /y iwm\config\gtk.immodules $*\iwm\config
	copy /y iwm\config\pango.aliases $*\iwm\config
	copy /y iwm\config\pango.modules $*\iwm\config
	copy /y iwm\crt\iwmcrt.ico $*\iwm\crt
	copy /y iwm\crt\alldiv.asm $*\iwm\crt
	copy /y iwm\crt\alldvrm.asm $*\iwm\crt
	copy /y iwm\crt\allmul.asm $*\iwm\crt
	copy /y iwm\crt\alloca.asm $*\iwm\crt
	copy /y iwm\crt\alloca8.asm $*\iwm\crt
	copy /y iwm\crt\alloca16.asm $*\iwm\crt
	copy /y iwm\crt\allrem.asm $*\iwm\crt
	copy /y iwm\crt\allshl.asm $*\iwm\crt
	copy /y iwm\crt\allshr.asm $*\iwm\crt
	copy /y iwm\crt\aulldiv.asm $*\iwm\crt
	copy /y iwm\crt\aulldvrm.asm $*\iwm\crt
	copy /y iwm\crt\aullrem.asm $*\iwm\crt
	copy /y iwm\crt\aullshr.asm $*\iwm\crt
	copy /y iwm\crt\chkstk.asm $*\iwm\crt
	copy /y iwm\crt\atexit.c $*\iwm\crt
	copy /y iwm\crt\dllmain.c $*\iwm\crt
	copy /y iwm\crt\dllmaincrtstartup.c $*\iwm\crt
	copy /y iwm\crt\fstat32.c $*\iwm\crt
	copy /y iwm\crt\fstat32i64.c $*\iwm\crt
	copy /y iwm\crt\fstat64i32.c $*\iwm\crt
	copy /y iwm\crt\iwmcrt.c $*\iwm\crt
	copy /y iwm\crt\iwmcrt.h $*\iwm\crt
	copy /y iwm\crt\main.c $*\iwm\crt
	copy /y iwm\crt\maincrtstartup.c $*\iwm\crt
	copy /y iwm\crt\onexit.c $*\iwm\crt
	copy /y iwm\crt\report_rangecheckfailure.c $*\iwm\crt
	copy /y iwm\crt\security.c $*\iwm\crt
	copy /y iwm\crt\set_invalid_parameter_handler.c $*\iwm\crt
	copy /y iwm\crt\stat32.c $*\iwm\crt
	copy /y iwm\crt\stat32i64.c $*\iwm\crt
	copy /y iwm\crt\stat64i32.c $*\iwm\crt
	copy /y iwm\crt\tlstable.c $*\iwm\crt
	copy /y iwm\crt\winmaincrtstartup.c $*\iwm\crt
	copy /y iwm\crt\wmaincrtstartup.c $*\iwm\crt
	copy /y iwm\crt\wstat32.c $*\iwm\crt
	copy /y iwm\crt\wstat32i64.c $*\iwm\crt
	copy /y iwm\crt\wstat64i32.c $*\iwm\crt
	copy /y iwm\crt\wwinmaincrtstartup.c $*\iwm\crt
	copy /y iwm\crt\iwmcrt-makedef.c $*\iwm\crt
	copy /y iwm\crt\iwmcrt-makedef.rc $*\iwm\crt
	copy /y iwm\crt\iwmcrt-tlsarray.c $*\iwm\crt
	copy /y iwm\crt\iwmcrt-tlsarray.rc $*\iwm\crt
	copy /y iwm\dirent\dirent.c $*\iwm\dirent
	copy /y iwm\dirent\dirent.h $*\iwm\dirent
	copy /y iwm\dirent\tdirent.c $*\iwm\dirent
	copy /y iwm\dirent\wdirent.c $*\iwm\dirent
	copy /y iwm\fontconfig\unistd.h $*\iwm\fontconfig
	copy /y iwm\libpng\symbols.def.patch $*\iwm\libpng
    7za a -mx9 $@ $*
	rmdir /q /s $*
!endif
