[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: makefile and notdir
From: |
Henrik Carlqvist |
Subject: |
Re: makefile and notdir |
Date: |
Fri, 31 Jul 2009 22:08:46 +0200 |
User-agent: |
Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) |
Brownie <brownie2002@gmail.com> wrote:
> Now, I would like to access sources from different directories
...
> so my inferences $(OBJDIR)/%.o: %.f90 do not work.
One solution if you have your sources in different directories is to also
have different rules. Something like:
$(OBJDIR)/%.o: %.f90
command to compile
$(OBJDIR)/%.o: ../SRC2/%.f90
command to compile (possible the same command as for the other rule)
Another solution would be to use VPATH or vpath, example:
vpath %.f90 .:../SRC2
For more info on vpath and VPATH see
http://www.gnu.org/software/make/manual/make.html#General-Search
regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc3(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost