2 $! This file sets things up to build gas on a VMS system to generate object
3 $! files for a VMS system. We do not use the configure script, since we
4 $! do not have /bin/sh to execute it.
7 $ arch=F$GETSYI("ARCH_NAME")
8 $ arch=F$EDIT(arch,"LOWERCASE")
12 $ target_alias = "alpha-dec-openvms"
13 $ target_canonical = "alpha-dec-openvms"
18 $ target_alias = "ia64-openvms"
19 $ target_canonical = "ia64-unknown-openvms"
23 $ write sys$output "Generate targ-cpu.[ch]"
25 $! Target specific information
26 $ open/write outfile targ-cpu.h
27 $ write outfile "#include ""tc-''arch'.h"""
29 $! Target specific information
30 $ open/write outfile targ-cpu.c
31 $ write outfile "#include ""tc-''arch'.c"""
34 $ write sys$output "Generate targ-env.h"
37 #include "te-generic.h"
39 $ write sys$output "Generate obj-format.[ch]"
41 $! Code to handle the object file format.
42 $ open/write outfile obj-format.h
43 $ write outfile "#include ""obj-''format'.h"""
45 $ open/write outfile obj-format.c
46 $ write outfile "#include ""obj-''format'.c"""
49 $ write sys$output "Generate atof-targ.c"
52 #include "atof-ieee.c"
54 $ write sys$output "Generate gas/config.h"
56 $ create config-vms.in
57 /* config.h. Generated by configure.com. */
58 /* Define to 1 if using `alloca.c'. */
61 /* Default architecture. */
64 /* Default emulation. */
65 #define DEFAULT_EMULATION ""
67 /* Supported emulations. */
70 /* Define if you want run-time sanity checks. */
71 #undef ENABLE_CHECKING
73 /* Define to 1 if translation of program messages to the user's native
74 language is requested. */
77 /* Define to 1 if you have `alloca', as a function or macro. */
80 #define C_alloca(x) __ALLOCA(x)
82 /* Define to 1 if you have the `basename' function. */
83 #define HAVE_DECL_BASENAME 1
85 /* Is the prototype for getopt in <unistd.h> in the expected format? */
86 #define HAVE_DECL_GETOPT 1
88 /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
90 #undef HAVE_DECL_VSNPRINTF
92 /* Define to 1 if you have the declaration of `snprintf', and to 0 if you
94 #define HAVE_DECL_SNPRINTF 1
96 /* Define to 1 if you have the <errno.h> header file. */
97 #define HAVE_ERRNO_H 1
99 /* Define to 1 if you have the <limits.h> header file. */
102 /* Define to 1 if you have the `remove' function. */
103 #define HAVE_REMOVE 1
105 /* Define to 1 if you have the <stdarg.h> header file. */
106 #define HAVE_STDARG_H 1
108 /* Define to 1 if you have the <stdint.h> header file. */
111 /* Define to 1 if you have the <stdlib.h> header file. */
112 #define HAVE_STDLIB_H 1
114 /* Define to 1 if you have the <strings.h> header file. */
115 #define HAVE_STRINGS_H 1
117 /* Define to 1 if you have the <string.h> header file. */
118 #define HAVE_STRING_H 1
120 /* Define to 1 if you have the <sys/stat.h> header file. */
121 #undef HAVE_SYS_STAT_H
123 /* Define to 1 if you have the <sys/types.h> header file. */
124 #undef HAVE_SYS_TYPES_H
126 /* Define to 1 if you have the <unistd.h> header file. */
129 /* Define to 1 if you have the `unlink' function. */
132 /* Name of package */
133 #define PACKAGE "gas"
135 /* Define to the address where bug reports for this package should be sent. */
136 #define PACKAGE_BUGREPORT ""
138 /* Define to the full name of this package. */
139 #define PACKAGE_NAME ""
141 /* Define to the full name and version of this package. */
142 #define PACKAGE_STRING ""
144 /* Define to the one symbol short name of this package. */
145 #define PACKAGE_TARNAME ""
147 /* Define to the version of this package. */
148 #define PACKAGE_VERSION ""
150 /* Define to 1 if you have the ANSI C header files. */
151 #define STDC_HEADERS 1
154 #define TARGET_OS "openvms"
157 #define TARGET_VENDOR "dec"
159 /* Define to 1 if your processor stores words with the most significant byte
160 first (like Motorola and SPARC, unlike Intel and VAX). */
161 #define WORDS_BIGENDIAN 1
163 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
165 #undef YYTEXT_POINTER
167 /* Version number of package */
169 $! Get VERSION from ../bfd/configure.in
171 $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input
174 mfile := CREATE_BUFFER("mfile", "[-.bfd]configure.in");
175 match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, mfile);
176 IF match_pos <> 0 THEN;
177 POSITION(BEGINNING_OF(match_pos));
179 vers := CURRENT_LINE-")";
184 file := CREATE_BUFFER("file", "config-vms.in");
185 POSITION(END_OF(file));
186 COPY_TEXT("#define VERSION """);
189 WRITE_FILE(file, "config.h");
192 $del/nolog config-vms.in;
193 $ open/append outfile config.h
195 $ write outfile "/* Target alias. */"
196 $ write outfile "#define TARGET_ALIAS ""''target_alias'"""
198 $ write outfile "/* Canonical target. */"
199 $ write outfile "#define TARGET_CANONICAL ""''target_canonical'"""
201 $ write outfile "/* Target CPU. */"
202 $ write outfile "#define TARGET_CPU ""'arch'"""
205 $ write sys$output "Generate gas/build.com"
211 $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd],""../"",[.config])" +-
212 "/name=(as_is,shortened)" +-
213 "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
214 $ FILES="obj-format,atof-targ,app,as,atof-generic,cond,depend,"+-
215 "expr,flonum-konst,flonum-copy,flonum-mult,frags,hash,input-file,"+-
216 "input-scrub,literal,messages,output-file,read,subsegs,symbols,write,"+-
217 "listing,ecoff,stabs,sb,macro,ehopt,dw2gencfi,dwarf2dbg,remap"
218 $ LIBBFD = ",[-.bfd]libbfd.olb/lib"
219 $ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
220 $ LIBOPCODES = ",[-.opcodes]libopcodes.olb/lib"
222 $ write sys$output "CFLAGS=",CFLAGS
225 $ write sys$output "Compiling targ-cpu.c (/noopt)"
226 $ cc 'CFLAGS /noopt targ-cpu
229 $ F = F$ELEMENT(NUM,",",FILES)
230 $ IF F.EQS."," THEN GOTO END
231 $ write sys$output "Compiling ", F, ".c"
239 $ write sys$output "Building as.exe"
240 $ AS_OBJS="targ-cpu," + FILES + LIBOPCODES + LIBBFD + LIBIBERTY
241 $ link/exe=as 'AS_OBJS