aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras/Xpm/lib/make.com
blob: db70cc2c00636b95894b9f70b094f992e3c42644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
$!---------------make.com for xpmlib----------------------------------------
$! make xpmlib under VMS
$!
$ Make = ""
$!
$! Where are we?
$!
$ here = f$directory()
$ disk = f$trnlnm("SYS$DISK")
$ path = "''disk'"+ "''here'" 
$ xpath = "''path'" - "SXPM]" + "lib]"
$ if f$trnlnm("X11").eqs."" then define x11 decw$include,'xpath
$!
$! Check for MMK/MMS
$!
$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
$!
$! Look for the compiler used
$!
$ ccopt = "/define=(NEED_STRCASECMP,NEED_STRDUP,NO_ZPIPE)"
$ if f$getsyi("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
$!
$! Produce linker-options file according to X-Release and compiler used
$!
$ open/write optf sxpm.opt
$ write optf "libxpm.olb/lib"
$ write optf "sys$share:decw$xextlibshr.exe/share"
$ write optf "sys$share:decw$xlibshr.exe/share"
$ @sys$update:decw$get_image_version sys$share:decw$xlibshr.exe decw$version
$ if f$extract(4,3,decw$version).eqs."1.1"
$ then
$   write optf "sys$share:decw$xtshr.exe/share"
$ endif
$ if f$extract(4,3,decw$version).eqs."1.2"
$ then
$   write optf "sys$share:decw$xtlibshrr5.exe/share"
$ endif
$ close optf
$!
$! Build the thing plain or with 'Make'
$!
$ write sys$output "Compiling XPMlib sources ..."
$  if (Make .eqs. "")
$   then
$    'Make'/Macro = ('comp')
$  else
$   CALL MAKE CrBufFrI.OBJ "CC ''CCOPT' CrBufFrI" -
                CrBufFrI.c XpmI.h xpm.h
$   CALL MAKE CrBufFrP.OBJ "CC ''CCOPT' CrBufFrP" -
                CrBufFrP.c XpmI.h xpm.h
$   CALL MAKE CrDatFI.OBJ "CC ''CCOPT' CrDatFrI" -
                CrDatFrI.c XpmI.h xpm.h
$   CALL MAKE CrDatFP.OBJ "CC ''CCOPT' CrDatFrP" -
                CrDatFrP.c XpmI.h xpm.h
$   CALL MAKE CrIFrBuf.OBJ "CC ''CCOPT' CrIFrBuf" -
                CrIFrBuf.c XpmI.h xpm.h
$   CALL MAKE CrIFrDat.OBJ "CC ''CCOPT' CrIFrDat" -
                CrIFrDat.c XpmI.h xpm.h
$   CALL MAKE CrPFrBuf.OBJ "CC ''CCOPT' CrPFrBuf" -
                CrPFrBuf.c XpmI.h xpm.h
$   CALL MAKE CrPFrDat.OBJ "CC ''CCOPT' CrPFrDat" -
                CrPFrDat.c XpmI.h xpm.h
$   CALL MAKE RdFToDat.OBJ "CC ''CCOPT' RdFToDat" -
                RdFToDat.c XpmI.h xpm.h
$   CALL MAKE RdFToI.OBJ "CC ''CCOPT' RdFToI" -
                RdFToI.c XpmI.h xpm.h
$   CALL MAKE RdFToP.OBJ "CC ''CCOPT' RdFToP" -
                RdFToP.c XpmI.h xpm.h
$   CALL MAKE WrFFrDat.OBJ "CC ''CCOPT' WrFFrDat" -
                WrFFrDat.c XpmI.h xpm.h
$   CALL MAKE WrFFrI.OBJ "CC ''CCOPT' WrFFrI" -
                WrFFrI.c XpmI.h xpm.h
$   CALL MAKE WrFFrP.OBJ "CC ''CCOPT' WrFFrP" -
                WrFFrP.c XpmI.h xpm.h
$   CALL MAKE create.OBJ "CC ''CCOPT' create" -
                create.c XpmI.h xpm.h
$   CALL MAKE data.OBJ "CC ''CCOPT' data" -
                data.c XpmI.h xpm.h
$   CALL MAKE hashtab.OBJ "CC ''CCOPT' hashtab" -
                hashtab.c XpmI.h xpm.h
$   CALL MAKE misc.OBJ "CC ''CCOPT' misc" -
                misc.c XpmI.h xpm.h
$   CALL MAKE parse.OBJ "CC ''CCOPT' parse" -
                parse.c XpmI.h xpm.h
$   CALL MAKE rgb.OBJ "CC ''CCOPT' rgb" -
                rgb.c XpmI.h xpm.h
$   CALL MAKE scan.OBJ "CC ''CCOPT' scan" -
                scan.c XpmI.h xpm.h
$   CALL MAKE Attrib.OBJ "CC ''CCOPT' Attrib" -
                Attrib.c XpmI.h xpm.h
$   CALL MAKE CrIFrP.OBJ "CC ''CCOPT' CrIFrP" -
                CrIFrP.c XpmI.h xpm.h
$   CALL MAKE CrPFrI.OBJ "CC ''CCOPT' CrPFrI" -
                CrPFrI.c XpmI.h xpm.h
$   CALL MAKE Image.OBJ "CC ''CCOPT' Image" -
                Image.c XpmI.h xpm.h
$   CALL MAKE Info.OBJ "CC ''CCOPT' Info" -
                Info.c XpmI.h xpm.h
$   CALL MAKE RdFToBuf.OBJ "CC ''CCOPT' RdFToBuf" -
                RdFToBuf.c XpmI.h xpm.h
$   CALL MAKE WrFFrBuf.OBJ "CC ''CCOPT' WrFFrBuf" -
                WrFFrBuf.c XpmI.h xpm.h
$   write sys$output "Building XPMlib ..."
$   CALL MAKE LIBXPM.OLB "lib/crea libxpm.olb *.obj" *.OBJ
$   CALL MAKE SXPM.OBJ "CC  ''CCOPT' [-.sxpm]sxpm" -
                [-.sxpm]sxpm.c xpm.h
$   write sys$output "Linking SXPM ..."
$   CALL MAKE SXPM.EXE "LINK  sxpm,sxpm.opt/OPT" sxpm.OBJ
$  endif
$ write sys$output "XPMlib build completed"
$ sxpm :=="$''path'sxpm.exe"
$ 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