I should have made it more clear that the MidLevelFunc is tied to a
fortran module, so the target name is not flexible. But I did find a
solution to this problem by using a conditional in the variable
definitions. In case anybody else comes across this problem:
ifeq (${MAKECMDGOALS},a.out)
LowLevelFunc = LowLevelFunc1.o
else ifeq(${MAKECMDGOALS},alt_a.out)
LowLevelFunc = LowLevelFunc2.o
endif
a.out : Main1.o MidLevelFunc.o LowLevelFunc1.o
${CC} $? ${LIB} -o $@
alt_a.out : Main2.o MidLevelFunc.o LowLevelFunc2.o
${CC} $? ${LIB} -o $@
Main1.o : MidLevelFunc.o
Main2.o : MidLevelFunc.o
MidLevelFunc.o : ${LowLevelFunc}
LowLevelFunc1.o :
LowLevelFunc2.o :
Sean
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make