Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Help with makefile.....

whyhema
Beginner
600 Views

Dear Sir,

I am new to using Fortran. Please kindly help correcting the following makefile to be used with intel fortran compiler (v11.1048) on windows XP OS. I had followed various threads and did some changes (original makefile I had was made on Linux), but am still encountering errors. Thank you very much!!!!
---------------------------------------------------
INCLUDEDIR=C:\\Program Files\\Intel\\Compiler\\11.1\\048\\include
FOR = ifort
OFLAGS = -cpp -w -static -fno-alias /O2 -safe_cray_ptr -no-prec-sqrt -no-prec-div -auto -noalign -convert big_endian

OPT = $(OFLAGS)

%.obj : %.F90
$(FOR) $(OPT) -I$(INCLUDEDIR) -c $<

OBJ0=zufall.obj
OBJ1=pulloff2d2.obj minimise.obj
INC=puof2dcoeff.inc mathcons.inc material.inc conv.inc

TGT=pulloff2d2.exe

$(TGT) : $(OBJ0) $(OBJ1) $(INC)
$(FOR) -o $(TGT) $(OPT) $(OBJ0) $(OBJ1)
$(OBJ0) : $(INC)
$(OBJ1) : $(INC)

clean :
rm -f *.obj $(TGT)

0 Kudos
1 Reply
TimP
Honored Contributor III
600 Views

If you use a standard Make (e.g. gnu make), it appears you need a rule such as

.SUFFIXES:.exe .obj

(before you use either of those symbols)

and you must take ifort Windows spellings of the options

-Qfpp -Qauto -Qsafe-cray-ptr

(others you might consider removing)

You can find the spellings of the ifort options by "ifort -help" or in the Windows help file.

0 Kudos
Reply