NASM 0.97
[nasm/avx512.git] / outform.h
blobe23f3c79977da9c953220eae59cca0a5c73e5fdc
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.
8 */
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', 'elf' are in.
21 * OF_OTHERS -- ensure that 'bin', 'as86' & 'rdf' are in.
22 * OF_ALL -- ensure that all formats are included.
24 * OF_DEFAULT=of_name -- ensure that 'name' is the default format.
26 * eg: -DOF_UNIX -DOF_ELF -DOF_DEFAULT=of_elf would be a suitable config
27 * for an average linux system.
29 * Default config = -DOF_ALL -DOF_DEFAULT=of_bin
31 * You probably only want to set these options while compiling 'nasm.c'. */
33 #ifndef NASM_OUTFORM_H
34 #define NASM_OUTFORM_H
36 #include "nasm.h"
38 #define MAX_OUTPUT_FORMATS 16
40 struct ofmt *ofmt_find(char *);
41 void ofmt_list(struct ofmt *, FILE *);
42 void ofmt_register (struct ofmt *);
44 /* -------------- USER MODIFIABLE PART ---------------- */
47 * Insert #defines here in accordance with the configuration
48 * instructions above.
50 * E.g.
52 * #define OF_ONLY
53 * #define OF_OBJ
54 * #define OF_BIN
56 * for a 16-bit DOS assembler with no extraneous formats.
59 /* ------------ END USER MODIFIABLE PART -------------- */
61 /* ====configurable info begins here==== */
62 /* formats configurable:
63 * bin,obj,elf,aout,aoutb,coff,win32,as86,rdf */
65 /* process options... */
67 #ifndef OF_ONLY
68 #ifndef OF_ALL
69 #define OF_ALL /* default is to have all formats */
70 #endif
71 #endif
73 #ifdef OF_ALL /* set all formats on... */
74 #ifndef OF_BIN
75 #define OF_BIN
76 #endif
77 #ifndef OF_OBJ
78 #define OF_OBJ
79 #endif
80 #ifndef OF_ELF
81 #define OF_ELF
82 #endif
83 #ifndef OF_COFF
84 #define OF_COFF
85 #endif
86 #ifndef OF_AOUT
87 #define OF_AOUT
88 #endif
89 #ifndef OF_AOUTB
90 #define OF_AOUTB
91 #endif
92 #ifndef OF_WIN32
93 #define OF_WIN32
94 #endif
95 #ifndef OF_AS86
96 #define OF_AS86
97 #endif
98 #ifndef OF_RDF
99 #define OF_RDF
100 #endif
101 #endif /* OF_ALL */
103 /* turn on groups of formats specified.... */
104 #ifdef OF_DOS
105 #ifndef OF_OBJ
106 #define OF_OBJ
107 #endif
108 #ifndef OF_BIN
109 #define OF_BIN
110 #endif
111 #ifndef OF_WIN32
112 #define OF_WIN32
113 #endif
114 #endif
116 #ifdef OF_UNIX
117 #ifndef OF_AOUT
118 #define OF_AOUT
119 #endif
120 #ifndef OF_AOUTB
121 #define OF_AOUTB
122 #endif
123 #ifndef OF_COFF
124 #define OF_COFF
125 #endif
126 #ifndef OF_ELF
127 #define OF_ELF
128 #endif
129 #endif
131 #ifdef OF_OTHERS
132 #ifndef OF_BIN
133 #define OF_BIN
134 #endif
135 #ifndef OF_AS86
136 #define OF_AS86
137 #endif
138 #ifndef OF_RDF
139 #define OF_RDF
140 #endif
141 #endif
143 /* finally... override any format specifically specifed to be off */
144 #ifdef OF_NO_BIN
145 #undef OF_BIN
146 #endif
147 #ifdef OF_NO_OBJ
148 #undef OF_OBJ
149 #endif
150 #ifdef OF_NO_ELF
151 #undef OF_ELF
152 #endif
153 #ifdef OF_NO_AOUT
154 #undef OF_AOUT
155 #endif
156 #ifdef OF_NO_AOUTB
157 #undef OF_AOUTB
158 #endif
159 #ifdef OF_NO_COFF
160 #undef OF_COFF
161 #endif
162 #ifdef OF_NO_WIN32
163 #undef OF_WIN32
164 #endif
165 #ifdef OF_NO_AS86
166 #undef OF_AS86
167 #endif
168 #ifdef OF_NO_RDF
169 #undef OF_RDF
170 #endif
172 #ifndef OF_DEFAULT
173 #define OF_DEFAULT of_bin
174 #endif
176 #endif /* NASM_OUTFORM_H */