2 # Microsoft C 5.1 or 6.0.
4 # To use, do "make makefile.msc"
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.
12 # ------------- Microsoft C 5.1 and later -------------
15 CFLAGS=-Ox -nologo $(MODEL)
16 BFLAGS=-Oait -Gs -nologo $(MODEL)
17 # BFLAGS are the 'bug workaround' flags.
20 LDFLAGS=/e/st:0x1000/noe
21 # If you use lzexe as recommended, remove /e from LDFLAGS
23 # For MSC 6.0, use: AS=ml
25 # Add -DDYN_ALLOC to ASFLAGS if you have defined it in tailor.h or CFLAGS
28 # ------------- Common declarations:
30 # If you don't have lzexe, get it (by ftp on wuarchive.wustl.edu
31 # in /mirrors/msdos/filutl/lzexe91e.zip). Then define:
33 # Or if you've registered PKLITE, then define:
35 # This makes a big difference in .exe size (and possibly load time)
38 OBJA=match$(O) $(LIB)\setargv$(O)
40 # ------------- Used by install rule
41 # set BIN to the directory you want to install the executables to
45 OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
47 OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) unlzh$(O) getopt$(O) $(OBJA)
49 gzip.obj: gzip.c gzip.h tailor.h crypt.h revision.h lzw.h
50 $(CC) -c $(CFLAGS) $*.c
52 zip.obj: zip.c gzip.h tailor.h crypt.h
53 $(CC) -c $(CFLAGS) $*.c
55 deflate.obj: deflate.c gzip.h tailor.h
56 $(CC) -c $(CFLAGS) $*.c
58 trees.obj: trees.c gzip.h tailor.h
59 $(CC) -c $(CFLAGS) $*.c
61 bits.obj: bits.c gzip.h tailor.h crypt.h
62 $(CC) -c $(CFLAGS) $*.c
64 unzip.obj: unzip.c gzip.h tailor.h crypt.h
65 $(CC) -c $(CFLAGS) $*.c
67 inflate.obj: inflate.c gzip.h tailor.h
68 $(CC) -c $(CFLAGS) $*.c
70 util.obj: util.c gzip.h tailor.h crypt.h
71 $(CC) -c $(BFLAGS) $*.c
73 crypt.obj: crypt.c gzip.h tailor.h crypt.h
74 $(CC) -c $(CFLAGS) $*.c
76 lzw.obj: lzw.c gzip.h tailor.h
77 $(CC) -c $(CFLAGS) $*.c
79 unlzw.obj: unlzw.c gzip.h tailor.h lzw.h
80 $(CC) -c $(CFLAGS) $*.c
82 unpack.obj: unpack.c gzip.h tailor.h
83 $(CC) -c $(CFLAGS) $*.c
85 unlzh.obj: unlzh.c gzip.h tailor.h
86 $(CC) -c $(BFLAGS) $*.c
88 getopt.obj: getopt.c getopt.h
89 $(CC) -c $(CFLAGS) $*.c
91 match.obj: msdos\match.asm
92 $(AS) $(ASFLAGS) msdos\match, match;
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
103 copy /b gzip.exe $(BIN)
104 copy /b gzip.exe $(BIN)\gunzip.exe