1 | # Makefile for gzip
|
---|
2 | # Microsoft C 5.1 or 6.0.
|
---|
3 |
|
---|
4 | # To use, do "make makefile.msc"
|
---|
5 |
|
---|
6 | # WARNING: the small model is not supported. The compact model is used
|
---|
7 | # here. If you want to use the large model, add -D__LARGE__ to ASFLAGS
|
---|
8 | # Add -DSMALL_MEM to CFLAGS if you wish to reduce the memory
|
---|
9 | # requirements. Add -DNO_ASM to CFLAGS and remove match.obj from OBJI if
|
---|
10 | # you do not have masm.
|
---|
11 |
|
---|
12 | # ------------- Microsoft C 5.1 and later -------------
|
---|
13 | MODEL=-AC
|
---|
14 | FP=
|
---|
15 | CFLAGS=-Ox -nologo $(MODEL)
|
---|
16 | BFLAGS=-Oait -Gs -nologo $(MODEL)
|
---|
17 | # BFLAGS are the 'bug workaround' flags.
|
---|
18 | CC=cl
|
---|
19 | LD=link
|
---|
20 | LDFLAGS=/e/st:0x1000/noe
|
---|
21 | # If you use lzexe as recommended, remove /e from LDFLAGS
|
---|
22 | AS=masm
|
---|
23 | # For MSC 6.0, use: AS=ml
|
---|
24 | ASFLAGS=-ml -t
|
---|
25 | # Add -DDYN_ALLOC to ASFLAGS if you have defined it in tailor.h or CFLAGS
|
---|
26 | LIB = c:\c51\lib
|
---|
27 |
|
---|
28 | # ------------- Common declarations:
|
---|
29 | STRIP=rem
|
---|
30 | # If you don't have lzexe, get it (by ftp on wuarchive.wustl.edu
|
---|
31 | # in /mirrors/msdos/filutl/lzexe91e.zip). Then define:
|
---|
32 | #STRIP=lzexe
|
---|
33 | # Or if you've registered PKLITE, then define:
|
---|
34 | #STRIP=pklite
|
---|
35 | # This makes a big difference in .exe size (and possibly load time)
|
---|
36 |
|
---|
37 | O=.obj
|
---|
38 | OBJA=match$(O) $(LIB)\setargv$(O)
|
---|
39 |
|
---|
40 | # ------------- Used by install rule
|
---|
41 | # set BIN to the directory you want to install the executables to
|
---|
42 | BIN = c:\bin
|
---|
43 |
|
---|
44 | # variables
|
---|
45 | OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
|
---|
46 | util$(O)
|
---|
47 | OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) unlzh$(O) getopt$(O) $(OBJA)
|
---|
48 |
|
---|
49 | gzip.obj: gzip.c gzip.h tailor.h crypt.h revision.h lzw.h
|
---|
50 | $(CC) -c $(CFLAGS) $*.c
|
---|
51 |
|
---|
52 | zip.obj: zip.c gzip.h tailor.h crypt.h
|
---|
53 | $(CC) -c $(CFLAGS) $*.c
|
---|
54 |
|
---|
55 | deflate.obj: deflate.c gzip.h tailor.h
|
---|
56 | $(CC) -c $(CFLAGS) $*.c
|
---|
57 |
|
---|
58 | trees.obj: trees.c gzip.h tailor.h
|
---|
59 | $(CC) -c $(CFLAGS) $*.c
|
---|
60 |
|
---|
61 | bits.obj: bits.c gzip.h tailor.h crypt.h
|
---|
62 | $(CC) -c $(CFLAGS) $*.c
|
---|
63 |
|
---|
64 | unzip.obj: unzip.c gzip.h tailor.h crypt.h
|
---|
65 | $(CC) -c $(CFLAGS) $*.c
|
---|
66 |
|
---|
67 | inflate.obj: inflate.c gzip.h tailor.h
|
---|
68 | $(CC) -c $(CFLAGS) $*.c
|
---|
69 |
|
---|
70 | util.obj: util.c gzip.h tailor.h crypt.h
|
---|
71 | $(CC) -c $(BFLAGS) $*.c
|
---|
72 |
|
---|
73 | crypt.obj: crypt.c gzip.h tailor.h crypt.h
|
---|
74 | $(CC) -c $(CFLAGS) $*.c
|
---|
75 |
|
---|
76 | lzw.obj: lzw.c gzip.h tailor.h
|
---|
77 | $(CC) -c $(CFLAGS) $*.c
|
---|
78 |
|
---|
79 | unlzw.obj: unlzw.c gzip.h tailor.h lzw.h
|
---|
80 | $(CC) -c $(CFLAGS) $*.c
|
---|
81 |
|
---|
82 | unpack.obj: unpack.c gzip.h tailor.h
|
---|
83 | $(CC) -c $(CFLAGS) $*.c
|
---|
84 |
|
---|
85 | unlzh.obj: unlzh.c gzip.h tailor.h
|
---|
86 | $(CC) -c $(BFLAGS) $*.c
|
---|
87 |
|
---|
88 | getopt.obj: getopt.c getopt.h
|
---|
89 | $(CC) -c $(CFLAGS) $*.c
|
---|
90 |
|
---|
91 | match.obj: msdos\match.asm
|
---|
92 | $(AS) $(ASFLAGS) msdos\match, match;
|
---|
93 |
|
---|
94 | # we must cut the command line to fit in the MS/DOS 128 byte limit:
|
---|
95 | gzip.exe: $(OBJ1) $(OBJ2)
|
---|
96 | echo $(OBJ1)+ > gzip.rsp
|
---|
97 | echo $(OBJ2); >> gzip.rsp
|
---|
98 | $(LD) $(LDFLAGS) @gzip.rsp
|
---|
99 | del gzip.rsp
|
---|
100 | $(STRIP) gzip.exe
|
---|
101 |
|
---|
102 | install: gzip.exe
|
---|
103 | copy /b gzip.exe $(BIN)
|
---|
104 | copy /b gzip.exe $(BIN)\gunzip.exe
|
---|
105 |
|
---|
106 | #clean:
|
---|
107 | # del *.obj
|
---|
108 | # del *.exe
|
---|