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
6 # To compile, or to compile and test, type:
8 # make -fmakefile.gcc; make test -fmakefile.gcc
10 # To install libz.a, zconf.h and zlib.h in the mingw32 directories, type:
12 # make install -fmakefile.gcc
18 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
19 #CFLAGS=-MMD -g -DDEBUG
20 CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
21 -Wstrict-prototypes -Wmissing-prototypes
23 # If cp.exe is available, replace "copy /Y" with "cp -fp" .
25 # If gnu install.exe is available, replace $(CP) with ginstall.
27 # The default value of RM is "rm -f." If "rm.exe" is found, comment out:
39 exec_prefix = $(prefix)
41 OBJS = 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
44 TEST_OBJS = example.o minigzip.o
46 all: example.exe minigzip.exe
50 echo hello world | .\minigzip | .\minigzip -d
53 $(CC) $(CFLAGS) -c $< -o $@
61 # INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
63 .PHONY : uninstall clean
65 install: $(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)
73 $(RM) $(INCLUDE_PATH)\zlib.h
74 $(RM) $(INCLUDE_PATH)\zconf.h
75 $(RM) $(LIBRARY_PATH)\libz.a
84 DEPS := $(wildcard *.d)