2000-05-28 13:40:48 +00:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/* */
|
2000-08-23 14:13:24 +00:00
|
|
|
|
/* tgtcfg.c */
|
2000-05-28 13:40:48 +00:00
|
|
|
|
/* */
|
2000-08-23 14:13:24 +00:00
|
|
|
|
/* Target machine configurations the ld65 linker */
|
2000-05-28 13:40:48 +00:00
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
2003-02-16 14:32:13 +00:00
|
|
|
|
/* (C) 1998-2003 Ullrich von Bassewitz */
|
|
|
|
|
/* R<>merstrasse 52 */
|
|
|
|
|
/* D-70794 Filderstadt */
|
|
|
|
|
/* EMail: uz@cc65.org */
|
2000-05-28 13:40:48 +00:00
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* This software is provided 'as-is', without any expressed or implied */
|
|
|
|
|
/* warranty. In no event will the authors be held liable for any damages */
|
|
|
|
|
/* arising from the use of this software. */
|
|
|
|
|
/* */
|
|
|
|
|
/* Permission is granted to anyone to use this software for any purpose, */
|
|
|
|
|
/* including commercial applications, and to alter it and redistribute it */
|
|
|
|
|
/* freely, subject to the following restrictions: */
|
|
|
|
|
/* */
|
|
|
|
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
|
|
|
/* claim that you wrote the original software. If you use this software */
|
|
|
|
|
/* in a product, an acknowledgment in the product documentation would be */
|
|
|
|
|
/* appreciated but is not required. */
|
|
|
|
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
|
|
|
/* be misrepresented as being the original software. */
|
|
|
|
|
/* 3. This notice may not be removed or altered from any source */
|
|
|
|
|
/* distribution. */
|
|
|
|
|
/* */
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
2000-09-07 21:49:32 +00:00
|
|
|
|
|
2003-02-16 14:32:13 +00:00
|
|
|
|
/* common */
|
|
|
|
|
#include "check.h"
|
|
|
|
|
|
|
|
|
|
/* ld65 */
|
2000-05-28 13:40:48 +00:00
|
|
|
|
#include "binfmt.h"
|
2000-08-23 14:13:24 +00:00
|
|
|
|
#include "tgtcfg.h"
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/* Target configurations */
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
2000-11-30 08:55:16 +00:00
|
|
|
|
|
2000-10-31 18:08:25 +00:00
|
|
|
|
/* An empty config */
|
|
|
|
|
static const char CfgEmpty[] = "";
|
2000-11-30 08:55:16 +00:00
|
|
|
|
|
2000-10-31 18:08:25 +00:00
|
|
|
|
/* Actual target configurations, converted into C strings by a perl script */
|
|
|
|
|
#include "apple2.inc"
|
|
|
|
|
#include "atari.inc"
|
2002-06-03 20:14:11 +00:00
|
|
|
|
#include "atmos.inc"
|
2000-11-30 08:55:16 +00:00
|
|
|
|
#include "bbc.inc"
|
2000-10-31 18:08:25 +00:00
|
|
|
|
#include "c128.inc"
|
2002-11-21 21:22:26 +00:00
|
|
|
|
#include "c16.inc"
|
2000-10-31 18:08:25 +00:00
|
|
|
|
#include "c64.inc"
|
2001-09-13 19:49:27 +00:00
|
|
|
|
#include "cbm510.inc"
|
2000-10-31 18:08:25 +00:00
|
|
|
|
#include "cbm610.inc"
|
|
|
|
|
#include "geos.inc"
|
2001-12-01 13:34:51 +00:00
|
|
|
|
#include "lunix.inc"
|
2002-04-25 05:14:14 +00:00
|
|
|
|
#include "module.inc"
|
2003-05-02 13:49:49 +00:00
|
|
|
|
#include "nes.inc"
|
2000-10-31 18:08:25 +00:00
|
|
|
|
#include "none.inc"
|
|
|
|
|
#include "pet.inc"
|
|
|
|
|
#include "plus4.inc"
|
2003-10-10 16:30:55 +00:00
|
|
|
|
#include "supervision.inc"
|
2002-08-07 05:18:13 +00:00
|
|
|
|
#include "vic20.inc"
|
2001-09-13 19:49:27 +00:00
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2002-04-25 05:14:14 +00:00
|
|
|
|
/* Data */
|
2000-05-28 13:40:48 +00:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-08-23 14:13:24 +00:00
|
|
|
|
/* Target configurations for all systems */
|
|
|
|
|
const TargetDesc Targets [TGT_COUNT] = {
|
2002-04-25 05:14:14 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgNone },
|
|
|
|
|
{ BINFMT_O65, CfgModule },
|
|
|
|
|
{ BINFMT_BINARY, CfgAtari },
|
2002-08-07 05:18:13 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgVic20 },
|
2002-11-21 21:22:26 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgC16 },
|
2002-04-25 05:14:14 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgC64 },
|
|
|
|
|
{ BINFMT_BINARY, CfgC128 },
|
2000-11-30 08:55:16 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgEmpty }, /* Ace */
|
2002-04-25 05:14:14 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgPlus4 },
|
|
|
|
|
{ BINFMT_BINARY, CfgCBM510 },
|
|
|
|
|
{ BINFMT_BINARY, CfgCBM610 },
|
|
|
|
|
{ BINFMT_BINARY, CfgPET },
|
|
|
|
|
{ BINFMT_BINARY, CfgBBC },
|
|
|
|
|
{ BINFMT_BINARY, CfgApple2 },
|
|
|
|
|
{ BINFMT_BINARY, CfgGeos },
|
2001-12-01 13:34:51 +00:00
|
|
|
|
{ BINFMT_O65, CfgLunix },
|
2002-06-15 12:03:06 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgAtmos },
|
2003-05-02 13:49:49 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgNES },
|
2003-10-10 16:30:55 +00:00
|
|
|
|
{ BINFMT_BINARY, CfgSupervision },
|
2000-05-28 13:40:48 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-02-16 14:32:13 +00:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/* Code */
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DumpBuiltinConfig (FILE* F, target_t T)
|
|
|
|
|
/* Dump a builtin linker configuration */
|
|
|
|
|
{
|
|
|
|
|
/* Check the given parameter */
|
|
|
|
|
PRECONDITION (T > TGT_UNKNOWN && T < TGT_COUNT);
|
|
|
|
|
|
|
|
|
|
/* Dump the config */
|
|
|
|
|
fprintf (F, "%s\n", Targets[T].Cfg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-10-10 16:30:55 +00:00
|
|
|
|
|