diff options
Diffstat (limited to 'archived/ptlibzippy/msdos/Makefile.msc')
| -rw-r--r-- | archived/ptlibzippy/msdos/Makefile.msc | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/archived/ptlibzippy/msdos/Makefile.msc b/archived/ptlibzippy/msdos/Makefile.msc new file mode 100644 index 0000000000..4c5011f355 --- /dev/null +++ b/archived/ptlibzippy/msdos/Makefile.msc @@ -0,0 +1,112 @@ +# Makefile for PTlibzippy +# Microsoft C 5.1 or later +# Last updated: 19-Mar-2003 + +# To use, do "make makefile.msc" +# To compile in small model, set below: MODEL=S + +# If you wish to reduce the memory requirements (default 256K for big +# objects plus a few K), you can add to the LOC macro below: +# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 +# See ptzippyconf.h for details about the memory requirements. + +# ------------- Microsoft C 5.1 and later ------------- + +# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7) +# should be added to the environment via "set LOCAL_PTLIBZIPPY=-DFOO" or added +# to the declaration of LOC here: +LOC = $(LOCAL_PTLIBZIPPY) + +# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc. +CPU_TYP = 0 + +# Memory model: one of S, M, C, L (small, medium, compact, large) +MODEL=L + +CC=cl +CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC) +#-Ox generates bad code with MSC 5.1 +LIB_CFLAGS=-Zl $(CFLAGS) + +LD=link +LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode +# "/farcall/packcode" are only useful for `large code' memory models +# but should be a "no-op" for small code models. + + +# variables +PTLIBZIPPY_LIB = ptlibzippy_$(MODEL).lib + +OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj +OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj ptzippyutil.obj + + +# targets +all: $(PTLIBZIPPY_LIB) example.exe minigzip.exe + +.c.obj: + $(CC) -c $(LIB_CFLAGS) $*.c + +adler32.obj: adler32.c ptlibzippy.h ptzippyconf.h + +compress.obj: compress.c ptlibzippy.h ptzippyconf.h + +crc32.obj: crc32.c ptlibzippy.h ptzippyconf.h crc32.h + +deflate.obj: deflate.c deflate.h ptzippyutil.h ptlibzippy.h ptzippyconf.h + +gzclose.obj: gzclose.c ptlibzippy.h ptzippyconf.h ptzippyguts.h + +gzlib.obj: gzlib.c ptlibzippy.h ptzippyconf.h ptzippyguts.h + +gzread.obj: gzread.c ptlibzippy.h ptzippyconf.h ptzippyguts.h + +gzwrite.obj: gzwrite.c ptlibzippy.h ptzippyconf.h ptzippyguts.h + +infback.obj: infback.c ptzippyutil.h ptlibzippy.h ptzippyconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inffast.obj: inffast.c ptzippyutil.h ptlibzippy.h ptzippyconf.h inftrees.h inflate.h \ + inffast.h + +inflate.obj: inflate.c ptzippyutil.h ptlibzippy.h ptzippyconf.h inftrees.h inflate.h \ + inffast.h inffixed.h + +inftrees.obj: inftrees.c ptzippyutil.h ptlibzippy.h ptzippyconf.h inftrees.h + +trees.obj: trees.c ptzippyutil.h ptlibzippy.h ptzippyconf.h deflate.h trees.h + +uncompr.obj: uncompr.c ptlibzippy.h ptzippyconf.h + +ptzippyutil.obj: ptzippyutil.c ptzippyutil.h ptlibzippy.h ptzippyconf.h + +example.obj: test/example.c ptlibzippy.h ptzippyconf.h + $(CC) -c $(CFLAGS) $*.c + +minigzip.obj: test/minigzip.c ptlibzippy.h ptzippyconf.h + $(CC) -c $(CFLAGS) $*.c + + +# the command line is cut to fit in the MS-DOS 128 byte limit: +$(PTLIBZIPPY_LIB): $(OBJ1) $(OBJ2) + if exist $(PTLIBZIPPY_LIB) del $(PTLIBZIPPY_LIB) + lib $(PTLIBZIPPY_LIB) $(OBJ1); + lib $(PTLIBZIPPY_LIB) $(OBJ2); + +example.exe: example.obj $(PTLIBZIPPY_LIB) + $(LD) $(LDFLAGS) example.obj,,,$(PTLIBZIPPY_LIB); + +minigzip.exe: minigzip.obj $(PTLIBZIPPY_LIB) + $(LD) $(LDFLAGS) minigzip.obj,,,$(PTLIBZIPPY_LIB); + +test: example.exe minigzip.exe + example + echo hello world | minigzip | minigzip -d + +clean: + -del *.obj + -del *.lib + -del *.exe + -del *.map + -del ptlibzippy_*.bak + -del foo.gz |
