Commit | Line | Data |
---|---|---|
e06ae0d4 TG |
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 | $! | |
82704155 | 9 | $! Copyright (C) 2012-2019 Free Software Foundation, Inc. |
5bf135a7 NC |
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. | |
43e65147 | 15 | $! |
5bf135a7 NC |
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. | |
43e65147 | 20 | $! |
5bf135a7 NC |
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 | $! | |
e06ae0d4 TG |
25 | $ arch=F$GETSYI("ARCH_NAME") |
26 | $ arch=F$EDIT(arch,"LOWERCASE") | |
27 | ||
28 | $! | |
29 | $ write sys$output "Generate opcodes/build.com" | |
30 | $! | |
31 | $ if arch.eqs."ia64" | |
32 | $ then | |
33 | $ create build.com | |
34 | $DECK | |
35 | $ FILES="ia64-dis,ia64-opc" | |
36 | $ DEFS="""ARCH_ia64""" | |
37 | $EOD | |
38 | $ endif | |
39 | $ if arch.eqs."alpha" | |
40 | $ then | |
41 | $ create build.com | |
42 | $DECK | |
43 | $ FILES="alpha-dis,alpha-opc" | |
44 | $ DEFS="""ARCH_alpha""" | |
45 | $EOD | |
46 | $ endif | |
47 | $! | |
48 | $ append sys$input build.com | |
49 | $DECK | |
50 | $ FILES=FILES + ",dis-init,dis-buf,disassemble" | |
51 | $ OPT="/noopt/debug" | |
52 | $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])/name=(as_is,shortened)" + - | |
53 | "/define=(" + DEFS + ")" | |
54 | $ write sys$output "CFLAGS=",CFLAGS | |
55 | $ NUM = 0 | |
56 | $ LOOP: | |
57 | $ F = F$ELEMENT(NUM,",",FILES) | |
58 | $ IF F.EQS."," THEN GOTO END | |
59 | $ write sys$output "Compiling ", F, ".c" | |
60 | $ cc 'CFLAGS 'F.c | |
61 | $ NUM = NUM + 1 | |
62 | $ GOTO LOOP | |
63 | $ END: | |
64 | $ purge | |
65 | $ lib/create libopcodes 'FILES | |
66 | $EOD | |
67 | $exit |