#include "MySystem.h"
#include "BuildCmd.h"
#include "SDCCutil.h"
+#include "dbuf.h"
static char _z80_defaultRules[] =
{
{
const char *s;
char path[PATH_MAX];
+ struct dbuf_s dbuf;
- setMainValue ("z80libspec", "-l\"{port}.lib\"");
+ dbuf_init(&dbuf, PATH_MAX);
+
+ for (s = setFirstItem(libDirsSet); s != NULL; s = setNextItem(libDirsSet))
+ {
+ buildCmdLine2(path, sizeof path, "-k\"%s" DIR_SEPARATOR_STRING "{port}\" ", s);
+ dbuf_append(&dbuf, path, strlen(path));
+ }
+ buildCmdLine2(path, sizeof path, "-l\"{port}.lib\"", s);
+ dbuf_append(&dbuf, path, strlen(path));
+
+ setMainValue ("z80libspec", dbuf_c_str(&dbuf));
+ dbuf_destroy(&dbuf);
for (s = setFirstItem(libDirsSet); s != NULL; s = setNextItem(libDirsSet))
{
return FALSE;
}
+
+#define LINKCMD "link-{port} -nf {dstfilename}"
+/*
#define LINKCMD \
"link-{port} -n -c -- {z80bases} -m -j" \
" {z80libspec}" \
" {z80crt0}" \
" \"{dstfilename}{objext}\"" \
" {z80extraobj}"
+*/
#define ASMCMD \
"as-{port} -plosgff \"{objdstfilename}\" \"{dstfilename}{asmext}\""
"Zilog Z80", /* Target name */
NULL, /* Processor name */
{
+ glue,
FALSE,
MODEL_MEDIUM | MODEL_SMALL,
MODEL_SMALL
NULL,
1
},
+ { NULL, NULL },
{
-1, 0, 0, 4, 0, 2
},
_mangleSupportFunctionName,
_hasNativeMulFor,
TRUE,
+ TRUE, /* little endian */
0, /* leave lt */
0, /* leave gt */
1, /* transform <= to ! > */
"Gameboy Z80-like", /* Target name */
NULL,
{
+ glue,
FALSE,
MODEL_MEDIUM | MODEL_SMALL,
MODEL_SMALL
NULL,
1
},
+ { NULL, NULL },
{
-1, 0, 0, 2, 0, 4
},
_mangleSupportFunctionName,
_hasNativeMulFor,
TRUE,
+ TRUE, /* little endian */
0, /* leave lt */
0, /* leave gt */
1, /* transform <= to ! > */