Re: makefile and notdir
Henrik Carlqvist <[email protected]> Fri, 31 Jul 2009 22:08:46 +0200
| Newsgroups | gmane.comp.gnu.utils |
|---|---|
| Organization | SunSITE.dk - Supporting Open source |
| Message-ID | <[email protected]> |
Brownie <[email protected]> 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