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