1 # Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96.
2 # Copyright (C) 1995-1998 Jean-loup Gailly.
3 # For conditions of distribution and use, see copyright notice in zlib.h
5 # To compile, or to compile and test, type:
7 # make -fmakefile.dj2; make test -fmakefile.dj2
9 # To install libz.a, zconf.h and zlib.h in the djgpp directories, type:
11 # make install -fmakefile.dj2
13 # after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as
14 # in the sample below if the pattern of the DJGPP distribution is to
15 # be followed. Remember that, while <sp>'es around <=> are ignored in
16 # makefiles, they are *not* in batch files or in djgpp.env.
19 # INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include
20 # LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib
23 # Alternately, these variables may be defined below, overriding the values
25 # INCLUDE_PATH=c:\usr\include
26 # LIBRARY_PATH=c:\usr\lib
31 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
32 #CFLAGS=-MMD -g -DDEBUG
33 CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
34 -Wstrict-prototypes -Wmissing-prototypes
36 # If cp.exe is available, replace "copy /Y" with "cp -fp" .
38 # If gnu install.exe is available, replace $(CP) with ginstall.
40 # The default value of RM is "rm -f." If "rm.exe" is found, comment out:
52 exec_prefix = $(prefix)
54 OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
55 uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
58 # to use the asm code: make OBJA=match.o
60 TEST_OBJS = example.o minigzip.o
62 all: example.exe minigzip.exe
67 echo hello world | .\minigzip | .\minigzip -d
70 $(CC) $(CFLAGS) -c $< -o $@
72 libz.a: $(OBJS) $(OBJA)
73 $(AR) $@ $(OBJS) $(OBJA)
78 # INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
80 .PHONY : uninstall clean
82 install: $(INCL) $(LIBS)
83 -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH)
84 -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH)
85 $(INSTALL) zlib.h $(INCLUDE_PATH)
86 $(INSTALL) zconf.h $(INCLUDE_PATH)
87 $(INSTALL) libz.a $(LIBRARY_PATH)
90 $(RM) $(INCLUDE_PATH)\zlib.h
91 $(RM) $(INCLUDE_PATH)\zconf.h
92 $(RM) $(LIBRARY_PATH)\libz.a
101 DEPS := $(wildcard *.d)