[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Including Header Files

From: Larry Barello
Subject: Re: [avr-gcc-list] Including Header Files
Date: Sun, 8 Jun 2003 17:53:13 -0700

You tell the compiler where to look for stuff via the -I <path> command.  You 
can enter
multiple -I commands to specify multiple paths to search.

Make doesn't know anything.  You have to tell it.  there are tools for 
scanning files and adding the dependencies to the end of your makefile.  I end 
up just
doing it by hand.


mysource.o:    mysource.c myheader.h anotherheader.h makefile

I have a line, like the above, for each of my source files, at the end of the 


----- Original Message ----- 
From: "Donovan Parks" <address@hidden>

> Hello,
> I am new to AVR's and the GCC compiler and am hoping someone can help me out
> with the following problem.  I am using avr-gcc 3.3 from the AVR Freaks
> website.  What I am confused about is how "make" knows that header files
> (such as io.h) are (the directory they reside in is not used by the
> makefile).  In the same vein, I am at a loss as to how I can in include a
> *.h file that is located in a different directory than the default header
> files (i.e. io.h).  How do I tell the compiler where it should look for
> header files?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]