Makefile + #includes

Dear all

I try to write a makefile for my code which have many source files, 1 header file that i make and exist into same folder with other source files and some other header files (by libraries witch i use) that found in other folders.

In my header file i have put all other #includes for residuals headers and by each source file, i call only my header file.

The problem is in first step at compiling source files to object.

When it tries to compile that source file in which exist some new variable type by other libraries, give me an error that no recognizes this type.

How must i write the makefile? Why occur this?

My crystal ball is still in for maintenance. Please paste the actual error messages.

when it tries to compile createrunstruct file, it is occur this:

createrunstruct.c: In function �createrunstruct':
createrunstruct.c:31: error: �idxtype' undeclared (first use in this function)
createrunstruct.c:31: error: (Each undeclared identifier is reported only once
createrunstruct.c:31: error: for each function it appears in.)
make: *** [createrunstruct.o] Error 1

It means what it says: 'idxtype' is undeclared. Either you haven't included the right header, or your use of the type is wrong. Beyond that I can't tell, you'd need to post the source code.