summaryrefslogtreecommitdiff
path: root/win32/Makefile.gcc
diff options
context:
space:
mode:
Diffstat (limited to 'win32/Makefile.gcc')
-rw-r--r--win32/Makefile.gcc15
1 files changed, 13 insertions, 2 deletions
diff --git a/win32/Makefile.gcc b/win32/Makefile.gcc
index 7f9973b..da32859 100644
--- a/win32/Makefile.gcc
+++ b/win32/Makefile.gcc
@@ -16,7 +16,7 @@
16# 16#
17 17
18LIB = libz.a 18LIB = libz.a
19SHAREDLIB = libz.so 19SHAREDLIB = zlib.dll
20VER = 1.2.0 20VER = 1.2.0
21 21
22CC = gcc 22CC = gcc
@@ -32,6 +32,8 @@ LDFLAGS = $(LOC) -s
32AR = ar 32AR = ar
33ARFLAGS = rcs 33ARFLAGS = rcs
34 34
35RC = windres
36
35CP = cp -fp 37CP = cp -fp
36# If GNU install is available, replace $(CP) with install. 38# If GNU install is available, replace $(CP) with install.
37INSTALL = $(CP) 39INSTALL = $(CP)
@@ -43,12 +45,14 @@ exec_prefix = $(prefix)
43OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \ 45OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \
44 inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o 46 inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
45 47
48DLLDEF = win32/zlibgcc.def
49
46# to use the asm code: make OBJA=match.o 50# to use the asm code: make OBJA=match.o
47OBJA = 51OBJA =
48 52
49TEST_OBJS = example.o minigzip.o 53TEST_OBJS = example.o minigzip.o
50 54
51all: $(LIB) example minigzip 55all: $(LIB) $(SHAREDLIB) example minigzip
52 56
53test: all 57test: all
54 ./example 58 ./example
@@ -60,12 +64,18 @@ test: all
60libz.a: $(OBJS) 64libz.a: $(OBJS)
61 $(AR) $(ARFLAGS) $@ $(OBJS) 65 $(AR) $(ARFLAGS) $@ $(OBJS)
62 66
67$(SHAREDLIB): $(OBJS) $(DLLDEF) zlibrc.o
68 dllwrap --driver-name $(CC) --def $(DLLDEF) -o $@ $(OBJS) zlibrc.o
69
63example: example.o $(LIB) 70example: example.o $(LIB)
64 $(LD) -o $@ $< $(LIB) 71 $(LD) -o $@ $< $(LIB)
65 72
66minigzip: minigzip.o $(LIB) 73minigzip: minigzip.o $(LIB)
67 $(LD) -o $@ $< $(LIB) 74 $(LD) -o $@ $< $(LIB)
68 75
76zlibrc.o: win32/zlib.rc
77 -$(RC) -o $@ --define GCC_WINDRES win32/zlib.rc
78
69 79
70# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env . 80# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
71 81
@@ -87,6 +97,7 @@ clean:
87 $(RM) *.o 97 $(RM) *.o
88 $(RM) *.exe 98 $(RM) *.exe
89 $(RM) libz.a 99 $(RM) libz.a
100 $(RM) zlib.dll
90 $(RM) foo.gz 101 $(RM) foo.gz
91 102
92adler32.o: zlib.h zconf.h 103adler32.o: zlib.h zconf.h