--- scripts/makefile.cygwin	2004-12-03 00:14:31.000000000 +0000
+++ scripts/makefile.cygwin	2006-04-09 17:56:32.203125000 +0100
@@ -35,7 +35,6 @@
 # $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency
 # list at the bottom of this makefile.
 
-CC=gcc
 ifdef MINGW
 MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
 MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
@@ -43,13 +42,12 @@
 
 # Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
 ifndef prefix
-prefix=/usr
-$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
+prefix=??PREFIX??
 endif
 
 # Where the zlib library and include files are located
-ZLIBLIB= /usr/lib
-ZLIBINC=
+ZLIBLIB= ??PREFIX??/lib
+ZLIBINC= ??PREFIX??/include
 #ZLIBLIB=../zlib
 #ZLIBINC=../zlib
 
@@ -94,7 +92,9 @@
 LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
 
 MKDIR=/bin/mkdir -pv
+ifndef RANLIB
 RANLIB=ranlib
+endif
 #RANLIB=echo
 
 INCPATH=$(prefix)/include
@@ -173,10 +173,10 @@
 	$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
 
 $(STATLIB): $(OBJS)
-	ar rc $@ $(OBJS)
+	$(AR) rc $@ $(OBJS)
 	$(RANLIB) $@
 
-$(SHAREDDEF): scripts/png32ms.def
+$(SHAREDDEF): scripts/pngw32.def
 	cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
 	sed -e 's/\([^;]*\);/;/' > $@
 
