home *** CD-ROM | disk | FTP | other *** search
- # Makefile for UnZip and fUnZip for Turbo C++ 1.0 and Borland C++ 2.x/3.0
- # Version: 5.1 and later Alvin Koh
- #
- # Last revised: 6 Feb 94
-
-
- # for Turbo C++ uncomment these and comment out the bcc lines:
- #CC = tcc
- #TLINK = tlink
-
- # for Borland C++ uncomment these and comment out the tcc lines:
- CC = bcc
- TLINK = tlink /P-
-
- #TASM = tasm # not used
-
- #MODEL = s # small model for UnZip (no ZipInfo)
- MODEL = l # large model for UnZip (code doesn't fit in compact anymore)
-
- # GNU make doesn't like the return value from "rem"
- #STRIP=rem
- STRIP=echo Ignore this line.
- # If you don't have LZEXE or PKLITE, get one of them. Then define:
- #STRIP=lzexe
- # or
- #STRIP=pklite
- # This makes a big difference in .exe size (and possibly load time).
-
-
- # compiler flags
-
- CFLAGS = -O -ff- -k- -P-.C -I.
- UNFLAGS = -m$(MODEL) $(CFLAGS)
- FUFLAGS = -ms $(CFLAGS) -K -d # funzip is always small-model
-
- # implicit rules
-
- .c.obj:
- $(CC) -c $(UNFLAGS) {$< }
-
- # list macros
-
- unzip_dependencies = \
- unzip.obj \
- crypt.obj \
- envargs.obj \
- explode.obj \
- extract.obj \
- file_io.obj \
- inflate.obj \
- match.obj \
- unreduce.obj \
- unshrink.obj \
- zipinfo.obj \
- msdos.obj
-
- funzip_dependencies = \
- funzip.obj \
- crypt_.obj \
- inflate_.obj
-
- # explicit rules
-
- all: unzip.exe funzip.exe
-
- unzip.exe: $(unzip_dependencies)
- $(TLINK) /x/n/c/d @&&|
- c0$(MODEL).obj+
- unzip.obj+
- crypt.obj+
- envargs.obj+
- explode.obj+
- extract.obj+
- file_io.obj+
- inflate.obj+
- match.obj+
- unreduce.obj+
- unshrink.obj+
- zipinfo.obj+
- msdos.obj
- unzip.exe
- # no map file
- emu.lib+
- math$(MODEL).lib+
- c$(MODEL).lib
- |
- $(STRIP) unzip.exe
-
- funzip.exe: $(funzip_dependencies)
- $(TLINK) /x/n/c/d @&&|
- c0s.obj+
- funzip.obj+
- crypt_.obj+
- inflate_.obj
- funzip.exe
- # no map file
- emu.lib+
- maths.lib+
- cs.lib
- |
- $(STRIP) funzip.exe
-
- # individual file dependencies
-
- crypt.obj: crypt.c unzip.h zip.h crypt.h
- envargs.obj: envargs.c unzip.h
- explode.obj: explode.c unzip.h
- extract.obj: extract.c unzip.h crypt.h
- file_io.obj: file_io.c unzip.h crypt.h tables.h
- inflate.obj: inflate.c inflate.h unzip.h
- match.obj: match.c unzip.h
- unreduce.obj: unreduce.c unzip.h
- unshrink.obj: unshrink.c unzip.h
- unzip.obj: unzip.c unzip.h
- zipinfo.obj: zipinfo.c unzip.h
-
- msdos.obj: msdos/msdos.c unzip.h
- $(CC) -c $(UNFLAGS) msdos/msdos.c
-
- funzip.obj: funzip.c unzip.h crypt.h tables.h
- $(CC) -c $(FUFLAGS) funzip.c
-
- crypt_.obj: crypt.c unzip.h zip.h crypt.h
- $(CC) -c $(FUFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
-
- inflate_.obj: inflate.c inflate.h unzip.h crypt.h
- $(CC) -c $(FUFLAGS) -DFUNZIP -oinflate_.obj inflate.c
-