1*c3423655Schristos# Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98. 2*c3423655Schristos# Copyright (C) 1995-1998 Jean-loup Gailly. 3*c3423655Schristos# For conditions of distribution and use, see copyright notice in zlib.h 4*c3423655Schristos 5*c3423655Schristos# To compile, or to compile and test, type: 6*c3423655Schristos# 7*c3423655Schristos# make -fmakefile.emx; make test -fmakefile.emx 8*c3423655Schristos# 9*c3423655Schristos 10*c3423655SchristosCC=gcc -Zwin32 11*c3423655Schristos 12*c3423655Schristos#CFLAGS=-MMD -O 13*c3423655Schristos#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 14*c3423655Schristos#CFLAGS=-MMD -g -DZLIB_DEBUG 15*c3423655SchristosCFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ 16*c3423655Schristos -Wstrict-prototypes -Wmissing-prototypes 17*c3423655Schristos 18*c3423655Schristos# If cp.exe is available, replace "copy /Y" with "cp -fp" . 19*c3423655SchristosCP=copy /Y 20*c3423655Schristos# If gnu install.exe is available, replace $(CP) with ginstall. 21*c3423655SchristosINSTALL=$(CP) 22*c3423655Schristos# The default value of RM is "rm -f." If "rm.exe" is found, comment out: 23*c3423655SchristosRM=del 24*c3423655SchristosLDLIBS=-L. -lzlib 25*c3423655SchristosLD=$(CC) -s -o 26*c3423655SchristosLDSHARED=$(CC) 27*c3423655Schristos 28*c3423655SchristosINCL=zlib.h zconf.h 29*c3423655SchristosLIBS=zlib.a 30*c3423655Schristos 31*c3423655SchristosAR=ar rcs 32*c3423655Schristos 33*c3423655Schristosprefix=/usr/local 34*c3423655Schristosexec_prefix = $(prefix) 35*c3423655Schristos 36*c3423655SchristosOBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ 37*c3423655Schristos gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o 38*c3423655Schristos 39*c3423655SchristosTEST_OBJS = example.o minigzip.o 40*c3423655Schristos 41*c3423655Schristosall: example.exe minigzip.exe 42*c3423655Schristos 43*c3423655Schristostest: all 44*c3423655Schristos ./example 45*c3423655Schristos echo hello world | .\minigzip | .\minigzip -d 46*c3423655Schristos 47*c3423655Schristos%.o : %.c 48*c3423655Schristos $(CC) $(CFLAGS) -c $< -o $@ 49*c3423655Schristos 50*c3423655Schristoszlib.a: $(OBJS) 51*c3423655Schristos $(AR) $@ $(OBJS) 52*c3423655Schristos 53*c3423655Schristos%.exe : %.o $(LIBS) 54*c3423655Schristos $(LD) $@ $< $(LDLIBS) 55*c3423655Schristos 56*c3423655Schristos 57*c3423655Schristos.PHONY : clean 58*c3423655Schristos 59*c3423655Schristosclean: 60*c3423655Schristos $(RM) *.d 61*c3423655Schristos $(RM) *.o 62*c3423655Schristos $(RM) *.exe 63*c3423655Schristos $(RM) zlib.a 64*c3423655Schristos $(RM) foo.gz 65*c3423655Schristos 66*c3423655SchristosDEPS := $(wildcard *.d) 67*c3423655Schristosifneq ($(DEPS),) 68*c3423655Schristosinclude $(DEPS) 69*c3423655Schristosendif 70