source: rtems/cpukit/zlib/make_vms.com @ d95035a

4.104.115
Last change on this file since d95035a was 959f7df2, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/28/05 at 07:22:42

Import of zlib-1.2.2.2.tar.gz

  • Property mode set to 100644
File size: 3.6 KB
Line 
1$! make libz under VMS
2$! written by Martin P.J. Zinser <m.zinser@gsi.de>
3$!
4$! Look for the compiler used
5$!
6$ ccopt = ""
7$ if f$getsyi("HW_MODEL").ge.1024
8$ then
9$  ccopt = "/prefix=all"+ccopt
10$  comp  = "__decc__=1"
11$  if f$trnlnm("SYS").eqs."" then define sys sys$library:
12$ else
13$  if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
14$   then
15$    comp  = "__vaxc__=1"
16$    if f$trnlnm("SYS").eqs."" then define sys sys$library:
17$   else
18$    if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
19$    ccopt = "/decc/prefix=all"+ccopt
20$    comp  = "__decc__=1"
21$  endif
22$ endif
23$!
24$! Build the thing plain or with mms
25$!
26$ write sys$output "Compiling Zlib sources ..."
27$ if f$search("SYS$SYSTEM:MMS.EXE").eqs.""
28$  then
29$   dele example.obj;*,minigzip.obj;*
30$   CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
31                adler32.c zlib.h zconf.h
32$   CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
33                compress.c zlib.h zconf.h
34$   CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
35                crc32.c crc32.h zlib.h zconf.h zutil.h
36$   CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
37                deflate.c deflate.h zutil.h zlib.h zconf.h
38$   CALL MAKE gzio.OBJ "CC ''CCOPT' gzio /define=""NO_vsnprintf""" -
39                gzio.c zutil.h zlib.h zconf.h
40$   CALL MAKE infback.OBJ "CC ''CCOPT' infback" -
41                infback.c zutil.h zlib.h zconf.h -
42                "inftrees.h inflate.h inffast.h inffixed.h"
43$   CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
44                inffast.c zutil.h zlib.h zconf.h -
45                "inftrees.h inflate.h inffast.h"
46$   CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
47                inflate.c zutil.h zlib.h zconf.h -
48                "inftrees.h inflate.h inffast.h inffixed.h"
49$   CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
50                inftrees.c zutil.h zlib.h zconf.h inftrees.h
51$   CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
52                trees.c trees.h deflate.h zutil.h zlib.h zconf.h
53$   CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
54                uncompr.c zlib.h zconf.h
55$   CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
56                zutil.c zutil.h zlib.h zconf.h
57$   write sys$output "Building Zlib ..."
58$   CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
59$   write sys$output "Building example..."
60$   CALL MAKE example.OBJ "CC ''CCOPT' example" -
61                example.c zlib.h zconf.h
62$   call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
63$   write sys$output "Building minigzip..."
64$   CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" -
65                minigzip.c zlib.h zconf.h
66$   call make minigzip.exe -
67                "LINK minigzip,libz.olb/lib" -
68                minigzip.obj libz.olb
69$  else
70$   mms/macro=('comp')
71$  endif
72$ write sys$output "Zlib build completed"
73$ exit
74$!
75$!
76$MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
77$ V = 'F$Verify(0)
78$! P1 = What we are trying to make
79$! P2 = Command to make it
80$! P3 - P8  What it depends on
81$
82$ If F$Search(P1) .Eqs. "" Then Goto Makeit
83$ Time = F$CvTime(F$File(P1,"RDT"))
84$arg=3
85$Loop:
86$       Argument = P'arg
87$       If Argument .Eqs. "" Then Goto Exit
88$       El=0
89$Loop2:
90$       File = F$Element(El," ",Argument)
91$       If File .Eqs. " " Then Goto Endl
92$       AFile = ""
93$Loop3:
94$       OFile = AFile
95$       AFile = F$Search(File)
96$       If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
97$       If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
98$       Goto Loop3
99$NextEL:
100$       El = El + 1
101$       Goto Loop2
102$EndL:
103$ arg=arg+1
104$ If arg .Le. 8 Then Goto Loop
105$ Goto Exit
106$
107$Makeit:
108$ VV=F$VERIFY(0)
109$ write sys$output P2
110$ 'P2
111$ VV='F$Verify(VV)
112$Exit:
113$ If V Then Set Verify
114$ENDSUBROUTINE
Note: See TracBrowser for help on using the repository browser.