hi
how can i talk to "make" all sources are in the an address like ../kernel in the "all"?
all: $(SOURCES) link
problem with make file and all
Re: problem with make file and all
I'm assuming that by this you mean "How do you tell make to run the makefile in another directory"pswin wrote:how can i talk to "make" all sources are in the an address like ../kernel in the "all"?
In that case, you just use the -C option to make (if running it from the command line) or do a 'recursive make', where one of the lines is "$(MAKE) -C [directory]" ($(MAKE) is always set to the exact make you're using, even if it's not standard make)
On the other hand, recursive make is considered harmful - basically, it tends to make it more complicated to maintain, causes unnecessary rebuilds and makes parallel builds more difficult (a legitimate example is binutils: each tool within it is built separately by a recursive make. It then does autoconf and another three or four levels of recursive make for *each* tool. Ow ow ow)
Re: problem with make file and all
If you want to collect a list of all the source files in a directory, there is a makefile tutorial on the wiki that covers this (and more too! ).
Re: problem with make file and all
...and it is found here: Makefile
Every good solution is obvious once you've found it.