Cannot compile SDL_image with MinGW

Hi,

I use Windows Vista 32bit, Git Bash (a variant of MSYS, I believe) and MinGW with GCC 4.7.2.
I was able to compile SDL, but SDL_image stucks at:

Code:

Starry Abyss at STARRY-NB /e/build/SDL_image-1.2.12
$ make
C:/Git/bin/sh.exe ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME="" -D
PACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGR
EPORT="" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDL
IB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=
1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=".libs/" -DPACKAGE=“SDL_ima
ge” -DVERSION=“1.2.12” -DLOAD_JPG=1 -DLOAD_PNG=1 -DLOAD_BMP=1 -DLOAD_GIF=1 -D
LOAD_LBM=1 -DLOAD_PCX=1 -DLOAD_PNM=1 -DLOAD_TGA=1 -DLOAD_XCF=1 -DLOAD_XPM=1 -DLO
AD_XV=1 -I. -I/c/MinGW/CUSTOM/include -g -O2 -I/c/MinGW/CUSTOM/include/SDL -D
_GNU_SOURCE=1 -Dmain=SDL_main -MT IMG.lo -MD -MP -MF .deps/IMG.Tpo -c -o IMG.lo
IMG.c
XIMG.Tpo -c -o IMG.lo IMG.lo
libtool: compile: warning: libobj name IMG.Tpo -c -o IMG.lo IMG.lo' may not con tain shell special characters. rm: invalid option -- c Tryrm --help’ for more information.
libtool: compile: gcc “-DPACKAGE_NAME=\” -DPACKAGE_TARNAME="" -DPACKAGE_VER
SION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DSTDC_HEADERS=1 -DHAVE
SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_ME
MORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD

H=1 -DLT_OBJDIR=".libs/" -DPACKAGE=“SDL_image” -DVERSION=“1.2.12” -DLOAD_J
PG=1 -DLOAD_PNG=1 -DLOAD_BMP=1 -DLOAD_GIF=1 -DLOAD_LBM=1 -DLOAD_PCX=1 -DLOAD_PNM
=1 -DLOAD_TGA=1 -DLOAD_XCF=1 -DLOAD_XPM=1 -DLOAD_XV=1 -I. -I/c/MinGW/CUSTOM/incl
ude -g -O2 -I/c/MinGW/CUSTOM/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -MT IMG
.lo -MD -MP -MF .deps/IMG.Tpo -c -o IMG.lo IMG.c" -DDLL_EXPORT -DPIC -o .libs/I
MG.Tpo -c -o IMG.lo IMG.o
gcc.exe: error: IMG.o: No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
make: *** [IMG.lo] Error 1

Any idea?

P.S. I now use VS on win32 platform, but still curious, what am I doing wrong with MinGW

Code: