1 /* outform.h header file for binding output format drivers to the
2 * remainder of the code in the Netwide Assembler
4 * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
5 * Julian Hall. All rights reserved. The software is
6 * redistributable under the licence given in the file "Licence"
7 * distributed in the NASM archive.
11 * This header file allows configuration of which output formats
12 * get compiled into the NASM binary. You can configure by defining
13 * various preprocessor symbols beginning with "OF_", either on the
14 * compiler command line or at the top of this file.
16 * OF_ONLY -- only include specified object formats
17 * OF_name -- ensure that output format 'name' is included
18 * OF_NO_name -- remove output format 'name'
19 * OF_DOS -- ensure that 'obj', 'bin' & 'win32' are included.
20 * OF_UNIX -- ensure that 'aout', 'aoutb', 'coff', 'elf32' 'elf64' are in.
21 * OF_OTHERS -- ensure that 'bin', 'as86' & 'rdf' are in.
22 * OF_ALL -- ensure that all formats are included.
23 * note that this doesn't include 'dbg', which is
24 * only really useful if you're doing development
25 * work on NASM. Define OF_DBG if you want this.
27 * OF_DEFAULT=of_name -- ensure that 'name' is the default format.
29 * eg: -DOF_UNIX -DOF_ELF32 -DOF_DEFAULT=of_elf32 would be a suitable config
30 * for an average linux system.
32 * Default config = -DOF_ALL -DOF_DEFAULT=of_bin
34 * You probably only want to set these options while compiling 'nasm.c'. */
36 #ifndef NASM_OUTFORM_H
37 #define NASM_OUTFORM_H
41 /* -------------- USER MODIFIABLE PART ---------------- */
44 * Insert #defines here in accordance with the configuration
53 * for a 16-bit DOS assembler with no extraneous formats.
56 /* ------------ END USER MODIFIABLE PART -------------- */
58 /* ====configurable info begins here==== */
59 /* formats configurable:
60 * bin,obj,elf32,elf64,aout,aoutb,coff,win32,as86,rdf2,macho */
62 /* process options... */
66 #define OF_ALL /* default is to have all formats */
70 #ifdef OF_ALL /* set all formats on... */
112 /* turn on groups of formats specified.... */
164 /* finally... override any format specifically specified to be off */
206 #define OF_DEFAULT of_bin
209 #ifdef BUILD_DRIVERS_ARRAY /* only if included from outform.c */
211 /* pull in the externs for the different formats, then make the *drivers
212 * array based on the above defines */
214 extern struct ofmt of_bin
;
215 extern struct ofmt of_aout
;
216 extern struct ofmt of_aoutb
;
217 extern struct ofmt of_coff
;
218 extern struct ofmt of_elf32
;
219 extern struct ofmt of_elf
;
220 extern struct ofmt of_elf64
;
221 extern struct ofmt of_as86
;
222 extern struct ofmt of_obj
;
223 extern struct ofmt of_win32
;
224 extern struct ofmt of_win64
;
225 extern struct ofmt of_rdf2
;
226 extern struct ofmt of_ieee
;
227 extern struct ofmt of_macho
;
228 extern struct ofmt of_dbg
;
230 struct ofmt
*drivers
[] = {
278 #endif /* BUILD_DRIVERS_ARRAY */
280 struct ofmt
*ofmt_find(char *);
281 struct dfmt
*dfmt_find(struct ofmt
*, char *);
282 void ofmt_list(struct ofmt
*, FILE *);
283 void dfmt_list(struct ofmt
*ofmt
, FILE * fp
);
284 struct ofmt
*ofmt_register(efunc error
);
286 #endif /* NASM_OUTFORM_H */