]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | # Makefile for zlib |
2 | # Borland C++ ************ UNTESTED *********** | |
3 | ||
4 | # To use, do "make -fmakefile.bor" | |
5 | ||
6 | # WARNING: the small model is supported but only for small values of | |
7 | # MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory | |
8 | # requirements (default 256K for big objects plus a few K), you can add | |
9 | # to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 | |
10 | # See zconf.h for details about the memory requirements. | |
11 | ||
12 | # ------------- Turbo C++, Borland C++ ------------- | |
d604ea33 UJ |
13 | !ifndef FINAL |
14 | FINAL=0 | |
15 | !endif | |
16 | ||
17 | !if "$(FINAL)" == "0" | |
3156ba6e RD |
18 | CFLAGS=/Od $(CRTFLAG) /GX |
19 | _CRTFLAG=/MDd | |
d604ea33 | 20 | !else |
3156ba6e RD |
21 | CFLAGS=-O2 $(CRTFLAG) /GX |
22 | _CRTFLAG=/MD | |
d604ea33 UJ |
23 | !endif |
24 | ||
3156ba6e RD |
25 | !if "$(CRTFLAG)" == "" |
26 | CRTFLAG=$(_CRTFLAG) | |
27 | !endif | |
28 | ||
29 | ||
c801d85f KB |
30 | CC=cl |
31 | LD=cl | |
32 | LIB=tlib | |
33 | # replace bcc with tcc for Turbo C++ 1.0 | |
34 | LDFLAGS=$(MODEL) | |
35 | O=.obj | |
36 | ||
5fa399c9 | 37 | !if "$(FINAL)" == "1" |
58c55d1f | 38 | LIBTARGET=..\..\lib\zlib.lib |
5fa399c9 JS |
39 | !else |
40 | LIBTARGET=..\..\lib\zlibd.lib | |
41 | !endif | |
c801d85f KB |
42 | |
43 | # variables | |
44 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | |
3156ba6e | 45 | trees$(O) |
c801d85f | 46 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ |
3156ba6e | 47 | infutil$(O) inffast$(O) |
c801d85f KB |
48 | |
49 | all: $(LIBTARGET) | |
50 | ||
51 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | |
52 | $(CC) -c $(CFLAGS) $*.c | |
53 | ||
54 | compress.obj: compress.c zlib.h zconf.h | |
55 | $(CC) -c $(CFLAGS) $*.c | |
56 | ||
57 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | |
58 | $(CC) -c $(CFLAGS) $*.c | |
59 | ||
60 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | |
61 | $(CC) -c $(CFLAGS) $*.c | |
62 | ||
63 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | |
64 | $(CC) -c $(CFLAGS) $*.c | |
65 | ||
66 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | |
67 | infcodes.h infutil.h | |
68 | $(CC) -c $(CFLAGS) $*.c | |
69 | ||
70 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | |
71 | infcodes.h inffast.h | |
72 | $(CC) -c $(CFLAGS) $*.c | |
73 | ||
74 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | |
75 | $(CC) -c $(CFLAGS) $*.c | |
76 | ||
77 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | |
78 | $(CC) -c $(CFLAGS) $*.c | |
79 | ||
80 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | |
81 | $(CC) -c $(CFLAGS) $*.c | |
82 | ||
83 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | |
84 | $(CC) -c $(CFLAGS) $*.c | |
85 | ||
86 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | |
87 | $(CC) -c $(CFLAGS) $*.c | |
88 | ||
89 | uncompr.obj: uncompr.c zlib.h zconf.h | |
90 | $(CC) -c $(CFLAGS) $*.c | |
91 | ||
92 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | |
93 | $(CC) -c $(CFLAGS) $*.c | |
94 | ||
95 | LIBOBJECTS = $(OBJ1) $(OBJ2) | |
96 | ||
97 | $(LIBTARGET): $(LIBOBJECTS) | |
d3fef91f | 98 | -del $(LIBTARGET) |
c801d85f KB |
99 | lib @<< |
100 | -out:$(LIBTARGET) | |
101 | $(LIBOBJECTS) | |
102 | << | |
103 | ||
104 | clean: | |
fbc535ff JS |
105 | -erase *.obj |
106 | -erase *.exe | |
107 | -erase *.sbr | |
108 | -erase $(LIBTARGET) |