/*****************************************************************************/
/* */
-/* incpath.c */
+/* incpath.c */
/* */
-/* Include path handling for cc65 */
+/* Include path handling for cc65 */
/* */
/* */
/* */
-/* (C) 2000-2012, Ullrich von Bassewitz */
+/* (C) 2000-2013, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/*****************************************************************************/
-/* Data */
+/* Data */
/*****************************************************************************/
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
-void ForgetAllIncludePaths (void)
-/* Remove all include search paths. */
-{
- ForgetSearchPath (SysIncSearchPath);
- ForgetSearchPath (UsrIncSearchPath);
-}
-
-
-
void InitIncludePaths (void)
/* Initialize the include path search list */
{
/* 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
+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 */
+ /* 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
+
+ /* Add paths relative to the parent directory of the Windows binary. */
+ AddSubSearchPathFromWinBin (SysIncSearchPath, "include");
}