summaryrefslogtreecommitdiff
path: root/nt/Makefile.gcc
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:20:29 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:20:29 -0700
commit14763ac7c6c03bca62c39e35c03cf5bfc7728802 (patch)
treef1055d11ef7b282b698ce7c40e1a9c061413cbdf /nt/Makefile.gcc
parentc34c1fcbb19852ca35216ad66276f4f86af3fc22 (diff)
downloadzlib-1.1.3.tar.gz
zlib-1.1.3.tar.bz2
zlib-1.1.3.zip
zlib 1.1.3v1.1.3
Diffstat (limited to 'nt/Makefile.gcc')
-rw-r--r--nt/Makefile.gcc87
1 files changed, 87 insertions, 0 deletions
diff --git a/nt/Makefile.gcc b/nt/Makefile.gcc
new file mode 100644
index 0000000..cdd652f
--- /dev/null
+++ b/nt/Makefile.gcc
@@ -0,0 +1,87 @@
1# Makefile for zlib. Modified for mingw32 by C. Spieler, 6/16/98.
2# (This Makefile is directly derived from Makefile.dj2)
3# Copyright (C) 1995-1998 Jean-loup Gailly.
4# For conditions of distribution and use, see copyright notice in zlib.h
5
6# To compile, or to compile and test, type:
7#
8# make -fmakefile.gcc; make test -fmakefile.gcc
9#
10# To install libz.a, zconf.h and zlib.h in the mingw32 directories, type:
11#
12# make install -fmakefile.gcc
13#
14
15CC=gcc
16
17#CFLAGS=-MMD -O
18#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
19#CFLAGS=-MMD -g -DDEBUG
20CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
21 -Wstrict-prototypes -Wmissing-prototypes
22
23# If cp.exe is available, replace "copy /Y" with "cp -fp" .
24CP=copy /Y
25# If gnu install.exe is available, replace $(CP) with ginstall.
26INSTALL=$(CP)
27# The default value of RM is "rm -f." If "rm.exe" is found, comment out:
28RM=del
29LDLIBS=-L. -lz
30LD=$(CC) -s -o
31LDSHARED=$(CC)
32
33INCL=zlib.h zconf.h
34LIBS=libz.a
35
36AR=ar rcs
37
38prefix=/usr/local
39exec_prefix = $(prefix)
40
41OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
42 zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
43
44TEST_OBJS = example.o minigzip.o
45
46all: example.exe minigzip.exe
47
48test: all
49 ./example
50 echo hello world | .\minigzip | .\minigzip -d
51
52%.o : %.c
53 $(CC) $(CFLAGS) -c $< -o $@
54
55libz.a: $(OBJS)
56 $(AR) $@ $(OBJS)
57
58%.exe : %.o $(LIBS)
59 $(LD) $@ $< $(LDLIBS)
60
61# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
62
63.PHONY : uninstall clean
64
65install: $(INCL) $(LIBS)
66 -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH)
67 -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH)
68 $(INSTALL) zlib.h $(INCLUDE_PATH)
69 $(INSTALL) zconf.h $(INCLUDE_PATH)
70 $(INSTALL) libz.a $(LIBRARY_PATH)
71
72uninstall:
73 $(RM) $(INCLUDE_PATH)\zlib.h
74 $(RM) $(INCLUDE_PATH)\zconf.h
75 $(RM) $(LIBRARY_PATH)\libz.a
76
77clean:
78 $(RM) *.d
79 $(RM) *.o
80 $(RM) *.exe
81 $(RM) libz.a
82 $(RM) foo.gz
83
84DEPS := $(wildcard *.d)
85ifneq ($(DEPS),)
86include $(DEPS)
87endif