⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 load.link.in

📁 FreeFem++可以生成高质量的有限元网格。可以用于流体力学
💻 IN
字号:
#!/bin/sh# Create a loadable object from a C++ function defined in a .cpp file# $Id: load.link.in,v 1.6 2009/03/14 16:27:31 hecht Exp $FFVERSION='@VERSION@'FFCXXFLAGS='@CXXFLAGS@ @CPPFLAGS@'INCFF=if [ -z "$CXX" ] ; then CXX='@CXX@' ; fiif [ -z "$F77" ] ; then F77='@F77@' ; fiif [ "$CXX" = '@'CXX'@' ] ; then CXX=""; fiif [ "$F77" = '@'F77'@' ] ; then F77=""; fiif [ "$FFCXXFLAGS" = '@'CXXFLAGS'@' ] ; then FFCXXFLAGS=""; fiif [ "$FFVERSION" = '@'VERSION'@' ] ; then FFVERSION=""; fiif [ -z "$INCFF" ] ; then    if [ -f "@INCFF@/ff++.hpp" ] ; then	INCFF="-I@INCFF@"    elif [ -f include/ff++.hpp ]; then	INCFF="-Iinclude"    elif [ -f "FFAPPLI_INC/ff++.hpp" ] ; then 	INCFF="-IFFAPPLI_INC"     elif [ -f '@ff_prefix_dir@/include/ff++.hpp' ] ; then 	INCFF='-I@ff_prefix_dir@/include'     else	echo " erreur PB include freefem++ directory " ;	exit 1;    fifido="yes"DEBUG=""CONLY="false"uu=`uname -s` INC=""LIBS=""DLL=""bin="."out=""files=""fileso=""OTHER="";WIN32="";case "$uu" in  CYGWIN*)  WIN32="win32-"  wff=`which FreeFem++.exe`  dff=`dirname "$wff"`  if [ "$bin" = "." -a  -f ../src/bin-win32/libff.dll  ]; then    bin=../src/bin-win32   elif [  -f "$dff/libff.dll"  ]; then#  modif for install on cygwin    bin=$dff  elif [ "$bin" = "." -a  -f ../libff.dll  ]; then    bin=..  elif [ "$bin" = "." -a  -f ../../libff.dll  ]; then    bin=../..  fi;; esacwhile [ $# -ne 0 ]  ; do    case "$1" in	-[h?]*) echo usage $0 "[-n] [-g] [-win32] [-l libfile] [-I includedir]  files"	    echo "    -n  :  do nothing just print"	    echo "    -g  :  compile with -g option"	    echo "    -c  : compile only"	    echo "    -O*  :  compile with -O* option"	    echo "    -cygwin: compile for cygwin/win32 OS (Window XP, ...)"	    echo "    -win32:  compile for win32 OS (Window XP, ...) default under cygwin"	    echo "    -l files  add files to the ld process (link)"	    echo "    -I dir  add dir in include seach dir for compilation"	    echo "    -b dir  to change the default install  dir " 	    echo "    -dll file  add  dll and this file copie in the install dir"	    echo "    -o outputfile without suffix"	    echo "    file.{cpp,cp,cxx,f,F}"	    exit 0;	    ;;	F77=*) F77=`echo $1|sed 's/[A-Z0-9]*=//'` ;;	CXX=*) CXX=`echo $1|sed 's/[A-Z0-9]*=//'` ;;	F77=*) F77=`echo $1|sed 's/[A-Z0-9]*=//'` ;;	CXXFLAGS=*) CXXFLAGS=`echo $1|sed 's/[A-Z0-9]*=//'` ;;	-n)  do="no";;	-g)  DEBUG="$DEBUG $1";;	-c)  CONLY=yes;;	-O*) DEBUG="$DEBUG $1";;	-cygwin)  onwin23=1; uu="cygwin-version";; 	-win32)   onwin32=1; uu="win32";; 	-b)     bin=$2  ; shift;;	-I*)    INC="$INC $1";;	-dll)   DLL="$DLL $2";shift;;	-[Ll]*)    LIBS="$LIBS $1" ;;	*.cpp) files="$files $1";  o=`basename $1 .cpp` ; fileso="$fileso $o.o";; 	*.cp) files="$files $1";  o=`basename $1 .cp`   ; fileso="$fileso $o.o";; 	*.cxx) files="$files $1";  o=`basename $1 .cxx` ; fileso="$fileso $o.o";; 	*.f) ffiles="$ffiles $1";  o=`basename $1 .f` ; fileso="$fileso $o.o";; 	*.F) ffiles="$ffiles $1";  o=`basename $1 .F` ; fileso="$fileso $o.o";; 	*.o) fileso="$fileso $1"; o=`basename $1 .o` ;; 	-o)  out=$2; shift;;	*) OTHER="$OTHER $1";;    esac    shiftdoneif [ -n "$onwin32" -a -f "$bin/libff.dll" ] ; then     echo " erreur the file libff.dll  must be exist in '$bin' the install directory,"     echo " to link on windows OS "    echo " Use the parameter -b to set the correct install directory "     exit 1;fiif [ -z "$out" ] ; then  out=$o  ; fi;# Default compilerif [ -z "$CXX"  ];then  CXX=g++ ; fiINC="$INCFF $INC"  SUF=soSHARED="-shared"case "$WIN32$uu" in    Darwin*)         echo "export MACOSX_DEPLOYMENT_TARGET=10.3"	export MACOSX_DEPLOYMENT_TARGET=10.3	SUF=dylib	SHARED="-bundle -undefined dynamic_lookup"  ;;    win32-CYGWIN*|win32-win32)        echo " Window without cygwin "        b=$bin        LIBS=" $b/libff.dll $LIBS $DLL"        SHARED="-shared --unresolved-symbols=ignore-all -Wl,--enable-auto-import"        FLAGS='  -mno-cygwin '        SUF=dll;;    win32-cygwin-version)        echo " cygwin-version "        b=$bin        FLAGS=' '        LIBS="$b/libff.dll $LIBS $DLL"        SUF=dll;;    FreeBSD|NetBSD)	SHARED="-shared" 	FLAGS='-fPIC';;	# 64 bit Linux needs -fPIC (ALH)    SunOS)        SHARED="-shared"        FLAGS='-fPIC';;        # 64 bit Linux needs -fPIC (ALH)    Linux)	FLAGS='-fPIC'	SHARED="-shared " ;;    *)	echo "sorry unknown achitecture "`uname`	exit 1;;esacFLAGS="$FLAGS $DEBUG $FFCXXFLAGS"if [ -n "$ffiles$files$fileso" ] ; then    if [ "$WIN32" = "yes" -a -f $bin/libff.dll  ]; then	echo " Sorry, no freefem .dll file (libff.dll)  in $bin dir "	echo " try with -b dir-path where the file libff.dll exist"	exit 1;    fi    if [ "$files" ] ;then 	echo $CXX -c $FLAGS $CXXFLAGS $INC $PIC $files	if [  $do = yes ] ; then 	    $CXX -c $INC $FLAGS $CXXFLAGS $PIC  $files	    ret=$?; if [ $ret -ne 0 ] ; then exit $ret ;fi	fi    fi    if [ "$ffiles" ] ;then 	echo $F77 -c $FLAGS $CXXFLAGS $INC $PIC $ffiles	if [  $do = yes ] ; then 	    $F77 -c $INC $FLAGS $CXXFLAGS $PIC  $ffiles	    ret=$?; if [ $ret -ne 0 ] ; then exit $ret ;fi	fi    fi    if [ "$CONLY" != yes ]; then	echo $CXX $SHARED $FLAGS $CXXFLAGS $fileso -o $out.$SUF $LIBS $DLL $OTHER	if [  $do = yes ] ; then 	    $CXX $SHARED $FLAGS $CXXFLAGS $fileso -o $out.$SUF $LIBS $DLL $OTHER	    ret=$?; if [ $ret -ne 0 ] ; then exit $ret ;fi	fi	if [  "$bin" != "." ]; then	    echo cp $out.$SUF  $bin	    test $do = yes &&  cp $out.$SUF  $bin	fi	if [ -n "$DLL" ] ; then	    echo cp $DLL $bin	    test $do = yes &&  cp $DLL $bin	fi    fifi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -