i960 Processor Compiler User's Guide
3-46
3
Default
If you use #include "
filename
" to specify a filename that is not an
absolute pathname, the compiler searches directories in the following
order:
1. the directory containing the primary C source file (the primary
directory).
2. if
I960INC is defined, the directory specified by I960INC.
3. if
I960INC is not defined, the include directory located under the
directory specified by
I960BASE.
For a
filename
included with #include <
filename
>, the compiler
searches directories in the following order:
1. if
I960INC is defined, the directory specified by I960INC.
2. if
I960INC is not defined, the include directory located under the
directory specified by
I960BASE.
Discussion
Use I (Searchinclude) to specify additional directories for the
preprocessor to search to find files specified with
#include. The
preprocessor searches Searchinclude directories before the directory
specified by
I960INC or I960BASE. If you use quotation marks
(
#include "
filename
"), the preprocessor searches the primary
directory first. If you use angle brackets (
#include <
filename
>), the
preprocessor does not search the primary directory.
Examples
1. In the following example, the preprocessor searches:
/usr/home/src (the directory containing proto.c)
/usr/home/include (the Searchinclude directory)
/usr/home/testinclude (the directory specified by I960INC)
The environment variable definitions are:
I960BASE is set to /usr/local/i960
I960INC is set to /usr/home/testinclude