]>
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 | |
f641dada RD |
20 | !else if "$(FINAL)" == "hybrid" |
21 | CFLAGS=/Od $(CRTFLAG) /GX | |
22 | _CRTFLAG=/MD | |
d604ea33 | 23 | !else |
3156ba6e RD |
24 | CFLAGS=-O2 $(CRTFLAG) /GX |
25 | _CRTFLAG=/MD | |
d604ea33 UJ |
26 | !endif |
27 | ||
3156ba6e RD |
28 | !if "$(CRTFLAG)" == "" |
29 | CRTFLAG=$(_CRTFLAG) | |
30 | !endif | |
31 | ||
32 | ||
c801d85f KB |
33 | CC=cl |
34 | LD=cl | |
35 | LIB=tlib | |
36 | # replace bcc with tcc for Turbo C++ 1.0 | |
37 | LDFLAGS=$(MODEL) | |
38 | O=.obj | |
39 | ||
5fa399c9 | 40 | !if "$(FINAL)" == "1" |
58c55d1f | 41 | LIBTARGET=..\..\lib\zlib.lib |
f641dada RD |
42 | !else if "$(FINAL)" == "hybrid" |
43 | LIBTARGET=..\..\lib\zlibh.lib | |
5fa399c9 JS |
44 | !else |
45 | LIBTARGET=..\..\lib\zlibd.lib | |
46 | !endif | |
c801d85f KB |
47 | |
48 | # variables | |
49 | OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \ | |
3156ba6e | 50 | trees$(O) |
c801d85f | 51 | OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \ |
3156ba6e | 52 | infutil$(O) inffast$(O) |
c801d85f KB |
53 | |
54 | all: $(LIBTARGET) | |
55 | ||
56 | adler32.obj: adler32.c zutil.h zlib.h zconf.h | |
57 | $(CC) -c $(CFLAGS) $*.c | |
58 | ||
59 | compress.obj: compress.c zlib.h zconf.h | |
60 | $(CC) -c $(CFLAGS) $*.c | |
61 | ||
62 | crc32.obj: crc32.c zutil.h zlib.h zconf.h | |
63 | $(CC) -c $(CFLAGS) $*.c | |
64 | ||
65 | deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h | |
66 | $(CC) -c $(CFLAGS) $*.c | |
67 | ||
68 | gzio.obj: gzio.c zutil.h zlib.h zconf.h | |
69 | $(CC) -c $(CFLAGS) $*.c | |
70 | ||
71 | infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\ | |
72 | infcodes.h infutil.h | |
73 | $(CC) -c $(CFLAGS) $*.c | |
74 | ||
75 | infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\ | |
76 | infcodes.h inffast.h | |
77 | $(CC) -c $(CFLAGS) $*.c | |
78 | ||
79 | inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h | |
80 | $(CC) -c $(CFLAGS) $*.c | |
81 | ||
82 | inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h | |
83 | $(CC) -c $(CFLAGS) $*.c | |
84 | ||
85 | infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h | |
86 | $(CC) -c $(CFLAGS) $*.c | |
87 | ||
88 | inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h | |
89 | $(CC) -c $(CFLAGS) $*.c | |
90 | ||
91 | trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h | |
92 | $(CC) -c $(CFLAGS) $*.c | |
93 | ||
94 | uncompr.obj: uncompr.c zlib.h zconf.h | |
95 | $(CC) -c $(CFLAGS) $*.c | |
96 | ||
97 | zutil.obj: zutil.c zutil.h zlib.h zconf.h | |
98 | $(CC) -c $(CFLAGS) $*.c | |
99 | ||
100 | LIBOBJECTS = $(OBJ1) $(OBJ2) | |
101 | ||
102 | $(LIBTARGET): $(LIBOBJECTS) | |
7fee680b | 103 | -erase $(LIBTARGET) |
c801d85f KB |
104 | lib @<< |
105 | -out:$(LIBTARGET) | |
106 | $(LIBOBJECTS) | |
107 | << | |
108 | ||
109 | clean: | |
fbc535ff JS |
110 | -erase *.obj |
111 | -erase *.exe | |
112 | -erase *.sbr | |
113 | -erase $(LIBTARGET) |