mirror of https://github.com/madler/zlib.git
parent
6b834a58bd
commit
23c69f1069
34 changed files with 800 additions and 431 deletions
@ -0,0 +1,115 @@ |
||||
$! make libz under VMS |
||||
$! written by Martin P.J. Zinser <m.zinser@gsi.de> |
||||
$! |
||||
$! Look for the compiler used |
||||
$! |
||||
$ ccopt = "" |
||||
$ if f$trnlnm("HW_MODEL").ge.1024 |
||||
$ then |
||||
$ ccopt = "/prefix=all"+ccopt |
||||
$ comp = "__decc__=1" |
||||
$ if f$trnlnm("SYS").eqs."" then define sys sys$library: |
||||
$ else |
||||
$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" |
||||
$ then |
||||
$ comp = "__vaxc__=1" |
||||
$ if f$trnlnm("SYS").eqs."" then define sys sys$library: |
||||
$ else |
||||
$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: |
||||
$ ccopt = "/decc/prefix=all"+ccopt |
||||
$ comp = "__decc__=1" |
||||
$ endif |
||||
$ endif |
||||
$! |
||||
$! Build the thing plain or with mms |
||||
$! |
||||
$ write sys$output "Compiling Zlib sources ..." |
||||
$ if f$search("SYS$SYSTEM:MMS.EXE").eqs."" |
||||
$ then |
||||
$ dele example.obj;*,minigzip.obj;* |
||||
$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" - |
||||
adler32.c zutil.h zlib.h zconf.h |
||||
$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" - |
||||
compress.c zlib.h zconf.h |
||||
$ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" - |
||||
crc32.c zutil.h zlib.h zconf.h |
||||
$ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" - |
||||
deflatec.c deflate.h zutil.h zlib.h zconf.h |
||||
$ CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" - |
||||
gsio.c zutil.h zlib.h zconf.h |
||||
$ CALL MAKE infblock.OBJ "CC ''CCOPT' infblock" - |
||||
infblock.c zutil.h zlib.h zconf.h infblock.h |
||||
$ CALL MAKE infcodes.OBJ "CC ''CCOPT' infcodes" - |
||||
infcodes.c zutil.h zlib.h zconf.h inftrees.h |
||||
$ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" - |
||||
inffast.c zutil.h zlib.h zconf.h inffast.h |
||||
$ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" - |
||||
inflate.c zutil.h zlib.h zconf.h infblock.h |
||||
$ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" - |
||||
inftrees.c zutil.h zlib.h zconf.h inftrees.h |
||||
$ CALL MAKE infutil.OBJ "CC ''CCOPT' infutil" - |
||||
infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h |
||||
$ CALL MAKE trees.OBJ "CC ''CCOPT' trees" - |
||||
trees.c deflate.h zutil.h zlib.h zconf.h |
||||
$ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" - |
||||
uncompr.c zlib.h zconf.h |
||||
$ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" - |
||||
zutil.c zutil.h zlib.h zconf.h |
||||
$ write sys$output "Building Zlib ..." |
||||
$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ |
||||
$ write sys$output "Building example..." |
||||
$ CALL MAKE example.OBJ "CC ''CCOPT' example" - |
||||
example.c zlib.h zconf.h |
||||
$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb |
||||
$ write sys$output "Building minigzip..." |
||||
$ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" - |
||||
minigzip.c zlib.h zconf.h |
||||
$ call make minigzip.exe - |
||||
"LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - |
||||
minigzip.obj libz.olb |
||||
$ else |
||||
$ mms/macro=('comp') |
||||
$ endif |
||||
$ write sys$output "Zlib build completed" |
||||
$ exit |
||||
$! |
||||
$! |
||||
$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES |
||||
$ V = 'F$Verify(0) |
||||
$! P1 = What we are trying to make |
||||
$! P2 = Command to make it |
||||
$! P3 - P8 What it depends on |
||||
$ |
||||
$ If F$Search(P1) .Eqs. "" Then Goto Makeit |
||||
$ Time = F$CvTime(F$File(P1,"RDT")) |
||||
$arg=3 |
||||
$Loop: |
||||
$ Argument = P'arg |
||||
$ If Argument .Eqs. "" Then Goto Exit |
||||
$ El=0 |
||||
$Loop2: |
||||
$ File = F$Element(El," ",Argument) |
||||
$ If File .Eqs. " " Then Goto Endl |
||||
$ AFile = "" |
||||
$Loop3: |
||||
$ OFile = AFile |
||||
$ AFile = F$Search(File) |
||||
$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl |
||||
$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit |
||||
$ Goto Loop3 |
||||
$NextEL: |
||||
$ El = El + 1 |
||||
$ Goto Loop2 |
||||
$EndL: |
||||
$ arg=arg+1 |
||||
$ If arg .Le. 8 Then Goto Loop |
||||
$ Goto Exit |
||||
$ |
||||
$Makeit: |
||||
$ VV=F$VERIFY(0) |
||||
$ write sys$output P2 |
||||
$ 'P2 |
||||
$ VV='F$Verify(VV) |
||||
$Exit: |
||||
$ If V Then Set Verify |
||||
$ENDSUBROUTINE |
@ -0,0 +1,75 @@ |
||||
# Makefile for zlib
|
||||
# Copyright (C) 1995 Jean-loup Gailly.
|
||||
# For conditions of distribution and use, see copyright notice in zlib.h
|
||||
|
||||
# Modified slightly for QNX by Chris Herborth (chrish@qnx.com)
|
||||
|
||||
CC=cc
|
||||
CFLAGS=-4 -O -Q
|
||||
#use -O3 for gcc to take advantage of inlining
|
||||
#CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
#CFLAGS=-g -DDEBUG
|
||||
LDFLAGS=-L. -lz
|
||||
|
||||
#RANLIB=ranlib
|
||||
|
||||
prefix=/usr/local
|
||||
|
||||
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
|
||||
zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
|
||||
|
||||
TEST_OBJS = example.o minigzip.o
|
||||
|
||||
all: example minigzip |
||||
|
||||
test: all |
||||
./example
|
||||
echo hello world | ./minigzip | ./minigzip -d
|
||||
|
||||
install: zlib.lib |
||||
-@mkdir $(prefix)/include
|
||||
-@mkdir $(prefix)/lib
|
||||
cp zlib.h zconf.h $(prefix)/include
|
||||
chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
|
||||
cp zlib.lib $(prefix)/lib
|
||||
chmod 644 $(prefix)/lib/zlib.lib
|
||||
|
||||
zlib.lib: $(OBJS) |
||||
cc -A $@ $(OBJS)
|
||||
# ar rc $@ $(OBJS)
|
||||
# $(RANLIB) $@
|
||||
|
||||
example: example.o zlib.lib |
||||
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
|
||||
|
||||
minigzip: minigzip.o zlib.lib |
||||
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
|
||||
|
||||
clean: |
||||
rm -f *.o example minigzip zlib.lib foo.gz
|
||||
|
||||
zip: |
||||
zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch]
|
||||
|
||||
tgz: |
||||
cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
|
||||
zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch]
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
adler32.o: zutil.h zlib.h zconf.h |
||||
compress.o: zlib.h zconf.h |
||||
crc32.o: zutil.h zlib.h zconf.h |
||||
deflate.o: deflate.h zutil.h zlib.h zconf.h |
||||
example.o: zlib.h zconf.h |
||||
gzio.o: zutil.h zlib.h zconf.h |
||||
infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h |
||||
infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h |
||||
inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h |
||||
inflate.o: zutil.h zlib.h zconf.h infblock.h |
||||
inftrees.o: zutil.h zlib.h zconf.h inftrees.h |
||||
infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h |
||||
minigzip.o: zlib.h zconf.h |
||||
trees.o: deflate.h zutil.h zlib.h zconf.h |
||||
uncompr.o: zlib.h zconf.h |
||||
zutil.o: zutil.h zlib.h zconf.h |
@ -0,0 +1,48 @@ |
||||
# descrip.mms: MMS description file for building zlib on VMS |
||||
# written by Martin P.J. Zinser <m.zinser@gsi.de> |
||||
|
||||
cc_defs = |
||||
c_deb = |
||||
|
||||
.ifdef __DECC__ |
||||
pref = /prefix=all |
||||
.endif |
||||
|
||||
OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\ |
||||
deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\ |
||||
inftrees.obj, infcodes.obj, infutil.obj, inffast.obj |
||||
|
||||
CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) |
||||
|
||||
all : example.exe minigzip.exe |
||||
@ write sys$output " Example applications available" |
||||
libz.olb : libz.olb($(OBJS)) |
||||
@ write sys$output " libz available" |
||||
|
||||
example.exe : example.obj libz.olb |
||||
link example,libz.olb/lib |
||||
|
||||
minigzip.exe : minigzip.obj libz.olb |
||||
link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib |
||||
|
||||
clean : |
||||
delete *.obj;*,libz.olb;* |
||||
|
||||
|
||||
# Other dependencies. |
||||
adler32.obj : zutil.h zlib.h zconf.h |
||||
compress.obj : zlib.h zconf.h |
||||
crc32.obj : zutil.h zlib.h zconf.h |
||||
deflate.obj : deflate.h zutil.h zlib.h zconf.h |
||||
example.obj : zlib.h zconf.h |
||||
gzio.obj : zutil.h zlib.h zconf.h |
||||
infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h |
||||
infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h |
||||
inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h |
||||
inflate.obj : zutil.h zlib.h zconf.h infblock.h |
||||
inftrees.obj : zutil.h zlib.h zconf.h inftrees.h |
||||
infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h |
||||
minigzip.obj : zlib.h zconf.h |
||||
trees.obj : deflate.h zutil.h zlib.h zconf.h |
||||
uncompr.obj : zlib.h zconf.h |
||||
zutil.obj : zutil.h zlib.h zconf.h |
Loading…
Reference in new issue