Example cross-zlib package.
[fedora-mingw.git] / cross-zlib / zlib-win32.patch
1 diff -rup zlib-1.2.3.orig/win32/Makefile.gcc zlib-1.2.3.new/win32/Makefile.gcc
2 --- zlib-1.2.3.orig/win32/Makefile.gcc  2003-08-01 23:49:00.000000000 -0400
3 +++ zlib-1.2.3.new/win32/Makefile.gcc   2008-09-02 08:24:44.000000000 -0400
4 @@ -45,6 +45,9 @@ ARFLAGS = rcs
5  RC = windres
6  RCFLAGS = --define GCC_WINDRES
7  
8 +DLLWARP = dllwrap
9 +STRIP = strip
10 +
11  CP = cp -fp
12  # If GNU install is available, replace $(CP) with install.
13  INSTALL = $(CP)
14 @@ -79,9 +82,9 @@ $(STATICLIB): $(OBJS) $(OBJA)
15  $(IMPLIB): $(SHAREDLIB)
16  
17  $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
18 -       dllwrap --driver-name $(CC) --def win32/zlib.def \
19 +       $(DLLWRAP) --driver-name $(CC) --def win32/zlib.def \
20           --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
21 -       strip $@
22 +       $(STRIP) $@
23  
24  example: example.o $(STATICLIB)
25         $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
26 @@ -104,12 +107,13 @@ zlibrc.o: win32/zlib1.rc
27  .PHONY: install uninstall clean
28  
29  install: zlib.h zconf.h $(LIB)
30 -       -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
31 -       -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
32 +       -mkdir -p $(INCLUDE_PATH)
33 +       -mkdir -p $(LIBRARY_PATH)
34         -$(INSTALL) zlib.h $(INCLUDE_PATH)
35         -$(INSTALL) zconf.h $(INCLUDE_PATH)
36         -$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
37         -$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
38 +       -$(INSTALL) $(SHAREDLIB) $(BINARY_PATH)
39  
40  uninstall:
41         -$(RM) $(INCLUDE_PATH)/zlib.h