]> git.sur5r.net Git - cc65/blobdiff - src/ca65/incpath.c
Added search paths similar to that of the linker and compiler.
[cc65] / src / ca65 / incpath.c
index 2abd99f6203c57e7d3c360cc9053141fedd8b81f..124e4b20be6849c8a6af397ff9ca34a66d095c6b 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2003 Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2000-2009, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -76,3 +76,23 @@ char* FindInclude (const char* Name)
 
 
 
+void InitIncludePaths (void)
+/* Initialize the include path search list */
+{
+    /* Add some standard paths to the include search path */
+    AddSearchPath ("", INC_STD);               /* Current directory */
+
+    /* Add some compiled in search paths if defined at compile time */
+#ifdef CA65_INC
+    AddSearchPath (CA65_INC, INC_STD);
+#endif
+
+    /* Add specific paths from the environment */
+    AddSearchPathFromEnv ("CA65_INC", INC_STD);
+
+    /* Add paths relative to a main directory defined in an env var */
+    AddSubSearchPathFromEnv ("CC65_HOME", "asminc", INC_STD);
+}
+
+
+