My question concerns linking with .obj files that reside in a different directory to the main program. I use NMAKE for all my development. I use a make file of the following form.
ThisDir = C:\\K_f90\\MyProg\\V3_1.00
MyLib = C:\\K_f90\\MyLib\\V0_0.13
FTN = FTN95 /ISO /IMPLICIT_NONE /NO_SCALAR_TO_ARRAY /RESTRICT_SYNTAX /CHECKMATE /BRIEF /ERRORLOG /MOD_PATH $(MyLib)
MYPROG.EXE : MYPROG.OBJ MYSUBS.OBJ
SLINK MYPROG.OBJ MYSUBS.OBJ $(MyLib)\\SUBS1.OBJ $(MyLib)\\SUBS2.OBJ
MYPROG.OBJ : MYPROG.FOR ; $(FTN) MYPROG.FOR
MYSUBS.OBJ : MYSUBS.FOR ; $(FTN) MYSUBS.FOR
While this works, it is very cumbersome as my actual project has many more files than shown in this simplified example. What I would really like to be able to do would be to have one file (MYOBJS.LLS, say) with the following contents.
MYPROG MYSUBS SUBS1 SUBS2
Then the corresponding section of the make file would be,
MYPROG.EXE : MYPROG.OBJ MYSUBS.OBJ
SLINK @MYOBJS.LLS
Of course, this doesn’t work because SLINK does not know where the .obj files are located. What commands/options do I need in my make file to enable the myobjs.lls file to be used to specify the list of .obj files that are to be linked?
Keith