]> git.saurik.com Git - apple/boot.git/blame - i386/nasm/outform.h
boot-132.tar.gz
[apple/boot.git] / i386 / nasm / outform.h
CommitLineData
14c7c974
A
1/*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
4f6e3300
A
6 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.1 (the "License"). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
12 * this file.
14c7c974
A
13 *
14 * The Original Code and all software distributed under the License are
4f6e3300 15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14c7c974
A
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
4f6e3300
A
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
20 * under the License.
14c7c974
A
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24/* outform.h header file for binding output format drivers to the
25 * remainder of the code in the Netwide Assembler
26 *
27 * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
28 * Julian Hall. All rights reserved. The software is
29 * redistributable under the licence given in the file "Licence"
30 * distributed in the NASM archive.
31 */
32
33/*
34 * This header file allows configuration of which output formats
35 * get compiled into the NASM binary. You can configure by defining
36 * various preprocessor symbols beginning with "OF_", either on the
37 * compiler command line or at the top of this file.
38 *
39 * OF_ONLY -- only include specified object formats
40 * OF_name -- ensure that output format 'name' is included
41 * OF_NO_name -- remove output format 'name'
42 * OF_DOS -- ensure that 'obj', 'bin' & 'win32' are included.
43 * OF_UNIX -- ensure that 'aout', 'aoutb', 'coff', 'elf' are in.
44 * OF_OTHERS -- ensure that 'bin', 'as86' & 'rdf' are in.
45 * OF_ALL -- ensure that all formats are included.
46 *
47 * OF_DEFAULT=of_name -- ensure that 'name' is the default format.
48 *
49 * eg: -DOF_UNIX -DOF_ELF -DOF_DEFAULT=of_elf would be a suitable config
50 * for an average linux system.
51 *
52 * Default config = -DOF_ALL -DOF_DEFAULT=of_bin
53 *
54 * You probably only want to set these options while compiling 'nasm.c'. */
55
56#ifndef NASM_OUTFORM_H
57#define NASM_OUTFORM_H
58
59#include "nasm.h"
60
61#define MAX_OUTPUT_FORMATS 16
62
63struct ofmt *ofmt_find(char *);
64void ofmt_list(struct ofmt *, FILE *);
65void ofmt_register (struct ofmt *);
66
67/* -------------- USER MODIFIABLE PART ---------------- */
68
69/*
70 * Insert #defines here in accordance with the configuration
71 * instructions above.
72 *
73 * E.g.
74 *
75 * #define OF_ONLY
76 * #define OF_OBJ
77 * #define OF_BIN
78 *
79 * for a 16-bit DOS assembler with no extraneous formats.
80 */
81
82/* ------------ END USER MODIFIABLE PART -------------- */
83
84/* ====configurable info begins here==== */
85/* formats configurable:
86 * bin,obj,elf,aout,aoutb,coff,win32,as86,rdf */
87
88/* process options... */
89
90#ifndef OF_ONLY
91#ifndef OF_ALL
92#define OF_ALL /* default is to have all formats */
93#endif
94#endif
95
96#ifdef OF_ALL /* set all formats on... */
97#ifndef OF_BIN
98#define OF_BIN
99#endif
100#ifndef OF_OBJ
101#define OF_OBJ
102#endif
103#ifndef OF_ELF
104#define OF_ELF
105#endif
106#ifndef OF_COFF
107#define OF_COFF
108#endif
109#ifndef OF_AOUT
110#define OF_AOUT
111#endif
112#ifndef OF_AOUTB
113#define OF_AOUTB
114#endif
115#ifndef OF_WIN32
116#define OF_WIN32
117#endif
118#ifndef OF_AS86
119#define OF_AS86
120#endif
121#ifndef OF_RDF
122#define OF_RDF
123#endif
124#endif /* OF_ALL */
125
126/* turn on groups of formats specified.... */
127#ifdef OF_DOS
128#ifndef OF_OBJ
129#define OF_OBJ
130#endif
131#ifndef OF_BIN
132#define OF_BIN
133#endif
134#ifndef OF_WIN32
135#define OF_WIN32
136#endif
137#endif
138
139#ifdef OF_UNIX
140#ifndef OF_AOUT
141#define OF_AOUT
142#endif
143#ifndef OF_AOUTB
144#define OF_AOUTB
145#endif
146#ifndef OF_COFF
147#define OF_COFF
148#endif
149#ifndef OF_ELF
150#define OF_ELF
151#endif
152#endif
153
154#ifdef OF_OTHERS
155#ifndef OF_BIN
156#define OF_BIN
157#endif
158#ifndef OF_AS86
159#define OF_AS86
160#endif
161#ifndef OF_RDF
162#define OF_RDF
163#endif
164#endif
165
166/* finally... override any format specifically specifed to be off */
167#ifdef OF_NO_BIN
168#undef OF_BIN
169#endif
170#ifdef OF_NO_OBJ
171#undef OF_OBJ
172#endif
173#ifdef OF_NO_ELF
174#undef OF_ELF
175#endif
176#ifdef OF_NO_AOUT
177#undef OF_AOUT
178#endif
179#ifdef OF_NO_AOUTB
180#undef OF_AOUTB
181#endif
182#ifdef OF_NO_COFF
183#undef OF_COFF
184#endif
185#ifdef OF_NO_WIN32
186#undef OF_WIN32
187#endif
188#ifdef OF_NO_AS86
189#undef OF_AS86
190#endif
191#ifdef OF_NO_RDF
192#undef OF_RDF
193#endif
194
195#ifndef OF_DEFAULT
196#define OF_DEFAULT of_bin
197#endif
198
199#endif /* NASM_OUTFORM_H */