libpng-1.2.5-win32.patch 1.23 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
diff -ur scripts/makefile.cygwin scripts/makefile.cygwin
--- scripts/makefile.cygwin	2002-10-03 12:32:34.000000000 +0100
+++ scripts/makefile.cygwin	2003-07-25 11:03:42.000000000 +0100
@@ -35,7 +35,7 @@
 # $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency
 # list at the bottom of this makefile.
 
-CC=gcc
+CC=i586-mingw32msvc-gcc
 ifdef MINGW
 MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
 MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
@@ -43,13 +43,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 +94,7 @@
 LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
 
 MKDIR=/bin/mkdir -pv
-RANLIB=ranlib
+RANLIB=i586-mingw32msvc-ranlib
 #RANLIB=echo
 
 INCPATH=$(prefix)/include
@@ -173,7 +173,7 @@
 	$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
 
 $(STATLIB): $(OBJS)
-	ar rc $@ $(OBJS)
+	i586-mingw32msvc-ar rc $@ $(OBJS)
 	$(RANLIB) $@
 
 $(SHAREDDEF): projects/msvc/png32ms.def