home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / ods2 / src / build.com < prev    next >
Text File  |  1998-03-24  |  1KB  |  38 lines

  1. $ gccflag := 'cc'
  2. $ if f$extract(0,3,gccflag).nes."GCC" then gccflag=""
  3. $
  4. $ if gccflag.nes.""
  5. $      then p1="/optim=level=3/warn=all"+p1
  6. $      else p1="/warn=enabl=(defunct,obsolescent,questcode,uninit,unused)"+p1
  7. $ endif
  8. $
  9. $ default=f$parse(f$environment("PROCEDURE"),,,"DEVICE","SYNTAX_ONLY")+  -
  10.         f$parse(f$environment("PROCEDURE"),,,"DIRECTORY","SYNTAX_ONLY")
  11. $ set def 'default'
  12. $
  13. $ call cc ods2    'p1'
  14. $ call cc rms     'p1'
  15. $ call cc direct  'p1'
  16. $ call cc access  'p1'
  17. $ call cc device  'p1'
  18. $ call cc cache   'p1'
  19. $ call cc phyvms  'p1'
  20. $ call cc vmstime 'p1'
  21. $
  22. $ write sys$error "''f$time()' Linking..."
  23. $ if gccflag.nes.""
  24. $    then library = ",vaxcrtl.tmp/option"
  25. $         create vaxcrtl.tmp
  26. sys$share:vaxcrtl/share
  27. $ endif
  28. $ link 'p2' ods2,rms,direct,access,device,cache,phyvms,vmstime 'library'
  29. $ write sys$error "''f$time()' Done"
  30. $ exit
  31. $
  32. $cc: subroutine
  33. $ if f$search(p1+".obj;").nes."" then if f$cvtime(f$file(p1+".obj;","CDT")).ges.f$cvtime(f$file(p1+".c;","CDT")) then exit
  34. $ write sys$error "''f$time()' Compiling ''p1'..."
  35. $ cc 'p2'  'p1'
  36. $ exit
  37. $ endsubroutine
  38.