]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - binutils/configure.com
* objcopy.c (copy_main): Initialize context variable.
[thirdparty/binutils-gdb.git] / binutils / configure.com
1 $!
2 $! This file configures binutils for use with openVMS/Alpha
3 $! We do not use the configure script, since we do not have /bin/sh
4 $! to execute it.
5 $!
6 $! Copyright 2012 Free Software Foundation
7 $!
8 $! This file is free software; you can redistribute it and/or modify
9 $! it under the terms of the GNU General Public License as published by
10 $! the Free Software Foundation; either version 3 of the License, or
11 $! (at your option) any later version.
12 $!
13 $! This program is distributed in the hope that it will be useful,
14 $! but WITHOUT ANY WARRANTY; without even the implied warranty of
15 $! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 $! GNU General Public License for more details.
17 $!
18 $! You should have received a copy of the GNU General Public License
19 $! along with this program; see the file COPYING3. If not see
20 $! <http://www.gnu.org/licenses/>.
21 $!
22 $! Written by Klaus K"ampf (kkaempf@rmi.de)
23 $!
24 $ arch=F$GETSYI("ARCH_NAME")
25 $ arch=F$EDIT(arch,"LOWERCASE")
26 $ write sys$output "Configuring binutils for ''arch' target"
27 $!
28 $! Generate config.h
29 $!
30 $ create config.h
31 /* config.h. Generated automatically by configure.com */
32 /* Is the type time_t defined in <time.h>? */
33 #define HAVE_TIME_T_IN_TIME_H 1
34 /* Is the type time_t defined in <sys/types.h>? */
35 #define HAVE_TIME_T_IN_TYPES_H 1
36 /* Does <utime.h> define struct utimbuf? */
37 #define HAVE_GOOD_UTIME_H 1
38 /* Whether fprintf must be declared even if <stdio.h> is included. */
39 #define NEED_DECLARATION_FPRINTF 1
40 /* Do we need to use the b modifier when opening binary files? */
41 /* #undef USE_BINARY_FOPEN */
42 /* Define if you have the utimes function. */
43 #define HAVE_UTIMES 1
44 /* Define if you have the <fcntl.h> header file. */
45 #define HAVE_FCNTL_H 1
46 /* Define if you have the <stdlib.h> header file. */
47 #define HAVE_STDLIB_H 1
48 /* Define if you have the <string.h> header file. */
49 #define HAVE_STRING_H 1
50 /* Define if you have the <strings.h> header file. */
51 #define HAVE_STRINGS_H 1
52 /* Define if you have the <sys/file.h> header file. */
53 #define HAVE_SYS_FILE_H 1
54 /* Define if you have the <unistd.h> header file. */
55 #define HAVE_UNISTD_H 1
56 /* Alloca. */
57 #ifdef __DECC
58 #include <builtins.h>
59 #define C_alloca(x) __ALLOCA(x)
60 #endif
61 $!
62 $! Add TARGET.
63 $!
64 $ if arch .eqs. "ia64" then target = "elf64-ia64-vms"
65 $ if arch .eqs. "alpha" then target = "vms-alpha"
66 $ if arch .eqs. "vax" then target = "vms-vax"
67 $!
68 $ open/append tfile config.h
69 $ write tfile "#define TARGET """ + target + """"
70 $ close tfile
71 $ write sys$output "Created `config.h'"
72 $!
73 $ write sys$output "Generate binutils build.com"
74 $!
75 $ create build.com
76 $DECK
77 $ DEFS=""
78 $ OPT="/noopt/debug"
79 $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])" +-
80 "/name=(as_is,shortened)" +-
81 "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
82 $ BFDLIB = ",[-.bfd]libbfd.olb/lib"
83 $ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
84 $ OPCODES = ",[-.opcodes]libopcodes.olb/lib"
85 $ DEBUG_FILES = ",rddbg,debug,stabs,ieee,rdcoff,dwarf"
86 $ BULIBS_FILES = ",bucomm,version,filemode"
87 $ ALL_FILES="nm,strings,addr2line,size,objdump,prdbg" +-
88 BULIBS_FILES + DEBUG_FILES
89 $!
90 $ write sys$output "CFLAGS=",CFLAGS
91 $ if p1.nes."LINK"
92 $ then
93 $ NUM = 0
94 $ LOOP:
95 $ F = F$ELEMENT(NUM,",",ALL_FILES)
96 $ IF F.EQS."," THEN GOTO END
97 $ write sys$output "Compiling ", F, ".c"
98 $ cc 'CFLAGS 'F.c
99 $ NUM = NUM + 1
100 $ GOTO LOOP
101 $ END:
102 $ endif
103 $ purge
104 $!
105 $ write sys$output "Building nm.exe"
106 $ NM_OBJS="nm.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
107 $ link/exe=nm 'NM_OBJS
108 $!
109 $ write sys$output "Building strings.exe"
110 $ STRINGS_OBJS="strings.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
111 $ link/exe=strings 'STRINGS_OBJS
112 $!
113 $ write sys$output "Building size.exe"
114 $ SIZE_OBJS="size.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
115 $ link/exe=size 'SIZE_OBJS
116 $!
117 $ write sys$output "Building addr2line.exe"
118 $ ADDR2LINE_OBJS="addr2line.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
119 $ link/exe=addr2line 'ADDR2LINE_OBJS
120 $!
121 $ write sys$output "Building objdump.exe"
122 $ OBJDUMP_OBJS="objdump.obj,prdbg.obj" + DEBUG_FILES + BULIBS_FILES +-
123 BFDLIB + OPCODES + LIBIBERTY
124 $ link/exe=objdump 'OBJDUMP_OBJS
125 $EOD