1 | # Makefile for gzip
|
---|
2 | # Borland (Turbo) C++.
|
---|
3 | # Warning: this file is not suitable for Turbo C 2.0. In this case, read
|
---|
4 | # then invoke the file doturboc.bat.
|
---|
5 |
|
---|
6 | # To use, do "make -fmakefile.bor"
|
---|
7 |
|
---|
8 | # Turbo C++ 1.0 seems to have a buggy exit() function. You must add
|
---|
9 | # to CFLAGS: -Dexit=_exit
|
---|
10 |
|
---|
11 | # WARNING: the small model is not supported. The compact model is used
|
---|
12 | # here. If you want to use the large model, add -D__LARGE__ to ASFLAGS
|
---|
13 | # Add -DSMALL_MEM to CFLAGS if you wish to reduce the memory
|
---|
14 | # requirements. Add -DNO_ASM to CFLAGS and remove match.obj from OBJA if
|
---|
15 | # you do not have tasm.
|
---|
16 |
|
---|
17 | # ------------- Turbo C++, Borland C++ -------------
|
---|
18 | MODEL=-mc
|
---|
19 | #CFLAGS=-w -w-eff -w-def -w-sig -w-cln -a -d -G -O -Z $(MODEL)
|
---|
20 | CFLAGS=-O2 -Z $(MODEL)
|
---|
21 | CC=bcc
|
---|
22 | LD=bcc
|
---|
23 | # replace bcc with tcc for Turbo C++ 1.0
|
---|
24 | LDFLAGS=$(MODEL)
|
---|
25 | AS=tasm
|
---|
26 | ASFLAGS=-ml -t -DDYN_ALLOC -DSS_NEQ_DS
|
---|
27 | LIB = c:\bcc\lib
|
---|
28 |
|
---|
29 | # ------------- Common declarations:
|
---|
30 | STRIP=rem
|
---|
31 | # If you don't have lzexe, get it (by ftp on wuarchive.wustl.edu
|
---|
32 | # in /mirrors/msdos/filutl/lzexe91e.zip). Then define:
|
---|
33 | #STRIP=lzexe
|
---|
34 | # Or if you've registered PKLITE, then define:
|
---|
35 | #STRIP=pklite
|
---|
36 | # This makes a big difference in .exe size (and possibly load time)
|
---|
37 |
|
---|
38 | O=.obj
|
---|
39 | OBJA=match$(O) tailor$(O) $(LIB)\wildargs.obj
|
---|
40 |
|
---|
41 | # ------------- Used by install rule
|
---|
42 | # set BIN to the directory you want to install the executables to
|
---|
43 | BIN = c:\bin
|
---|
44 |
|
---|
45 | # variables
|
---|
46 | OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
|
---|
47 | util$(O)
|
---|
48 | OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) unlzh$(O) getopt$(O) $(OBJA)
|
---|
49 |
|
---|
50 | all: gzip.exe
|
---|
51 |
|
---|
52 | gzip.obj: gzip.c gzip.h tailor.h crypt.h revision.h lzw.h
|
---|
53 | $(CC) -c $(CFLAGS) $*.c
|
---|
54 |
|
---|
55 | zip.obj: zip.c gzip.h tailor.h crypt.h
|
---|
56 | $(CC) -c $(CFLAGS) $*.c
|
---|
57 |
|
---|
58 | deflate.obj: deflate.c gzip.h tailor.h
|
---|
59 | $(CC) -c $(CFLAGS) $*.c
|
---|
60 |
|
---|
61 | trees.obj: trees.c gzip.h tailor.h
|
---|
62 | $(CC) -c $(CFLAGS) $*.c
|
---|
63 |
|
---|
64 | bits.obj: bits.c gzip.h tailor.h crypt.h
|
---|
65 | $(CC) -c $(CFLAGS) $*.c
|
---|
66 |
|
---|
67 | unzip.obj: unzip.c gzip.h tailor.h crypt.h
|
---|
68 | $(CC) -c $(CFLAGS) $*.c
|
---|
69 |
|
---|
70 | inflate.obj: inflate.c gzip.h tailor.h
|
---|
71 | $(CC) -c $(CFLAGS) $*.c
|
---|
72 |
|
---|
73 | util.obj: util.c gzip.h tailor.h crypt.h
|
---|
74 | $(CC) -c $(CFLAGS) $*.c
|
---|
75 |
|
---|
76 | crypt.obj: crypt.c gzip.h tailor.h crypt.h
|
---|
77 | $(CC) -c $(CFLAGS) $*.c
|
---|
78 |
|
---|
79 | lzw.obj: lzw.c gzip.h tailor.h
|
---|
80 | $(CC) -c $(CFLAGS) $*.c
|
---|
81 |
|
---|
82 | unlzw.obj: unlzw.c gzip.h tailor.h lzw.h
|
---|
83 | $(CC) -c $(CFLAGS) $*.c
|
---|
84 |
|
---|
85 | unpack.obj: unpack.c gzip.h tailor.h
|
---|
86 | $(CC) -c $(CFLAGS) $*.c
|
---|
87 |
|
---|
88 | unlzh.obj: unlzh.c gzip.h tailor.h
|
---|
89 | $(CC) -c $(CFLAGS) $*.c
|
---|
90 |
|
---|
91 | tailor.obj: msdos\tailor.c gzip.h tailor.h
|
---|
92 | $(CC) -c $(CFLAGS) msdos\$*.c
|
---|
93 |
|
---|
94 | getopt.obj: getopt.c getopt.h
|
---|
95 | $(CC) -c $(CFLAGS) $*.c
|
---|
96 |
|
---|
97 | match.obj: msdos\match.asm
|
---|
98 | $(AS) $(ASFLAGS) msdos\match, match;
|
---|
99 |
|
---|
100 | # we must cut the command line to fit in the MS/DOS 128 byte limit:
|
---|
101 | gzip.exe: $(OBJ1) $(OBJ2)
|
---|
102 | echo $(OBJ1) > gzip.rsp
|
---|
103 | echo $(OBJ2) >> gzip.rsp
|
---|
104 | $(LD) $(LDFLAGS) @gzip.rsp
|
---|
105 | del gzip.rsp
|
---|
106 | $(STRIP) gzip.exe
|
---|
107 | # If you use Borland make, you can use instead:
|
---|
108 | # $(LD) $(LDFLAGS) @&&|
|
---|
109 | #$**
|
---|
110 | #|
|
---|
111 |
|
---|
112 | install: gzip.exe
|
---|
113 | copy /b gzip.exe $(BIN)
|
---|
114 | copy /b gzip.exe $(BIN)\gunzip.exe
|
---|
115 |
|
---|
116 | clean:
|
---|
117 | del *.obj
|
---|
118 | del *.exe
|
---|