📄 custom
字号:
# Customization of makefile for QMG 2.0 for Unix / Matlab 5.x# Customize as indicated by comments below.### The first definition is customized to # MEX = mexsol for Solaris# MEX = mexsg64 for SGI# MEX = mexrs6 for RS6000# MEX = mexlx for Linux# See your Matlab API guide for more choicesMEX = mexsol# For egcs 1.1 and 2.95, add -DOLD_STYLE_STREAMBUF to the next line.# For MIPS-Pro 7.3 (and any other recent standard-conforming# compiler), add NEED_TYPENAME_KEYWD to the next line## If you are using your library's lapack instead of the version# shipped with QMG, you may need to # insert -D options for the symbols# zgeqrf_, zunmqr_, zungqr_, zgghrd_, zhgeqz_# zgeev_# LAPACK_INT_T# LAPACK_DOUBLECOMPLEX_T# so that the types and routine names in qpatchmath.cpp match with # those in your LAPACK library.## The EXCEPTIONS_ENABLED flag should probably used on most platforms.# It allows error conditions to be handled with C++ exceptions.## It is recommended that you use exceptions# when compiling QMG. (For some compilers, this is the default.# For others, like KCC 3.2f, you need to specify a compiler# flag.) If you use exceptions, then you should leave the# -DEXCEPTIONS_ENABLED definition in the line below.# Also, make sure exceptions are enabled in the linker call# below (i.e., make sure the right flag appears in LDFLAGS).# Turning on exceptions allows the mex file to free all memory# before returning to matlab when there is an error.## If you turn off exceptions, then remove -DEXCEPTIONS_ENABLED# from the line below. You might consider adding -DUSE_MEX_MALLOC,# which produces mex files that allocate all memory using the Matlab# allocator. This allows Matlab to reclaim memory allocated by the# mex files in case an error occurs.#ADDITIONAL_DEFINES = -DEXCEPTIONS_ENABLED -DOLD_STYLE_STREAMBUF# base location of matlab. Subdirectories: bin, extern, etc.MATROOT = /opts/matlab_5.3# compiler option for optimization# If you don't want optimization, then specify -g for debugging.# On some platforms, if you specify -g then you aren't allowed# to specify any optimization.OPTIMIZE = -O# compiler option for more optimizationLAPACK_OPTIMIZE = -O# other C++ compiler options# Type mex -v on your platform and examine CFLAGS in the resulting printout# to see what matlab needs.## Mips-Pro 7.3 needs # OTHER_CPLUSPLUS_OPTIONS = -64 -LANG:std \# -I../../src/platform_specific/mips_7.3 \# -ptused## egcs-1.1.2 and 2.95 need # OTHER_CPLUSPLUS_OPTIONS = -I../../src/platform_specific/egcs## On some platforms, e.g. Solaris 2.6, egcs-2.95 needs a -B option to specify# the path to the gnu assembler "as". This is because the Solaris# assembler can't handle the long names generated by egcs 2.95.# So add -B<path to as> here. The path MUST end with a /.## KCC needs -x if you want exceptions enabled.OTHER_CPLUSPLUS_OPTIONS = -I../../src/platform_specific/egcs \ -B/usr/local/gnu/binutils-2.9.1/bin/# other C compiler options# Mips-Pro 7.3 needs# OTHER_C_OPTIONS = -64OTHER_C_OPTIONS =# The next two lines are the name of the C++ compiler and C compiler# that you are using.CC = /usr/local/gnu/gcc-2.95.1/bin/g++CCI = /usr/local/gnu/gcc-2.95.1/bin/gcc# If you are using QMG's Lapack, Blas, and LIBF77, this next statement# should say# CLPCK = $(CLAPACK2OB) $(BLAS2OB) $(LIBF77OB)# If you are using QMG's Lapack but your own library blas and LIBF77, then say# CLPCK = $(CLAPACK2OB)# If you are using your own library Lapack, blas and LIBF77, then say# CLPCK = CLPCK = # PRECEDE_MEX: a command that must be executed before every# call to mex.PRECEDE_MEX = # If the standard mex command is OK for linking, leave the# next definition blank.# On many platforms you must define# MEXFLAGS = LD=$(CC) # in order to call the prelinker and to get the exception-handler linked in.## If you are using gcc/egcs, the next statement requires the following# tricky customization.# (1) in a shell, type mex -v.# (2) Find the setting of LDFLAGS in the resulting printout.# (3) Let's say for example that LDFLAGS is # -G -M /opts/matlab_5.3/extern/lib/sol2/export.map# (4) Then in this case you would define# MEXFLAGS = LD=$(CC) \# LDFLAGS="-Xlinker -G -Xlinker -M -Xlinker /opts/matlab_5.3/extern/lib/sol2/export.map"# In other words, you pass two items to MEXFLAGS, LD=$(CC) and also# LDFLAGS=<string> where <string> is the same as the LDFLAGS option# printed by mex -v, except you precede every single word with -Xlinker.## For KCC, there is a similar customization, except precede the linker# options in LDFLAGS with "-Wl,". Also, KCC needs -x in LDFLAGS here# if you want exceptions enabled (see above).#MEXFLAGS = LD=$(CC) \ LDFLAGS="-Xlinker -G -Xlinker -M -Xlinker /opts/matlab_5.3/extern/lib/sol2/export.map"# The next definition needs to be customized to include the standard C++# library. For instance, if you are using gcc/egcs, then you would add# -L<path to egcs>/lib -lstdc++# to the next statement. Other compilers typically put the standard# C++ library in libC.a, so you say -lC below.# If you are using your own Lapack, Blas, and F77, then you need to# add that to the following statement. Under KCC on RS6000 running AIX,# you need:# -llapack -lblas -lxlf90## On MIPS 7.3 you need -lCio and -lC in the next statement.# If you are using SGI's LAPACK, you need -lcomplib.sgimath## On Solaris with egcs, if you are using the Sun workshop# compiler's LAPACK and BLAS rather than the versions shipped with# QMG, then you need# -L<location of libsunperf.a> -lsunperf -lF77 -lM77 -lsunmath -lSUNWPro_licMEXLIBS = -L/usr/local/gnu/egcs-2.95.1/lib -lstdc++ \ -L/opts/lang_v5n1/SUNWspro/SC4.2/lib -lsunperf -lF77 -lM77 -lsunmath -lSUNWPro_lic
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -