I have several Fortran source files that need to be compiled and link together to form an exe computational code. There is also a makefile.dos
in the package but I don't know how to use it to compile the Fortran files.
I tried to compile source files with Intel parallel studio without using the makefile, with
ifort /O3 /QxHost /Qparallel /Qdiag-disable:warn *.for
The APP.exe
created successfully but it seems that the timer routine has not been compiled properly. Because when I execute the code, the timing of processes are not recorded in the output file. I guess compiling with the makefile may resolve the issue.
Then I tried to compile the Fortran Files with the help of the makefile by:
nmake /f makefile.dos FPP=ifort LINK32=386link
This time I got the following error:
NMAKE : fatal error U1073: don't know how to make 'app.OBJ'
What am I doing wrong? My OS is WINDOWS 10 LTSC.
Here is the content of the makefile (In the code package there are those items that are listed in front of "SRCS" variable below):
FC = f77l3
LINKER = 386link
PROGRAM = APP.exe
DEST = APP
EXTHDRS =
FFLAGS =
HDRS =
LDFLAGS =
LDMAP = nul
LIBS =
MAKEFILE = Makefile
OBJS = APP.OBJ TIMING.OBJ READDA.OBJ APPDL.OBJ PRELUD.OBJ \
FIL1.OBJ FIL2.OBJ FILE3.OBJ FIL4.OBJ FIL5.OBJ \
FIL6.OBJ FIL7.OBJ FIL8.OBJ FIL9.OBJ \
FIL11.OBJ FIL12.OBJ FIL13.OBJ \
FIL14.OBJ FIL15.OBJ FIL16.OBJ
SRCS = APP.FOR TIMING.FOR READDA.FOR APPDL.FOR PRELUD.FOR \
FIL1.FOR FIL2.FOR FIL3.FOR FIL4.FOR FIL5.FOR \
FIL6.FOR FIL7.FOR FIL8.FOR FIL9.FOR \
FIL11.FOR FIL12.FOR FIL13.FOR \
FIL14.FOR FIL15.FOR FIL16.FOR
STUB = -stub runb
$(PROGRAM): $(OBJS) $(LIBS)
$(LINKER) $(OBJS) $(STUB) -EXE $@ -LIB $(LIBS) $(LDFLAGS)
APP: $(objects)
$(FC) -o $@ $(objects)