请选择 进入手机版 | 继续访问电脑版

因斯福论坛

搜索
查看: 14687|回复: 0

Intel Fortran makefile 脚本

[复制链接]
发表于 2013-6-16 11:03:09 | 显示全部楼层 |阅读模式
# Makefile for 64 bit applications
# ---------- Compiler paths
# Path of Fortran
PathIntelComposer = "C:\Program Files (x86)\Intel\Composer XE"
PathIntelCompiler = "C:\Program Files (x86)\Intel\Composer XE\bin\intel64"
# Path of Visual C
PathVC="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC"
PathVCCompiler="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\amd64"
# ---------- Library paths
Path_LIB_Intel=$(PathIntelComposer)\compiler\lib\intel64
Path_LIB_SDK="C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x64"
Path_LIB_VC=$(PathVC)\lib\amd64
# ---------- Include paths
Path_Include_Intel=$(PathIntelComposer)\compiler\include
# Intel64
Path_Include_Intel_Arch=$(PathIntelComposer)\compiler\include\intel64
Path_Include_VC=$(PathVC)\include

# Compiler specification
CC = $(PathIntelCompiler)\ICL
FC = $(PathIntelCompiler)\IFORT
LK = $(PathVCCompiler)\Link
LIBL = $(PathVCCompiler)\Lib

# ---------- Compile and link options
#-threads : Specify that multi-threaded libraries should be linked against
#-Gm : Use compaq visual fortran interface, equal to /iface:cvf
FCFLAGS =  -threads -Gm -I$(Path_Include_Intel)
CCFLAGS =  -threads -Gm -I$(Path_Include_Intel) -I$(Path_Include_Intel_Arch) \
    -I$(Path_Include_VC)
LFLAGS =   /LIBPATH:$(Path_LIB_Intel) /LIBPATH:$(Path_LIB_VC) \
    /LIBPATH:$(Path_LIB_SDK)
LIBFLAGS =  /link /LIBPATH:$(Path_LIB_Intel) /link /LIBPATH:$(Path_LIB_VC) \
    /link /LIBPATH:$(Path_LIB_SDK)
  
# ------------ Source files
# Common  
gpyro_prec = Common\gpyro_prec.f90  
gpyro_vars = Common\gpyro_vars.f90
gpyro_funcs = Common\gpyro_funcs.f90
gpyro_io = Common\gpyro_io.f90
gpyro_bc = Common\gpyro_bc.f90
gpyro_init = Common\gpyro_init.f90
gpyro_pyro = Common\gpyro_pyro.f90
# Gpyro_main
gpyro_main = Gpyro\gpyro_main.f90
# ----------- Source to object file  
gpyro_prec.obj : $(gpyro_prec)
    $(FC) $(FCFLAGS) -c $(gpyro_prec)
gpyro_vars.obj : $(gpyro_vars)
    $(FC) $(FCFLAGS) -c $(gpyro_vars)
gpyro_funcs.obj : $(gpyro_funcs)
    $(FC) $(FCFLAGS) -c $(gpyro_funcs)
gpyro_io.obj : $(gpyro_io)
    $(FC) $(FCFLAGS) -c $(gpyro_io)
gpyro_bc.obj : $(gpyro_bc)
    $(FC) $(FCFLAGS) -c $(gpyro_bc)
gpyro_init.obj : $(gpyro_init)
    $(FC) $(FCFLAGS) -c $(gpyro_init)
gpyro_pyro.obj : $(gpyro_pyro)
    $(FC) $(FCFLAGS) -c $(gpyro_pyro)
gpyro_main.obj : $(gpyro_main)
    $(FC) $(FCFLAGS) -c $(gpyro_main)
  
# -----------  Gpyro.lib
Gpyro_Lib_Objs = gpyro_prec.obj gpyro_vars.obj gpyro_funcs.obj gpyro_io.obj \
    gpyro_init.obj gpyro_bc.obj gpyro_pyro.obj
Gpyro.lib : $(Gpyro_Lib_Objs)
        $(LIBL) $(LFLAGS) $(Gpyro_Lib_Objs) -Out:$@
# ----------- Gypyro   
Gpyro_exe_objs = gpyro_main.obj Gpyro.lib
Gpyro.exe : $(Gpyro_exe_objs)
#        $(FC) $(Gpyro_exe_objs) $(LIBFLAGS) -Out:$@
        $(LK) $(Gpyro_exe_objs) $(LFLAGS) -Out:$@
  
All : Gpyro.lib Gpyro.exe


以下为32位应用程序的脚本设置
-----------------------------------------------------------------------------------------------------------------------------

# Makefile for 32 bit applications
# ---------- Compiler binary paths
# Path of Fortran
PathIntelComposer = "C:\Program Files (x86)\Intel\Composer XE"
PathIntelCompiler = "C:\Program Files (x86)\Intel\Composer XE\bin\ia32"
# Path of Visual C
PathVC="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC"
PathVCCompiler="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin"
# ---------- Library paths
Path_LIB_Intel=$(PathIntelComposer)\compiler\lib\ia32
Path_LIB_SDK="C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86"
Path_LIB_VC=$(PathVC)\lib
# ---------- Include paths
Path_Include_Intel=$(PathIntelComposer)\compiler\include
# Intel arch related,
Path_Include_Intel_Arch=$(PathIntelComposer)\compiler\include\ia32
Path_Include_VC=$(PathVC)\include


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|因斯福论坛  

GMT+8, 2024-12-9 03:00

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表