Commits

Chris Reuter committed 339b17a

Updated the MSys build files.

The Makefiles and scripts for building under MSYS had rotted a bit. This
change fixes those things.

Comments (0)

Files changed (3)

windows/msys/Makefile

 -DHAVE_ICONV_T_DEF -DHAVE_INTTYPES_H -DHAVE_LIMITS_H -DHAVE_STDDEF_H	\
 -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_VISIBILITY -DICONV_CONST
 
-# GnuWin32 libs are all installed in one place
-GNUINC=-I/c/Progra~1/GnuWin32/include
-GNULIB=-L/c/Progra~1/GnuWin32/lib
+# GnuWin32 libs should all be installed in one place.
+GNUDIR=/c/tools/GnuWin32
+GNUINC=-I$(GNUDIR)/include
+GNULIB=-L$(GNUDIR)/lib
 
 # Various optional components.  Comment-out the ones you don't have
 # and edit the paths and options as needed if you do.  The default
 gdfonts.c gdfontt.c gdft.c gdhelpers.c gdkanji.c gdtables.c gdxpm.c	\
 wbmp.c gd_filter.c gd_nnquant.c gd_rotate.c gd_matrix.c				\
 gd_interpolation.c gd_crop.c webpimg.c gd_webp.c gd_tiff.c gd_tga.c	\
-gd_bmp.c gd_xbm.c gd_color_match.c gd_version.c
+gd_bmp.c gd_xbm.c gd_color_match.c gd_version.c gd_filename.c
 
 OBJ=$(SRC:.c=.o)
 
 	(cd ../../src; rm -f $(TARGET) $(OBJ) $(TARGET_A) deps.mk)
 
 check: all
-	bash run_tests.sh "$(INCLUDES)"
+	bash run_tests.sh "$(GNUDIR)/bin" "$(INCLUDES)"
 
 deps.mk:
 	[ -f gd.h ] # Sanity check: we're in src/, right?

windows/msys/README.MSYS.md

 
 2. Install LibJpeg, LibPng, LibTiff, Zlib and FreeType from
    <http://gnuwin32.sourceforge.net> and install them all in
-   <c:/Program Files/GnuWin32>.  (You can get these libraries from other
+   `c:/tools/GnuWin32/`.  (You can get these libraries from other
    places and/or install them in different locations, but you'll need to
    edit the Makefile accordingly if you do.)
 

windows/msys/run_tests.sh

 set -e
 
 # Parameters
-CFLAGS_EXTRA=$1     # Extra C flags
+DLLPATH_EXTRA=$1        # Path to supporting DLLs
+CFLAGS_EXTRA=$2         # Extra C flags
     
 
 LOG=run_tests.log
 
 CFLAGS="-g -Igdtest/ -I. -I../src/ -D_WIN32 $CFLAGS_EXTRA"
 LDFLAGS='-L../src -llibgd.3.0.1'
-DLLPATH=../src:/c/Progra~1/GnuWin32/bin
+DLLPATH=../src:$DLLPATH_EXTRA
 
 function run_gcc {
     if msg=`gcc $* 2>&1`; then
 }
 
 # Switch to the working directory
-PATH=$PATH:$DLLPATH
+export PATH=$PATH:$DLLPATH
 cd ../../tests
 
 # Initial setup