make -I /usr/include/ncurses doesn't add /usr/include/ncurses to include path

`make --help’ reports “-I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles.”.

I’m working with http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/ncurses_programs.tar.gz which is a tarball of examples referenced in Introduction .

In the ncurses_programs/forms/ directory form_options.c has #include <form.h>. When I run make, I get the error message: “form_options.c:1:18: fatal error: form.h: No such file or directory”. When I add -I /usr/include/ncurses to the invocation, I still get this error.

The output from make shows “gcc -o form_options.o -c form_options.c” as the compiler command. This also results in the form.h not found error. Adding -I /usr/include/ncurses to that command, however, results in a successful compilation.

Is there something wrong with the documentation for `make’, or am I doing something wrong?

export C_INCLUDE_PATH=/usr/include/ncurses' enables make’ to compile this code without arguments.

`make --version’
GNU Make 3.82
Built for i686-pc-linux-gnu

`cat /etc/SuSE-release’
openSUSE 11.4 (i586)
VERSION = 11.4
CODENAME = Celadon

I figured it out. “-I” passed to make' tells make’ where to find files to be included in the Makefile, not in the source code to be compiled.

Change

CC=gcc

to

CC=gcc -I /usr/include/ncurses

In the makefiles under forms, menus, and panels.
After that everything seems to be golden.