summaryrefslogtreecommitdiff
path: root/win32/Makefile.gcc
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:21:57 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:21:57 -0700
commit13a294f044ef0a89b2dcbfbb5d4d4c792673348e (patch)
treed9b377b4d8c00633c3da4e96659bfba9b08287f2 /win32/Makefile.gcc
parent7c2a874e50b871d04fbd19501f7b42cff55e5abc (diff)
downloadzlib-1.2.0.1.tar.gz
zlib-1.2.0.1.tar.bz2
zlib-1.2.0.1.zip
zlib 1.2.0.1v1.2.0.1
Diffstat (limited to 'win32/Makefile.gcc')
-rw-r--r--win32/Makefile.gcc105
1 files changed, 105 insertions, 0 deletions
diff --git a/win32/Makefile.gcc b/win32/Makefile.gcc
new file mode 100644
index 0000000..7f9973b
--- /dev/null
+++ b/win32/Makefile.gcc
@@ -0,0 +1,105 @@
1# Makefile for zlib, derived from Makefile.dj2.
2# Modified for mingw32 by C. Spieler, 6/16/98.
3# Updated for zlib-1.2.x by Cosmin Truta, 11-Mar-2003.
4# Tested under Cygwin and MinGW.
5
6# Copyright (C) 1995-1998 Jean-loup Gailly.
7# For conditions of distribution and use, see copyright notice in zlib.h
8
9# To compile, or to compile and test, type:
10#
11# make -fmakefile.gcc; make test -fmakefile.gcc
12#
13# To install libz.a, zconf.h and zlib.h in the system directories, type:
14#
15# make install -fmakefile.gcc
16#
17
18LIB = libz.a
19SHAREDLIB = libz.so
20VER = 1.2.0
21
22CC = gcc
23#CFLAGS = -DDEBUG -MMD -g
24CFLAGS = $(LOC) -O3 -Wall
25
26AS = $(CC)
27ASFLAGS = $(LOC) -Wall
28
29LD = $(CC)
30LDFLAGS = $(LOC) -s
31
32AR = ar
33ARFLAGS = rcs
34
35CP = cp -fp
36# If GNU install is available, replace $(CP) with install.
37INSTALL = $(CP)
38RM = rm -f
39
40prefix = /usr/local
41exec_prefix = $(prefix)
42
43OBJS = 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
45
46# to use the asm code: make OBJA=match.o
47OBJA =
48
49TEST_OBJS = example.o minigzip.o
50
51all: $(LIB) example minigzip
52
53test: all
54 ./example
55 echo hello world | ./minigzip | ./minigzip -d
56
57.c.o:
58 $(CC) $(CFLAGS) -c -o $@ $<
59
60libz.a: $(OBJS)
61 $(AR) $(ARFLAGS) $@ $(OBJS)
62
63example: example.o $(LIB)
64 $(LD) -o $@ $< $(LIB)
65
66minigzip: minigzip.o $(LIB)
67 $(LD) -o $@ $< $(LIB)
68
69
70# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
71
72.PHONY : uninstall clean
73
74install: zlib.h zconf.h $(LIB)
75 -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
76 -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
77 $(INSTALL) zlib.h $(INCLUDE_PATH)
78 $(INSTALL) zconf.h $(INCLUDE_PATH)
79 $(INSTALL) $(LIB) $(LIBRARY_PATH)
80
81uninstall:
82 $(RM) $(INCLUDE_PATH)/zlib.h
83 $(RM) $(INCLUDE_PATH)/zconf.h
84 $(RM) $(LIBRARY_PATH)/libz.a
85
86clean:
87 $(RM) *.o
88 $(RM) *.exe
89 $(RM) libz.a
90 $(RM) foo.gz
91
92adler32.o: zlib.h zconf.h
93compress.o: zlib.h zconf.h
94crc32.o: crc32.h zlib.h zconf.h
95deflate.o: deflate.h zutil.h zlib.h zconf.h
96example.o: zlib.h zconf.h
97gzio.o: zutil.h zlib.h zconf.h
98inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
99inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
100infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
101inftrees.o: zutil.h zlib.h zconf.h inftrees.h
102minigzip.o: zlib.h zconf.h
103trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
104uncompr.o: zlib.h zconf.h
105zutil.o: zutil.h zlib.h zconf.h