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
6 $! Written by Klaus K"ampf (kkaempf@rmi.de)
8 $ arch=F$GETSYI("ARCH_NAME")
9 $ arch=F$EDIT(arch,"LOWERCASE")
10 $ write sys$output "Configuring binutils for ''arch' target"
15 /* config.h. Generated automatically by configure.com */
16 /* Is the type time_t defined in <time.h>? */
17 #define HAVE_TIME_T_IN_TIME_H 1
18 /* Is the type time_t defined in <sys/types.h>? */
19 #define HAVE_TIME_T_IN_TYPES_H 1
20 /* Does <utime.h> define struct utimbuf? */
21 #define HAVE_GOOD_UTIME_H 1
22 /* Whether fprintf must be declared even if <stdio.h> is included. */
23 #define NEED_DECLARATION_FPRINTF 1
24 /* Do we need to use the b modifier when opening binary files? */
25 /* #undef USE_BINARY_FOPEN */
26 /* Define if you have the utimes function. */
28 /* Define if you have the <fcntl.h> header file. */
29 #define HAVE_FCNTL_H 1
30 /* Define if you have the <stdlib.h> header file. */
31 #define HAVE_STDLIB_H 1
32 /* Define if you have the <string.h> header file. */
33 #define HAVE_STRING_H 1
34 /* Define if you have the <strings.h> header file. */
35 #define HAVE_STRINGS_H 1
36 /* Define if you have the <sys/file.h> header file. */
37 #define HAVE_SYS_FILE_H 1
38 /* Define if you have the <unistd.h> header file. */
39 #define HAVE_UNISTD_H 1
43 #define C_alloca(x) __ALLOCA(x)
48 $ if arch .eqs. "ia64" then target = "elf64-ia64-vms"
49 $ if arch .eqs. "alpha" then target = "vms-alpha"
50 $ if arch .eqs. "vax" then target = "vms-vax"
52 $ open/append tfile config.h
53 $ write tfile "#define TARGET """ + target + """"
55 $ write sys$output "Created `config.h'"
57 $ write sys$output "Generate binutils build.com"
63 $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])" +-
64 "/name=(as_is,shortened)" +-
65 "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
66 $ BFDLIB = ",[-.bfd]libbfd.olb/lib"
67 $ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
68 $ OPCODES = ",[-.opcodes]libopcodes.olb/lib"
69 $ DEBUG_FILES = ",rddbg,debug,stabs,ieee,rdcoff,dwarf"
70 $ BULIBS_FILES = ",bucomm,version,filemode"
71 $ ALL_FILES="nm,strings,addr2line,size,objdump,prdbg" +-
72 BULIBS_FILES + DEBUG_FILES
74 $ write sys$output "CFLAGS=",CFLAGS
79 $ F = F$ELEMENT(NUM,",",ALL_FILES)
80 $ IF F.EQS."," THEN GOTO END
81 $ write sys$output "Compiling ", F, ".c"
89 $ write sys$output "Building nm.exe"
90 $ NM_OBJS="nm.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
91 $ link/exe=nm 'NM_OBJS
93 $ write sys$output "Building strings.exe"
94 $ STRINGS_OBJS="strings.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
95 $ link/exe=strings 'STRINGS_OBJS
97 $ write sys$output "Building size.exe"
98 $ SIZE_OBJS="size.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
99 $ link/exe=size 'SIZE_OBJS
101 $ write sys$output "Building addr2line.exe"
102 $ ADDR2LINE_OBJS="addr2line.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
103 $ link/exe=addr2line 'ADDR2LINE_OBJS
105 $ write sys$output "Building objdump.exe"
106 $ OBJDUMP_OBJS="objdump.obj,prdbg.obj" + DEBUG_FILES + BULIBS_FILES +-
107 BFDLIB + OPCODES + LIBIBERTY
108 $ link/exe=objdump 'OBJDUMP_OBJS