annotate src/zlib-1.2.8/msdos/Makefile.dj2 @ 56:af97cad61ff0

Add updated build of PortAudio for OSX
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 03 Jan 2017 15:10:52 +0000
parents 5ea0608b923f
children
rev   line source
Chris@43 1 # Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96.
Chris@43 2 # Copyright (C) 1995-1998 Jean-loup Gailly.
Chris@43 3 # For conditions of distribution and use, see copyright notice in zlib.h
Chris@43 4
Chris@43 5 # To compile, or to compile and test, type:
Chris@43 6 #
Chris@43 7 # make -fmakefile.dj2; make test -fmakefile.dj2
Chris@43 8 #
Chris@43 9 # To install libz.a, zconf.h and zlib.h in the djgpp directories, type:
Chris@43 10 #
Chris@43 11 # make install -fmakefile.dj2
Chris@43 12 #
Chris@43 13 # after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as
Chris@43 14 # in the sample below if the pattern of the DJGPP distribution is to
Chris@43 15 # be followed. Remember that, while <sp>'es around <=> are ignored in
Chris@43 16 # makefiles, they are *not* in batch files or in djgpp.env.
Chris@43 17 # - - - - -
Chris@43 18 # [make]
Chris@43 19 # INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include
Chris@43 20 # LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib
Chris@43 21 # BUTT=-m486
Chris@43 22 # - - - - -
Chris@43 23 # Alternately, these variables may be defined below, overriding the values
Chris@43 24 # in djgpp.env, as
Chris@43 25 # INCLUDE_PATH=c:\usr\include
Chris@43 26 # LIBRARY_PATH=c:\usr\lib
Chris@43 27
Chris@43 28 CC=gcc
Chris@43 29
Chris@43 30 #CFLAGS=-MMD -O
Chris@43 31 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
Chris@43 32 #CFLAGS=-MMD -g -DDEBUG
Chris@43 33 CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
Chris@43 34 -Wstrict-prototypes -Wmissing-prototypes
Chris@43 35
Chris@43 36 # If cp.exe is available, replace "copy /Y" with "cp -fp" .
Chris@43 37 CP=copy /Y
Chris@43 38 # If gnu install.exe is available, replace $(CP) with ginstall.
Chris@43 39 INSTALL=$(CP)
Chris@43 40 # The default value of RM is "rm -f." If "rm.exe" is found, comment out:
Chris@43 41 RM=del
Chris@43 42 LDLIBS=-L. -lz
Chris@43 43 LD=$(CC) -s -o
Chris@43 44 LDSHARED=$(CC)
Chris@43 45
Chris@43 46 INCL=zlib.h zconf.h
Chris@43 47 LIBS=libz.a
Chris@43 48
Chris@43 49 AR=ar rcs
Chris@43 50
Chris@43 51 prefix=/usr/local
Chris@43 52 exec_prefix = $(prefix)
Chris@43 53
Chris@43 54 OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
Chris@43 55 uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
Chris@43 56
Chris@43 57 OBJA =
Chris@43 58 # to use the asm code: make OBJA=match.o
Chris@43 59
Chris@43 60 TEST_OBJS = example.o minigzip.o
Chris@43 61
Chris@43 62 all: example.exe minigzip.exe
Chris@43 63
Chris@43 64 check: test
Chris@43 65 test: all
Chris@43 66 ./example
Chris@43 67 echo hello world | .\minigzip | .\minigzip -d
Chris@43 68
Chris@43 69 %.o : %.c
Chris@43 70 $(CC) $(CFLAGS) -c $< -o $@
Chris@43 71
Chris@43 72 libz.a: $(OBJS) $(OBJA)
Chris@43 73 $(AR) $@ $(OBJS) $(OBJA)
Chris@43 74
Chris@43 75 %.exe : %.o $(LIBS)
Chris@43 76 $(LD) $@ $< $(LDLIBS)
Chris@43 77
Chris@43 78 # INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
Chris@43 79
Chris@43 80 .PHONY : uninstall clean
Chris@43 81
Chris@43 82 install: $(INCL) $(LIBS)
Chris@43 83 -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH)
Chris@43 84 -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH)
Chris@43 85 $(INSTALL) zlib.h $(INCLUDE_PATH)
Chris@43 86 $(INSTALL) zconf.h $(INCLUDE_PATH)
Chris@43 87 $(INSTALL) libz.a $(LIBRARY_PATH)
Chris@43 88
Chris@43 89 uninstall:
Chris@43 90 $(RM) $(INCLUDE_PATH)\zlib.h
Chris@43 91 $(RM) $(INCLUDE_PATH)\zconf.h
Chris@43 92 $(RM) $(LIBRARY_PATH)\libz.a
Chris@43 93
Chris@43 94 clean:
Chris@43 95 $(RM) *.d
Chris@43 96 $(RM) *.o
Chris@43 97 $(RM) *.exe
Chris@43 98 $(RM) libz.a
Chris@43 99 $(RM) foo.gz
Chris@43 100
Chris@43 101 DEPS := $(wildcard *.d)
Chris@43 102 ifneq ($(DEPS),)
Chris@43 103 include $(DEPS)
Chris@43 104 endif