导师让我将一个在linux系统下通过ifort编译fortran77源文件产生的执行程序能够在windows系统下运行,想问问各位好心大佬这个要怎样实现。
下面附上makefile文件,感觉似乎需要修改makefile文件,需要用到交叉编译什么的,但我不是特别懂
[Make] 纯文本查看 复制代码 ########################################
# COMPILER OPTIONS
# vortex
#f77flg = -xopenmp=parallel -fast -xtarget=opteron -xarch=amd64 -xipo
MKLINC=/opt/intel/mkl/include/intel64
f77flg = -openmp -fast -I${MKLINC}
#f77flg = -xopenmp=parallel -fast -xarch=amd64
#f77flg = -fast -xopenmp=parallel -xtarget=opteron -xarch=amd64a
#f77flg = -xopenmp=parallel -fast -xtarget=opteron
# vorticity
#ifcflg = -axT -O3 -openmp -tpp7 -xT
#ifcflg = -axT -O3 -openmp -tpp7 -xT -ipo -align commons
ifcflg = -openmp
#ifcflg = -g
##########################################
# LINKING OPT
# vortex
#f77LDflg = -L/opt/SUNWspro/lib -lsunmath
#f77LDflg = -L/opt/SUNWspro/lib -lsunperf
#f77LDflg = -xlibmopt -xlic_lib=sunperf
#f77LDflg = -xlibmopt -L/opt/lapack-3.1.1/LIB -llapack -lblas
#f77LDflg = -xlibmopt -L/opt/lapack-3.1.1/LIB -llapack64 -lblas64
# vorticity
#ifcLDflg = ${atlas} -L/usr/lib/gcc/x86_64-redhat-linux/3.4.3 -lg2c
#ifcLDflg = ${atlas} -L/usr/lib/gcc/x86_64-redhat-linux/3.4.3 -lg2c
MKLPATH=/opt/intel/mkl/lib/intel64
MKLR=/opt/intel/mkl/lib/intel64
#ifcLDflg = -L{MKLPATH} -lmkl_lapack
atlas = -L${MKLPATH}
#ifcLDflg = ${atlas} -WL,-R${MKLR} -lmkl_lapack95_ilp64 -lmkl_lapack95_lp64 -lmkl_blas95_ilp64
ifcLDflg = ${atlas} -WL,-R${MKLR} -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm
#atlas = -L/usr/lib -llapack -lblas
#atlas = -L/usr/lib64 -llapack -lblas -lguide -lpthread
#atlas = -L${MKLPATH} -lmkl_lapack -lmkl_em64t -lmkl_lapack32 -lmkl -lguide -lpthread
#atlas = -L${MKLPATH} -lmkl_lapack -lmkl_em64t -lmkl_lapack32 -lmkl -lguide -lpthread
#MKLPATH=/opt/intel/mkl/8.1.1/lib/em64t
##########################################
# Modules
objects = vortex_dyn_v2.o accel.o beta_h.o beta_i.o bounce.o body_parms.o \
create.o coefs.o checkNAN.o\
destroy.o diffuse.o dir_accel.o direct.o smooth.o \
errcheck.o euler_dyn.o euler_plv.o extpress.o \
flush.o force.o force_y.o\
gamma_c.o simq.o gausid.o \
input.o initial.o initslip.o intsect_V191.o lagrange.o \
movebody.o matset_c.o \
openfiles.o orient.o orientf.o out.o outv-tec.o outv.o outfs.o\
pqamn.o panels.o randwalk.o regridbo.o regridi.o regridfs.o\
regridr.o regridl.o redistsubm.o solve.o sortie.o spline.o \
t0solnpc.o t0solnpl.o update_p.o tcmplx.o testNAN.o \
vels.o velvc.o vprobe.o yprobe.o psiconst.o orient_fudge.o
##########################################
# Other Variables
#ifeq (${IFC},yes)
#FC = ifort
#else
FC = ifort
#endif
.f.o :
#ifeq (${FC},ifort)
# ${FC} ${ifcflg} -c $<
#else
${FC} ${f77flg} -c $<
# ${FC} -c $<
#endif
BMIW191:${objects}
#ifeq (${FC},ifort)
# @date
# @${FC} ${ifcflg} ${objects} ${ifcLDflg} -o $@
#else
@date
@${FC} ${ifcflg} ${objects} ${ifcLDflg} -o $@
# @${FC} ${ifcflg} ${objects} -o $@
#endif
clean:
-rm *.o *~
|