1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

Changed the order of directories that are searched for include files.

This commit is contained in:
Greg King 2013-05-03 23:25:06 -04:00
parent 39a877175b
commit be5a5e03d8
6 changed files with 53 additions and 29 deletions

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000-2010, Ullrich von Bassewitz */
/* (C) 2000-2013, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -70,17 +70,23 @@ void InitIncludePaths (void)
/* Create the search path lists */
IncSearchPath = NewSearchPath ();
BinSearchPath = NewSearchPath ();
/* Add some compiled in search paths if defined at compile time */
#ifdef CA65_INC
AddSearchPath (IncSearchPath, STRINGIZE (CA65_INC));
#endif
/* Add specific paths from the environment */
AddSearchPathFromEnv (IncSearchPath, "CA65_INC");
/* Add paths relative to a main directory defined in an env var */
AddSubSearchPathFromEnv (IncSearchPath, "CC65_HOME", "asminc");
}
void FinishIncludePaths (void)
/* Finish creating the include path search list. */
{
/* Add specific paths from the environment */
AddSearchPathFromEnv (IncSearchPath, "CA65_INC");
/* Add paths relative to a main directory defined in an env. var. */
AddSubSearchPathFromEnv (IncSearchPath, "CC65_HOME", "asminc");
/* Add some compiled-in search paths if defined at compile time. */
#ifdef CA65_INC
AddSearchPath (IncSearchPath, STRINGIZE (CA65_INC));
#endif
}

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000-2010, Ullrich von Bassewitz */
/* (C) 2000-2013, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -66,6 +66,9 @@ void ForgetAllIncludePaths (void);
void InitIncludePaths (void);
/* Initialize the include path search list */
void FinishIncludePaths (void);
/* Finish creating the include path search list. */
/* End of incpath.h */

View File

@ -5,7 +5,7 @@
/* */
/* */
/* */
/* (C) 1998-2012, Ullrich von Bassewitz */
/* (C) 1998-2013, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -1016,6 +1016,9 @@ int main (int argc, char* argv [])
exit (EXIT_FAILURE);
}
/* Add the default include search paths. */
FinishIncludePaths ();
/* If no CPU given, use the default CPU for the target */
if (GetCPU () == CPU_UNKNOWN) {
if (Target != TGT_UNKNOWN) {

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000-2012, Ullrich von Bassewitz */
/* (C) 2000-2013, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -70,18 +70,24 @@ void InitIncludePaths (void)
/* Create the search path lists */
SysIncSearchPath = NewSearchPath ();
UsrIncSearchPath = NewSearchPath ();
/* Add some compiled in search paths if defined at compile time */
#ifdef CC65_INC
AddSearchPath (SysIncSearchPath, STRINGIZE (CC65_INC));
#endif
/* Add specific paths from the environment */
AddSearchPathFromEnv (SysIncSearchPath, "CC65_INC");
AddSearchPathFromEnv (UsrIncSearchPath, "CC65_INC");
/* Add paths relative to a main directory defined in an env var */
AddSubSearchPathFromEnv (SysIncSearchPath, "CC65_HOME", "include");
}
void FinishIncludePaths (void)
/* Finish creating the include path search lists. */
{
/* Add specific paths from the environment */
AddSearchPathFromEnv (SysIncSearchPath, "CC65_INC");
AddSearchPathFromEnv (UsrIncSearchPath, "CC65_INC");
/* Add paths relative to a main directory defined in an env. var. */
AddSubSearchPathFromEnv (SysIncSearchPath, "CC65_HOME", "include");
/* Add some compiled-in search paths if defined at compile time. */
#ifdef CC65_INC
AddSearchPath (SysIncSearchPath, STRINGIZE (CC65_INC));
#endif
}

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000-2010, Ullrich von Bassewitz */
/* (C) 2000-2013, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -66,6 +66,9 @@ void ForgetAllIncludePaths (void);
void InitIncludePaths (void);
/* Initialize the include path search list */
void FinishIncludePaths (void);
/* Finish creating the include path search lists. */
/* End of incpath.h */

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000-2012, Ullrich von Bassewitz */
/* (C) 2000-2013, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@ -957,6 +957,9 @@ int main (int argc, char* argv[])
AbEnd ("No input files");
}
/* Add the default include search paths. */
FinishIncludePaths ();
/* Create the output file name if it was not explicitly given */
MakeDefaultOutputName (InputFile);