On Sat, 2016-09-24 at 10:31 +1000, Karl May wrote: > I wanna make two different static libraries from the same FORTRAN source > files, > one with OMP support, one without. Thus %.o file generated during compilation > will differ and must be keept for updating both the libraries when one files > has changed (to avoid making MAKE recompiling everything). Since the naming > of > the %.o files is the same they will be kept in two different directories.
VPATH is intended only for locating remote _source_ files. It cannot be used to find object files. More detailed discussion of this issue can be found here: http://make.mad-scientist.net/papers/how-not-to-use-vpath/ The fact that you had to write your rules such that they violate Paul's Second Rule of Makefiles should be a hint that you're in the weeds :) http://make.mad-scientist.net/papers/rules-of-makefiles/#rule2 If you want to create two different sets of object files you need to write two different pattern rules with different directories. Since your makefile is not complete (you didn't show what operations you wanted for the OMP version, nor how you are going to decide which version to build) it's hard to give an example. _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make