mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Add -E option to rgbds, allows exporting all labels by default
This commit is contained in:
@@ -257,7 +257,7 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
printf(
|
||||
"Usage: rgbasm [-hv] [-b chars] [-Dname[=value]] [-g chars] [-i path]\n"
|
||||
"Usage: rgbasm [-hvE] [-b chars] [-Dname[=value]] [-g chars] [-i path]\n"
|
||||
" [-o outfile] [-p pad_value] file.asm\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -296,12 +296,13 @@ main(int argc, char *argv[])
|
||||
DefaultOptions.fillchar = 0;
|
||||
DefaultOptions.verbose = false;
|
||||
DefaultOptions.haltnop = true;
|
||||
DefaultOptions.exportall = false;
|
||||
|
||||
opt_SetCurrentOptions(&DefaultOptions);
|
||||
|
||||
newopt = CurrentOptions;
|
||||
|
||||
while ((ch = getopt(argc, argv, "b:D:g:hi:o:p:v")) != -1) {
|
||||
while ((ch = getopt(argc, argv, "b:D:g:hi:o:p:vE")) != -1) {
|
||||
switch (ch) {
|
||||
case 'b':
|
||||
if (strlen(optarg) == 2) {
|
||||
@@ -348,6 +349,9 @@ main(int argc, char *argv[])
|
||||
case 'v':
|
||||
newopt.verbose = true;
|
||||
break;
|
||||
case 'E':
|
||||
newopt.exportall = true;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
@@ -379,6 +383,7 @@ main(int argc, char *argv[])
|
||||
nPass = 1;
|
||||
nErrors = 0;
|
||||
sym_PrepPass1();
|
||||
sym_SetExportAll(CurrentOptions.exportall);
|
||||
fstk_Init(tzMainfile);
|
||||
opt_ParseDefines();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user