/* */
/* */
/* */
-/* (C) 1998-2009, Ullrich von Bassewitz */
+/* (C) 1998-2010, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
" -m name\t\tCreate a map file\n"
" -o name\t\tName the default output file\n"
" -t sys\t\tSet the target system\n"
+ " -u sym\t\tForce an import of symbol `sym'\n"
" -v\t\t\tVerbose mode\n"
" -vm\t\t\tVerbose map file\n"
"\n"
switch (Type) {
case FILETYPE_LIB:
- PathName = SearchFile (Name, SEARCH_LIB);
+ PathName = SearchFile (LibSearchPath, Name);
break;
case FILETYPE_OBJ:
- PathName = SearchFile (Name, SEARCH_OBJ);
+ PathName = SearchFile (ObjSearchPath, Name);
break;
default:
static void OptCfgPath (const char* Opt attribute ((unused)), const char* Arg)
/* Specify a config file search path */
{
- AddSearchPath (Arg, SEARCH_CFG);
+ AddSearchPath (CfgSearchPath, Arg);
}
Error ("Cannot use -C/-t twice");
}
/* Search for the file */
- PathName = SearchFile (Arg, SEARCH_CFG);
+ PathName = SearchFile (CfgSearchPath, Arg);
if (PathName == 0) {
Error ("Cannot find config file `%s'", Arg);
} else {
if (ColPos == 0) {
/* Use default address size (which for now is always absolute
- * addressing)
+ * addressing)
*/
InsertImport (GenImport (Arg, ADDR_SIZE_ABS));
static void OptLibPath (const char* Opt attribute ((unused)), const char* Arg)
/* Specify a library file search path */
{
- AddSearchPath (Arg, SEARCH_LIB);
+ AddSearchPath (LibSearchPath, Arg);
}
static void OptObjPath (const char* Opt attribute ((unused)), const char* Arg)
/* Specify an object file search path */
{
- AddSearchPath (Arg, SEARCH_OBJ);
+ AddSearchPath (ObjSearchPath, Arg);
}
/* Print the assembler version */
{
fprintf (stderr,
- "ld65 V%u.%u.%u - (C) Copyright 1998-2005 Ullrich von Bassewitz\n",
- VER_MAJOR, VER_MINOR, VER_PATCH);
+ "ld65 V%s - (C) Copyright 1998-2009, Ullrich von Bassewitz\n",
+ GetVersionAsString ());
}
case 't':
if (CfgAvail ()) {
- Error ("Cannot use -C/-t twice");
+ Error ("Cannot use -C/-t twice");
}
OptTarget (Arg, GetArg (&I, 2));
break;
+ case 'u':
+ OptForceImport (Arg, GetArg (&I, 2));
+ break;
+
case 'v':
switch (Arg [2]) {
case 'm': VerboseMap = 1; break;
- case '\0': ++Verbosity; break;
- default: UnknownOption (Arg);
+ case '\0': ++Verbosity; break;
+ default: UnknownOption (Arg);
}
break;
case 'L':
switch (Arg [2]) {
/* ## The first one is obsolete and will go */
- case 'n': LabelFileName = GetArg (&I, 3); break;
- default: OptLibPath (Arg, GetArg (&I, 2)); break;
+ case 'n': LabelFileName = GetArg (&I, 3); break;
+ default: OptLibPath (Arg, GetArg (&I, 2)); break;
}
break;