summaryrefslogtreecommitdiff
path: root/Makefile.dj2
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.dj2')
-rw-r--r--Makefile.dj279
1 files changed, 79 insertions, 0 deletions
diff --git a/Makefile.dj2 b/Makefile.dj2
new file mode 100644
index 0000000..82f55ea
--- /dev/null
+++ b/Makefile.dj2
@@ -0,0 +1,79 @@
1# Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96.
2# Copyright (C) 1995-1996 Jean-loup Gailly.
3# For conditions of distribution and use, see copyright notice in zlib.h
4
5# To compile and test, type:
6# make -fmakefile.dj2; make test -fmakefile.dj2
7
8# To install libz.a, zconf.h and zlib.h in the djgpp directories, type:
9# make install -fmakefile.dj2
10# after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env for [make].
11# Alternately these variables may be defined below.
12
13CC=gcc
14
15#CFLAGS=-MMD -O
16#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
17#CFLAGS=-MMD -g -DDEBUG
18CFLAGS=-MMD -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
19 -Wstrict-prototypes -Wmissing-prototypes
20INSTALL=install
21LDLIBS=-L. -lz
22LD=$(CC) -s -o
23LDSHARED=$(CC)
24
25VER=1.0
26LIBS=libz.a
27
28AR=ar rcs
29# The default value of RM is "rm -f." If "rm.exe" is not found, uncomment:
30# RM=del
31
32prefix=/usr/local
33exec_prefix = $(prefix)
34
35OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
36 zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
37
38TEST_OBJS = example.o minigzip.o
39
40DISTFILES = README Change.Log configur Makefile.in Makefile Makefile.msc \
41 Makefile.bor Makefile.tc Make_vms.com descrip.mms zlib099.pat \
42 *.bak *.old *.[ch]
43
44all: example.exe minigzip.exe
45
46test: all
47 ./example
48 echo hello world | .\minigzip | .\minigzip -d
49
50%.o : %.c
51 $(CC) $(CFLAGS) -c $< -o $@
52
53libz.a: $(OBJS)
54 $(AR) $@ $(OBJS)
55
56libz.so.$(VER): $(OBJS)
57 $(LDSHARED) -o $@ $(OBJS)
58 rm -f libz.so; ln -s $@ libz.so
59
60%.exe : %.o $(LIBS)
61 $(LD) $@ $< $(LDLIBS)
62
63# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env
64
65install: $(LIBS)
66 $(INSTALL) zlib.h zconf.h $(INCLUDE_PATH)
67 $(INSTALL) $(LIBS) $(LIBRARY_PATH)
68
69uninstall:
70 $(RM) $(LIBRARY_PATH)/$(LIBS)
71 $(RM) $(INCLUDE_PATH)/zlib.h $(INCLUDE_PATH)/zconf.h
72
73clean:
74 $(RM) *.d *.o *.~ *.exe libz.a libz.so* foo.gz
75
76DEPS := $(wildcard *.d)
77ifneq ($(DEPS),)
78include $(DEPS)
79endif