gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit dd2250053fb9f3ad9595cf743c8a714cd772b80a parent 00e8bbdf135b5cad8e21dfdfd93a9dc4789d36db Author: bbbbbr <bbbbbr@users.noreply.github.com> Date: Fri, 2 May 2025 11:42:28 -0700 Merge pull request #770 from bbbbbr/lcc/makenes_makecom_arg_pass lcc: arg passing flags for makenes (-Wn) makecom(-Wc) Diffstat:
| M | gbdk-support/lcc/lcc.c | 15 | ++++++++++++--- |
| M | gbdk-support/lcc/targets.c | 4 | ++-- |
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/gbdk-support/lcc/lcc.c b/gbdk-support/lcc/lcc.c @@ -83,6 +83,7 @@ static int autobankflag; /* -K specified */ int verbose; /* incremented for each -v */ static List bankpack_flags; /* bankpack flags */ static List ihxchecklist; /* ihxcheck flags */ +static List postproclist; /* postproc flags */ static List mkbinlist; /* loader files, flags */ // Index entries for llist[] @@ -318,9 +319,10 @@ int main(int argc, char *argv[]) { if (callsys(av)) errcnt++; - // post-process step (such as makecom), if applicable + // Post-process step (such as makecom, makenes), if applicable + // This won't apply if the targets .postproc template entry is empty ("") if ((strlen(postproc) != 0) && (errcnt == 0)) { - compose(postproc, append(binFile, 0), append(outfile, 0), 0); + compose(postproc, postproclist, append(binFile, 0), append(outfile, 0)); if (callsys(av)) errcnt++; } @@ -799,7 +801,8 @@ static void help(void) { "-Uname undefine the preprocessor symbol `name'\n", "-v show commands as they are executed; 2nd -v suppresses execution\n", "-Woarg specify system-specific `arg'\n", -"-W[pfablim]arg pass `arg' to the preprocessor, compiler, assembler, bankpack, linker, ihxcheck, or makebin\n", +"-W[pfablimnc]arg pass `arg' to the (p)preprocessor, (f)compiler, (a)assembler, (b)bankpack,\n" +" (l)linker, (i)ihxcheck, (m)makebin, (n)makenes, (c)makecom\n", 0 }; int i; char *s; @@ -905,6 +908,12 @@ static void opt(char *arg) { case 'i': /* ihxcheck arg list */ ihxchecklist = append(&arg[3], ihxchecklist); return; + case 'n': /* makenes arg list */ + postproclist = append(&arg[3], postproclist); + return; + case 'c': /* makecom arg list */ + postproclist = append(&arg[3], postproclist); + return; case 'b': /* auto bankpack_flags arg list */ bankpack_flags = append(&arg[3], bankpack_flags); // -Wb-ext=[.some-extension] diff --git a/gbdk-support/lcc/targets.c b/gbdk-support/lcc/targets.c @@ -148,7 +148,7 @@ CLASS classes[] = { .ld = "%ld_z80% -a sms -n -i -j $1 %libs_include% $3 %crt0dir% $2", .ihxcheck = "%ihxcheck% $2 $1", .mkbin = "%mkbin% $1 $2 $3", - .postproc = "%mkcom% $1 $2", + .postproc = "%mkcom% $1 $2 $3", .llist0_defaults = llist0_defaults_msxdos, .llist0_defaults_len= ARRAY_LEN(llist0_defaults_msxdos), }, @@ -166,7 +166,7 @@ CLASS classes[] = { .ld = "%ld_6808% -a nes -n -i -j $1 %libs_include% $3 %crt0dir% $2", .ihxcheck = "%ihxcheck% $2 $1", .mkbin = "%mkbin% -N -yo A $1 $2 $3", - .postproc = "%mknes% -m 30 -n 0 -b 0 -a 1 $1 $2", + .postproc = "%mknes% -m 30 -n 0 -b 0 -a 1 $1 $2 $3", .llist0_defaults = llist0_defaults_nes, .llist0_defaults_len= ARRAY_LEN(llist0_defaults_nes), }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.