[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Alt. Solution to Incorrectly Applied Target-Specific Variable
From: |
Sean Smith |
Subject: |
Re: Alt. Solution to Incorrectly Applied Target-Specific Variable |
Date: |
Tue, 16 Jun 2009 15:33:24 -0500 |
User-agent: |
Thunderbird 2.0.0.21 (Macintosh/20090302) |
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