]> git.sur5r.net Git - cc65/blob - src/ld65/tgtcfg.c
New target APPLE2ENH
[cc65] / src / ld65 / tgtcfg.c
1 /*****************************************************************************/
2 /*                                                                           */
3 /*                               tgtcfg.c                                    */
4 /*                                                                           */
5 /*               Target machine configurations the ld65 linker               */
6 /*                                                                           */
7 /*                                                                           */
8 /*                                                                           */
9 /* (C) 1998-2003 Ullrich von Bassewitz                                       */
10 /*               Römerstrasse 52                                             */
11 /*               D-70794 Filderstadt                                         */
12 /* EMail:        uz@cc65.org                                                 */
13 /*                                                                           */
14 /*                                                                           */
15 /* This software is provided 'as-is', without any expressed or implied       */
16 /* warranty.  In no event will the authors be held liable for any damages    */
17 /* arising from the use of this software.                                    */
18 /*                                                                           */
19 /* Permission is granted to anyone to use this software for any purpose,     */
20 /* including commercial applications, and to alter it and redistribute it    */
21 /* freely, subject to the following restrictions:                            */
22 /*                                                                           */
23 /* 1. The origin of this software must not be misrepresented; you must not   */
24 /*    claim that you wrote the original software. If you use this software   */
25 /*    in a product, an acknowledgment in the product documentation would be  */
26 /*    appreciated but is not required.                                       */
27 /* 2. Altered source versions must be plainly marked as such, and must not   */
28 /*    be misrepresented as being the original software.                      */
29 /* 3. This notice may not be removed or altered from any source              */
30 /*    distribution.                                                          */
31 /*                                                                           */
32 /*****************************************************************************/
33
34
35
36 /* common */
37 #include "check.h"
38
39 /* ld65 */
40 #include "binfmt.h"
41 #include "tgtcfg.h"
42
43
44
45 /*****************************************************************************/
46 /*                           Target configurations                           */
47 /*****************************************************************************/
48
49
50
51 /* An empty config */
52 static const char CfgEmpty[] = "";
53
54 /* Actual target configurations, converted into C strings by a perl script */
55 #include "apple2.inc"
56 #include "apple2enh.inc"
57 #include "atari.inc"
58 #include "atmos.inc"
59 #include "bbc.inc"
60 #include "c128.inc"
61 #include "c16.inc"
62 #include "c64.inc"
63 #include "cbm510.inc"
64 #include "cbm610.inc"
65 #include "geos.inc"
66 #include "lunix.inc"
67 #include "module.inc"
68 #include "nes.inc"
69 #include "none.inc"
70 #include "pet.inc"
71 #include "plus4.inc"
72 #include "supervision.inc"
73 #include "vic20.inc"
74
75
76
77 /*****************************************************************************/
78 /*                                   Data                                    */
79 /*****************************************************************************/
80
81
82                                           
83 /* Target configurations for all systems */
84 const TargetDesc Targets [TGT_COUNT] = {
85     {   BINFMT_BINARY,  CfgNone         },
86     {   BINFMT_O65,     CfgModule       },
87     {   BINFMT_BINARY,  CfgAtari        },
88     {   BINFMT_BINARY,  CfgVic20        },
89     {   BINFMT_BINARY,  CfgC16          },
90     {   BINFMT_BINARY,  CfgC64          },
91     {   BINFMT_BINARY,  CfgC128         },
92     {   BINFMT_BINARY,  CfgEmpty        },      /* Ace */
93     {   BINFMT_BINARY,  CfgPlus4        },
94     {   BINFMT_BINARY,  CfgCBM510       },
95     {   BINFMT_BINARY,  CfgCBM610       },
96     {   BINFMT_BINARY,  CfgPET          },
97     {   BINFMT_BINARY,  CfgBBC          },
98     {   BINFMT_BINARY,  CfgApple2       },
99     {   BINFMT_BINARY,  CfgApple2Enh    },
100     {   BINFMT_BINARY,  CfgGeos         },
101     {   BINFMT_O65,     CfgLunix        },
102     {   BINFMT_BINARY,  CfgAtmos        },
103     {   BINFMT_BINARY,  CfgNES          },
104     {   BINFMT_BINARY,  CfgSupervision  },
105 };
106
107
108
109 /*****************************************************************************/
110 /*                                   Code                                    */
111 /*****************************************************************************/
112
113
114
115 void DumpBuiltinConfig (FILE* F, target_t T)
116 /* Dump a builtin linker configuration */
117 {
118     /* Check the given parameter */
119     PRECONDITION (T > TGT_UNKNOWN && T < TGT_COUNT);
120
121     /* Dump the config */
122     fprintf (F, "%s\n", Targets[T].Cfg);
123 }
124
125
126
127