configure.com 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. $!
  2. $! This file configures the opcodes library for use with openVMS.
  3. $!
  4. $! We do not use the configure script, since we do not have /bin/sh
  5. $! to execute it.
  6. $!
  7. $! Written by Tristan Gingold (gingold@adacore.com)
  8. $!
  9. $! Copyright (C) 2012-2022 Free Software Foundation, Inc.
  10. $!
  11. $! This file is free software; you can redistribute it and/or modify
  12. $! it under the terms of the GNU General Public License as published by
  13. $! the Free Software Foundation; either version 3 of the License, or
  14. $! (at your option) any later version.
  15. $!
  16. $! This program is distributed in the hope that it will be useful,
  17. $! but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. $! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. $! GNU General Public License for more details.
  20. $!
  21. $! You should have received a copy of the GNU General Public License
  22. $! along with this program; see the file COPYING3. If not see
  23. $! <http://www.gnu.org/licenses/>.
  24. $!
  25. $ arch=F$GETSYI("ARCH_NAME")
  26. $ arch=F$EDIT(arch,"LOWERCASE")
  27. $!
  28. $ write sys$output "Generate opcodes/build.com"
  29. $!
  30. $ if arch.eqs."ia64"
  31. $ then
  32. $ create build.com
  33. $DECK
  34. $ FILES="ia64-dis,ia64-opc"
  35. $ DEFS="""ARCH_ia64"""
  36. $EOD
  37. $ endif
  38. $ if arch.eqs."alpha"
  39. $ then
  40. $ create build.com
  41. $DECK
  42. $ FILES="alpha-dis,alpha-opc"
  43. $ DEFS="""ARCH_alpha"""
  44. $EOD
  45. $ endif
  46. $!
  47. $ append sys$input build.com
  48. $DECK
  49. $ FILES=FILES + ",dis-init,dis-buf,disassemble"
  50. $ OPT="/noopt/debug"
  51. $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])/name=(as_is,shortened)" + -
  52. "/define=(" + DEFS + ")"
  53. $ write sys$output "CFLAGS=",CFLAGS
  54. $ NUM = 0
  55. $ LOOP:
  56. $ F = F$ELEMENT(NUM,",",FILES)
  57. $ IF F.EQS."," THEN GOTO END
  58. $ write sys$output "Compiling ", F, ".c"
  59. $ cc 'CFLAGS 'F.c
  60. $ NUM = NUM + 1
  61. $ GOTO LOOP
  62. $ END:
  63. $ purge
  64. $ lib/create libopcodes 'FILES
  65. $EOD
  66. $exit