1# 2# This is the makefile for installing TAO. See the file 3# docs/installation.html for directions on installing TAO. 4# See also bmake/common for additional commands. 5# 6ALL: all 7 8 9# Call make recursively in these directory 10DIRS = src include docs tests 11 12include ${TAO_DIR}/conf/tao_base 13 14# 15# Basic targets to build TAO libraries. 16# all : builds the C/C++ and Fortran libraries 17all : tao_info tao_chk_tao_dir tao_chk_lib_dir tao_deletelibs tao_build tao_shared 18# 19# Prints information about the system and version of TAO being compiled 20# 21tao_info: 22 -@echo "==========================================" 23 -@echo " " 24 -@echo "See docs/troubleshooting.html and docs/bugreporting.html" 25 -@echo "for help with installation problems. Please send EVERYTHING" 26 -@echo "printed out below when reporting problems." 27 -@echo " " 28 -@echo "To subscribe to the TAO users mailing list, send mail to " 29 -@echo "majordomo@mcs.anl.gov with the message: " 30 -@echo "subscribe tao-news" 31 -@echo " " 32 -@echo "==========================================" 33 -@echo On `date` on `hostname` 34 -@echo Machine characteristics: `uname -a` 35 -@echo "-----------------------------------------" 36 -@echo "Using PETSc directory: ${PETSC_DIR}" 37 -@echo "Using PETSc arch: ${PETSC_ARCH}" 38 -@echo "Using TAO directory: ${TAO_DIR}" 39 -@echo "-----------------------------------------" 40 -@grep "define PETSC_VERSION" ${PETSC_DIR}/include/petscversion.h | ${SED} "s/........//" 41 -@grep TAO_VERSION_NUMBER include/tao_version.h | sed "s/........//" 42 -@echo "-----------------------------------------" 43 -@echo "Using include paths: ${TAO_INCLUDE}" 44 -@echo "------------------------------------------" 45 -@echo "Using C/C++ compiler: ${CC} ${CC_FLAGS} ${COPTFLAGS} ${CFLAGS}" 46 -@echo "C/C++ Compiler version: " `${CCV}` 47 -@if [ "${FC}" != "" ]; then \ 48 echo "Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}";\ 49 echo "Fortran Compiler version: " `${FCV}`;\ 50 fi 51 -@echo "-----------------------------------------" 52 -@echo "Using C/C++ linker: ${CC_LINKER}" 53 -@if [ "${FC}" != "" ]; then \ 54 echo "Using Fortran linker: ${FC_LINKER}";\ 55 fi 56 -@echo "-----------------------------------------" 57 -@echo "Using libraries: ${TAO_LIB}" 58 -@echo "------------------------------------------" 59 -@echo "Using mpiexec: ${MPIEXEC}" 60 -@echo "==========================================" 61 62MINFO = ${PETSC_DIR}/${PETSC_ARCH}/include/petscmachineinfo.h 63tao_info_h: 64 -@$(RM) -f ${MINFO} MINFO 65 -@echo "static const char *petscmachineinfo = \"\__n__\"" >> MINFO 66 -@echo "\"-----------------------------------------\__n__\"" >> MINFO 67 -@if [ -f /usr/bin/cygcheck.exe ]; then \ 68 echo "\"Libraries compiled on `date` on `hostname|/usr/bin/dos2unix` \__n__\"" >> MINFO; \ 69 else \ 70 echo "\"Libraries compiled on `date` on `hostname` \__n__\"" >> MINFO; \ 71 fi 72 -@echo "\"Machine characteristics: `uname -a` \__n__\"" >> MINFO 73 -@echo "\"Using PETSc directory: ${PETSC_DIR}\__n__\"" >> MINFO 74 -@echo "\"Using PETSc arch: ${PETSC_ARCH}\__n__\"" >> MINFO 75 -@echo "\"-----------------------------------------\"; " >> MINFO 76 -@echo "static const char *petsccompilerinfo = \"\__n__\"" >> MINFO 77 -@echo "\"Using C compiler: ${PCC} ${PCC_FLAGS} ${COPTFLAGS} ${CFLAGS}\__n__\"" >> MINFO 78 -@echo "\"Using Fortran compiler: ${FC} ${FC_FLAGS} ${FFLAGS} ${FPP_FLAGS}\__n__\"" >> MINFO 79 -@echo "\"-----------------------------------------\"; " >> MINFO 80 -@echo "static const char *petsccompilerflagsinfo = \"\__n__\"" >> MINFO 81 -@echo "\"Using include paths: ${PETSC_INCLUDE}\__n__\"" >> MINFO 82 -@echo "\"------------------------------------------\"; " >> MINFO 83 -@echo "static const char *petsclinkerinfo = \"\__n__\"" >> MINFO 84 -@echo "\"Using C linker: ${CLINKER}\__n__\"" >> MINFO 85 -@echo "\"Using Fortran linker: ${FLINKER}\__n__\"" >> MINFO 86 -@echo "\"Using libraries: ${PETSC_LIB} \__n__\"" >> MINFO 87 -@echo "\"------------------------------------------\"; " >> MINFO 88 -@cat MINFO | ${SED} -e 's/\\ /\\\\ /g' | ${SED} -e 's/__n__/n/g' > ${MINFO} 89 -@ if [ -f /usr/bin/cygcheck.exe ]; then /usr/bin/dos2unix ${MINFO} 2> /dev/null; fi 90 -@$(RM) -f MINFO 91 92 93 94 95# 96# Builds the TAO libraries 97# This target also builds fortran77 and f90 interface 98# files and compiles .F files 99# 100tao_build: 101 -@echo "BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES" 102 -@echo "=========================================" 103 -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} TAO_DIR=${TAO_DIR} ACTION=libfast tree 104 -@${RANLIB} ${TAO_LIB_DIR}/*.${AR_LIB_SUFFIX} 105 -@echo "Completed building libraries" 106 -@echo "=========================================" 107 108# 109 110# Deletes TAO libraries 111tao_deletelibs: 112 -${RM} -f ${PETSC_LIB_DIR}/libtao*.* 113 114 115tao_shared: shared 116 117 118tao_alletags: 119 -@maint/generateetags.py 120 121 122tao_testexamples_c: 123 -@PYTHONPATH=${TAO_DIR}/maint ./maint/runExamples.py 124 125tao_allfortranstubs: 126 -@maint/generatefortranstubs.py ${BFORT} 127 128tao_manual: 129 cd docs/tex/manual; ${OMAKE} manual.dvi manual.pdf manual.html 130 131tao_deletemanpages: 132 ${RM} -f ${TAO_DIR}/docs/manpages/*/*.html \ 133 ${TAO_DIR}/docs/manpages/manpages.cit 134 135tao_allmanpages: tao_deletemanpages 136 @mkdir -p ${TAO_DIR}/docs/manpages/taosolver 137 @mkdir -p ${TAO_DIR}/docs/manpages/taolinesearch 138 @mkdir -p ${TAO_DIR}/docs/manpages/pdeconstrained 139 140 141 -${OMAKE} ACTION=tao_manpages_buildcite tree 142 -${OMAKE} ACTION=tao_manpages tree 143 -${OMAKE} ACTION=tao_manexamples tree LOC=${LOC} 144 -maint/wwwindex.py ${TAO_DIR} 145 146tao_htmlpages: 147 -${OMAKE} ACTION=tao_html TAO_DIR=${TAO_DIR} PETSC_DIR=${PETSC_DIR} alltree LOC=${TAO_DIR} 148 149 150tao_chk_lib_dir: chklib_dir 151