cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | $! |
| 2 | $! Make ImageMagick X image utilities for VMS. |
| 3 | $! |
| 4 | $ on error then continue |
| 5 | $ deass magick |
| 6 | $ set noon |
| 7 | $ |
| 8 | $ option := 'p1' |
| 9 | $ if option .eqs. "CLEAN" |
| 10 | $ then |
| 11 | $ deletee/log [.magick]libMagick.olb;* |
| 12 | $ deletee/log [.coders]libCoders.olb;* |
| 13 | $ exit |
| 14 | $ endif |
| 15 | $ if option .eqs. "REALCLEAN" |
| 16 | $ then |
| 17 | $ deletee/log [.magick]libMagick.olb;*,[...]*.obj;* |
| 18 | $ deletee/log [.coders]libCoders.olb;*,[...]*.obj;* |
| 19 | $ exit |
| 20 | $ endif |
| 21 | $ if option .eqs. "DISTCLEAN" |
| 22 | $ then |
| 23 | $ deletee/log [.magick]libMagick.olb;*,[...]*.obj;*,*.exe;*,magickshr.olb;* |
| 24 | $ deletee/log [.coders]libCoders.olb;*,[...]*.obj;*,*.exe;*,magickshr.olb;* |
| 25 | $ exit |
| 26 | $ endif |
| 27 | $ if option .eqs. "NOSHR" |
| 28 | $ then |
| 29 | $ share := n |
| 30 | $ option := |
| 31 | $ endif |
| 32 | $ if option .nes. "" |
| 33 | $ then |
| 34 | $ write sys$error "Unknown option \", option, "\" |
| 35 | $ exit |
| 36 | $ endif |
| 37 | $ p1 := |
| 38 | $link_options="/nodebug/notraceback" |
| 39 | $if (f$trnlnm("X11") .eqs. "") then define/nolog X11 decw$include: |
| 40 | $library_options="" |
| 41 | $compile_options="/nodebug/optimize" |
| 42 | $if (f$search("sys$system:decc$compiler.exe") .nes. "") |
| 43 | $then ! VAX with DEC C compiler |
| 44 | $ compile_options="/decc/nodebug/optimize" |
| 45 | $ library_options="_decc" |
| 46 | $else ! VAX with VAX C compiler, (GCC library needed for PNG format only) |
| 47 | $ define/nolog lnk$library sys$library:vaxcrtl |
| 48 | $ define/nolog sys sys$share |
| 49 | $ if (f$trnlnm("gnu_cc") .nes. "") then define/nolog lnk$library_1 gnu_cc:[000000]gcclib.olb |
| 50 | $endif |
| 51 | $if (f$getsyi("HW_MODEL") .gt. 1023) |
| 52 | $then ! Alpha with DEC C compiler |
| 53 | $ define/nolog sys decc$library_include |
| 54 | $ compile_options="/debug/optimize/prefix=all/name=(as_is,short)/float=ieee" |
| 55 | $ library_options="_axp" |
| 56 | $ share := 'share'y |
| 57 | $else |
| 58 | $ share := n |
| 59 | $endif |
| 60 | $ |
| 61 | $write sys$output "Making in [.magick]" |
| 62 | $set default [.magick] |
| 63 | $@make |
| 64 | $set default [-] |
| 65 | $write sys$output "Making in [.coders]" |
| 66 | $set default [.coders] |
| 67 | $@make |
| 68 | $set default [-] |
| 69 | $ |
| 70 | $ if share |
| 71 | $ then |
| 72 | $ write sys$output "Making shareable image" |
| 73 | $ link/share/exe=magickshr.exe [.magick]libMagick.olb/lib, - |
| 74 | [.coders]libCoders.olb/lib,[.magick]libMagick.olb/lib, - |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 75 | []magickshr.opt/opt, - |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 76 | sys$library:freetype.olb/lib, - |
| 77 | sys$library:libjasper.olb/lib, - |
| 78 | sys$library:libjpeg.olb/lib, - |
| 79 | sys$library:libpng.olb/lib, - |
| 80 | sys$library:tiff.olb/lib, - |
| 81 | sys$library:libz.olb/lib, - |
| 82 | sys$library:libbz2.olb/lib, - |
cristy | ebe41ab | 2010-01-14 02:58:18 +0000 | [diff] [blame] | 83 | sys$library:libjbig.olb/lib |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 84 | $ libr/crea/share/log magickshr.olb magickshr.exe |
| 85 | $ set file/trunc magickshr.olb |
| 86 | $ purge magickshr.olb |
| 87 | $ link_libraries := [-]magickshr.olb/lib |
| 88 | $ define/nolog magickshr 'f$environment("default")'magickshr.exe |
| 89 | $ write sys$output "Shareable image logical MAGICKSHR defined:" |
| 90 | $ show logi magickshr |
| 91 | $ else |
| 92 | $ link_libraries := [.magick]libMagick.olb/lib, - |
| 93 | [.coders]libCoders.olb/lib, - |
| 94 | sys$library:libjasper.olb/lib |
| 95 | sys$library:libjpeg.olb/lib, - |
| 96 | sys$library:libpng.olb/lib, - |
| 97 | sys$library:tiff.olb/lib, - |
| 98 | sys$library:freetype.olb/l, - |
| 99 | sys$library:libz.olb/lib,- |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 100 | sys$library:libjbig.olb/lib, - |
| 101 | sys$library:libbz2.olb/lib |
| 102 | $ endif |
| 103 | $ define magick [-.magick] |
| 104 | $ set default [.utilities] |
| 105 | $ define wand [-.wand] |
| 106 | $if ((p1 .nes. "") .and. (p1 .nes. "DISPLAY")) then goto SkipDisplay |
| 107 | $write sys$output "Making Display..." |
| 108 | $call Make display.c |
| 109 | $ |
| 110 | $link'link_options' display.obj, - |
| 111 | 'link_libraries',sys$input:/opt |
| 112 | sys$share:decw$xlibshr.exe/share |
| 113 | $ |
| 114 | $display:==$'f$environment("default")'display |
| 115 | $write sys$output "..symbol DISPLAY defined." |
| 116 | $ |
| 117 | $SkipDisplay: |
| 118 | $if ((p1 .nes. "") .and. (p1 .nes. "IMPORT")) then goto SkipImport |
| 119 | $write sys$output "Making Import..." |
| 120 | $call Make import.c |
| 121 | $ |
| 122 | $link'link_options' import.obj, - |
| 123 | 'link_libraries',sys$input:/opt |
| 124 | sys$share:decw$xlibshr.exe/share |
| 125 | $ |
| 126 | $import:==$'f$environment("default")'import |
| 127 | $write sys$output "..symbol IMPORT defined." |
| 128 | $SkipImport: |
| 129 | $ |
| 130 | $if ((p1 .nes. "") .and. (p1 .nes. "ANIMATE")) then goto SkipAnimate |
| 131 | $write sys$output "Making Animate..." |
| 132 | $call Make animate.c |
| 133 | $ |
| 134 | $link'link_options' animate.obj, - |
| 135 | 'link_libraries',sys$input:/opt |
| 136 | sys$share:decw$xlibshr.exe/share |
| 137 | $ |
| 138 | $animate:==$'f$environment("default")'animate |
| 139 | $write sys$output "..symbol ANIMATE defined." |
| 140 | $ |
| 141 | $SkipAnimate: |
| 142 | $if ((p1 .nes. "") .and. (p1 .nes. "MONTAGE")) then goto SkipMontage |
| 143 | $write sys$output "Making Montage..." |
| 144 | $call Make montage.c |
| 145 | $ |
| 146 | $link'link_options' montage.obj, - |
| 147 | 'link_libraries',sys$input:/opt |
| 148 | sys$share:decw$xlibshr.exe/share |
| 149 | $ |
| 150 | $montage:==$'f$environment("default")'montage |
| 151 | $write sys$output "..symbol MONTAGE defined." |
| 152 | $ |
| 153 | $SkipMontage: |
| 154 | $if ((p1 .nes. "") .and. (p1 .nes. "MOGRIFY")) then goto SkipMogrify |
| 155 | $write sys$output "Making Mogrify..." |
| 156 | $call Make mogrify.c |
| 157 | $ |
| 158 | $link'link_options' mogrify.obj, - |
| 159 | 'link_libraries',sys$input:/opt |
| 160 | sys$share:decw$xlibshr.exe/share |
| 161 | $ |
| 162 | $mogrify:==$'f$environment("default")'mogrify |
| 163 | $write sys$output "..symbol MOGRIFY defined." |
| 164 | $ |
| 165 | $SkipMogrify: |
| 166 | $if ((p1 .nes. "") .and. (p1 .nes. "CONVERT")) then goto SkipConvert |
| 167 | $write sys$output "Making Convert..." |
| 168 | $call Make convert.c |
| 169 | $ |
| 170 | $link'link_options' convert.obj, - |
| 171 | 'link_libraries',sys$input:/opt |
| 172 | sys$share:decw$xlibshr.exe/share |
| 173 | $ |
| 174 | $convert:==$'f$environment("default")'convert |
| 175 | $write sys$output "..symbol CONVERT defined." |
| 176 | $SkipConvert: |
| 177 | $if ((p1 .nes. "") .and. (p1 .nes. "COMPARE")) then goto SkipCompare |
| 178 | $write sys$output "Making Compare..." |
| 179 | $call Make compare.c |
| 180 | $ |
| 181 | $link'link_options' compare.obj, - |
| 182 | 'link_libraries',sys$input:/opt |
| 183 | sys$share:decw$xlibshr.exe/share |
| 184 | $ |
| 185 | $compare:==$'f$environment("default")'compare |
| 186 | $write sys$output "..symbol COMPARE defined." |
| 187 | $SkipCompare: |
| 188 | $if ((p1 .nes. "") .and. (p1 .nes. "IDENTIFY")) then goto SkipIdentify |
| 189 | $write sys$output "Making Identify..." |
| 190 | $call Make identify.c |
| 191 | $ |
| 192 | $link'link_options' identify.obj, - |
| 193 | 'link_libraries',sys$input:/opt |
| 194 | sys$share:decw$xlibshr.exe/share |
| 195 | $ |
| 196 | $identify:==$'f$environment("default")'identify |
| 197 | $write sys$output "..symbol IDENTIFY defined." |
| 198 | $SkipIdentify: |
| 199 | $if ((p1 .nes. "") .and. (p1 .nes. "COMPOSITE")) then goto SkipComposite |
| 200 | $write sys$output "Making Composite..." |
| 201 | $call Make composite.c |
| 202 | $ |
| 203 | $link'link_options' composite.obj, - |
| 204 | 'link_libraries',sys$input:/opt |
| 205 | sys$share:decw$xlibshr.exe/share |
| 206 | $ |
| 207 | $composite:==$'f$environment("default")'composite |
| 208 | $write sys$output "..symbol COMPOSITE defined." |
| 209 | $SkipComposite: |
| 210 | $set def [-] |
| 211 | $copy [.config]magic.xml sys$login:magic.xml |
| 212 | $copy [.config]colors.xml sys$login:colors.xml |
| 213 | $copy [.config]log.xml sys$login:log.xml |
| 214 | $copy [.config]delegates.xml sys$login:delegates.xml |
| 215 | $copy [.config]coder.xml sys$login:coder.xml |
| 216 | $copy [.config]type.xml sys$login:type.xml |
| 217 | $copy [.config]locale.xml sys$login:locale.xml |
| 218 | $copy [.config]english.xml sys$login:english.xml |
| 219 | $copy [.config]francais.xml sys$login:francais.xml |
| 220 | $type sys$input |
| 221 | |
| 222 | Use this command to specify which X server to contact: |
| 223 | |
| 224 | $set display/create/node=node_name:: |
| 225 | |
| 226 | or |
| 227 | |
| 228 | $set display/create/node=nodename/transport=tcpip |
| 229 | |
| 230 | This can be done automatically from your LOGIN.COM with the following |
| 231 | command: |
| 232 | |
| 233 | $if (f$trnlmn("sys$rem_node") .nes. "") then - |
| 234 | $ set display/create/node='f$trnlmn("sys$rem_node")' |
| 235 | $exit |
| 236 | $ |
| 237 | $Make: subroutine |
| 238 | $! |
| 239 | $! Primitive MMS hack for DCL. |
| 240 | $! |
| 241 | $if (p1 .eqs. "") then exit |
| 242 | $source_file=f$search(f$parse(p1,".c")) |
| 243 | $if (source_file .nes. "") |
| 244 | $then |
| 245 | $ object_file=f$parse(source_file,,,"name")+".obj" |
| 246 | $ object_file=f$search( object_file ) |
| 247 | $ if (object_file .nes. "") |
| 248 | $ then |
| 249 | $ object_time=f$file_attribute(object_file,"cdt") |
| 250 | $ source_time=f$file_attribute(source_file,"cdt") |
| 251 | $ if (f$cvtime(object_time).lts.f$cvtime(source_time)) then - |
| 252 | $ object_file="" |
| 253 | $ endif |
| 254 | $ if (object_file .eqs. "") |
| 255 | $ then |
| 256 | $ write sys$output "Compiling ",p1 |
| 257 | $ cc'compile_options'/include_directory=[-.magick] 'source_file' |
| 258 | $ endif |
| 259 | $endif |
| 260 | $exit |
| 261 | $endsubroutine |