annotate src/zlib-1.2.7/msdos/Makefile.dj2 @ 169:223a55898ab9 tip default

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