diff options
Diffstat (limited to 'Makefile.dj2')
-rw-r--r-- | Makefile.dj2 | 79 |
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 | |||
13 | CC=gcc | ||
14 | |||
15 | #CFLAGS=-MMD -O | ||
16 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | ||
17 | #CFLAGS=-MMD -g -DDEBUG | ||
18 | CFLAGS=-MMD -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | ||
19 | -Wstrict-prototypes -Wmissing-prototypes | ||
20 | INSTALL=install | ||
21 | LDLIBS=-L. -lz | ||
22 | LD=$(CC) -s -o | ||
23 | LDSHARED=$(CC) | ||
24 | |||
25 | VER=1.0 | ||
26 | LIBS=libz.a | ||
27 | |||
28 | AR=ar rcs | ||
29 | # The default value of RM is "rm -f." If "rm.exe" is not found, uncomment: | ||
30 | # RM=del | ||
31 | |||
32 | prefix=/usr/local | ||
33 | exec_prefix = $(prefix) | ||
34 | |||
35 | OBJS = 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 | |||
38 | TEST_OBJS = example.o minigzip.o | ||
39 | |||
40 | DISTFILES = 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 | |||
44 | all: example.exe minigzip.exe | ||
45 | |||
46 | test: all | ||
47 | ./example | ||
48 | echo hello world | .\minigzip | .\minigzip -d | ||
49 | |||
50 | %.o : %.c | ||
51 | $(CC) $(CFLAGS) -c $< -o $@ | ||
52 | |||
53 | libz.a: $(OBJS) | ||
54 | $(AR) $@ $(OBJS) | ||
55 | |||
56 | libz.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 | |||
65 | install: $(LIBS) | ||
66 | $(INSTALL) zlib.h zconf.h $(INCLUDE_PATH) | ||
67 | $(INSTALL) $(LIBS) $(LIBRARY_PATH) | ||
68 | |||
69 | uninstall: | ||
70 | $(RM) $(LIBRARY_PATH)/$(LIBS) | ||
71 | $(RM) $(INCLUDE_PATH)/zlib.h $(INCLUDE_PATH)/zconf.h | ||
72 | |||
73 | clean: | ||
74 | $(RM) *.d *.o *.~ *.exe libz.a libz.so* foo.gz | ||
75 | |||
76 | DEPS := $(wildcard *.d) | ||
77 | ifneq ($(DEPS),) | ||
78 | include $(DEPS) | ||
79 | endif | ||