The UFZ services GitLab and Mattermost will be unavailable on Monday, December 06 from 06:00 AM to 08:00 AM due to maintenance work.

Commit ad920da8 authored by Stephan Thober's avatar Stephan Thober
Browse files

readded Makefile, because CMAKE does not find lapack correctly

parent ce580686
# -*- Makefile -*-
#
# PURPOSE
# CHS Makefile for Fortran, C and mixed projects
#
# CALLING SEQUENCE
# make [options] [VARIABLE=VARIABLE ...] [targets]
#
# Variables can be set on the command line [VAR=VAR] or in the section SWITCHES below.
#
# If $(PROGNAME) is given, an executable will be compiled.
# If $(LIBNAME) is given, a library will be created.
#
# Sources are in $(SRCPATH), which can be several directories separated by whitespace.
#
# File suffixes can be given in $(F90SUFFIXES), $(F77SUFFIXES), and $(CSUFFIXES)
# Default Fortran 90 is: .f90, .F90, .f95, .F95, .f03, .F03, .f08, .F08
# Default Fortran 77 is: .f, .F, .for, .FOR, .f77, .F77, .ftn, .FTN
# Default C is: .c, .C
#
# TARGETS
# all (default), check (=test), clean, cleanclean, cleancheck (=cleantest=checkclean=testclean),
# dependencies (=depend), html, pdf, latex, doxygen, info
#
# OPTIONS
# All make options such as -f makefile. See 'man make'.
#
# VARIABLES
# All variables defined in this makefile.
# This makefile has lots of conditional statements depending on variables.
# If the variable works as a switch then the condition checks for variable = true,
# i.e. ifeq ($(variable),true)
# otherwise the variable can have any other value.
# See individual variables in section SWITCHES below or type 'make info'.
#
# Variables can be empty for disabling a certain behaviour,
# e.g. if you do not want to use IMSL, set: imsl=no or imsl=
#
# For main variables see 'make info'.
#
# DEPENDENCIES
# This makefile uses the following files:
# $(MAKEDPATH)/make.d.sh, $(CONFIGPATH)/$(system).$(compiler), $(CONFIGPATH)/$(system).alias
# The default $(MAKEDPATH) and $(CONFIGPATH) is make.config
# The makefile can use doxygen for html and pdf automatic documentation.
# It is then using $(DOXCONFIG).
# If this is not available, it uses the perl script f2html for html documentation:
# $(CONFIGPATH)/f2html, $(CONFIGPATH)/f2html.fgenrc
#
# RESTRICTIONS
# Not all packages work with or are compiled for all compilers.
# The static switch is maintained like a red-headed stepchild. Libraries might be not ordered correctly
# if static linking and --begin-group/--end-group is not supported.
#
# C-file dependencies are generated with
# $(CC) -E $(DEFINES) -MM
#
# EXAMPLE
# make system=eve compiler=intel release=debug mkl=mkl95 PROGNAME=prog
#
# NOTES
# Further information is given in the README, for example on
# the repository of the makefile,
# further reading,
# how to add a new compiler on a given system, or
# how to add a new system.
#
# LICENSE
# This file is part of the UFZ makefile project.
#
# The UFZ makefile project is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# The UFZ makefile project is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with the UFZ makefile project (cf. gpl.txt and lgpl.txt).
# If not, see <http://www.gnu.org/licenses/>.
#
# Copyright 2011-2014 Matthias Cuntz
#
# Written Matthias Cuntz, Nov. 2011 - mc (at) macu.de
# Modified Matthias Cuntz, Juliane Mai, Stephan Thober, UFZ Leipzig, Germany
SHELL = /bin/bash
#
# --- SWITCHES -------------------------------------------------------
#
# . is current directory, .. is parent directory
SRCPATH := ./src ./lib # where are the source files; use test_??? to run a test directory
PROGPATH := . # where shall be the executable
CONFIGPATH := /home/thober/lib/makefile_chs/make.config # where are the $(system).$(compiler) files
MAKEDPATH := $(CONFIGPATH) # where is the make.d.sh script
CHECKPATH := . # path for $(CHECKPATH)/test* and $(CHECKPATH)/check* directories if target is check
DOXCONFIG := ./doxygen.config # the doxygen config file
#
PROGNAME := edk # Name of executable
LIBNAME := #libminpack.a # Name of library
#
# Options
# Systems: eve and personal computers such as mcimac for Matthias Cuntz' iMac; look in $(MAKEDPATH) or type 'make info'
system := eve
# Compiler: intelX, gnuX, nagX, sunX, where X stands for version number, e.g. intel13;
# look at $(MAKEDPATH)/$(system).alias for shortcuts or type 'make info'
compiler := intel
# Releases: debug, release
release := release
# Netcdf versions (Network Common Data Form): netcdf3, netcdf4, [anything else]
netcdf := netcdf4
# LAPACK (Linear Algebra Pack): true, [anything else]
lapack :=
# MKL (Intel's Math Kernel Library): mkl, mkl95, [anything else]
mkl := mkl95
# Proj4 (Cartographic Projections Library): true, [anything else]
proj :=
# IMSL (IMSL Numerical Libraries): vendor, imsl, [anything else]
imsl :=
# OpenMP parallelization: true, [anything else]
openmp :=
# MPI parallelization - experimental: true, [anything else]
mpi :=
# Linking: static, shared, dynamic (last two are equal)
static := shared
# The Makefile sets the following variables depending on the above options:
# FC, FCFLAGS, F90, F90FLAGS, CC, CFLAGS, CPP, DEFINES, INCLUDES, LD, LDFLAGS, LIBS
# flags, defines, etc. will be set incremental. They will be initialised with
# the following EXTRA_* variables. This allows for example to set an extra compiler
# option or define a preprocessor variable such as: EXTRA_DEFINES := -DNOGUI -DDPREC
#
#
# The Makefile compiles all files found in the source directories.
# If you want excludes files from compilation, set EXCLUDE_FILES, e.g.
# make EXCLUDE_FILES="*mpi*.f90"
#
#
# Specific notes
# If you encounter error messages during linking such as
# ... relocation truncated to fit: R_X86_64_PC32 against ...
# then you ran out of memory address space, i.e. some hard-coded numbers in the code got too big.
# Check that you have set the 64-bit addressing model in the F90FLAGS and LDFAGS: -m64
# On *nix systems, you can set the addressing model with -mcmodel=medium (F90FLAGS and LDFAGS) for gfortran and intel.
# Intel might also need -shared-intel at the LDFLAGS, i.e.
# EXTRA_F90FLAGS := -mcmodel=medium
# EXTRA_LDFLAGS := -mcmodel=medium -shared-intel
#
# If you encouter the following error with the intel compiler (compiler bug):
# 0_10708
# : catastrophic error: **Internal compiler error: internal abort** Please report this error along with the
# circumstances in which it occurred in a Software Problem Report.
# Note: File and line given may not be explicit cause of this error.
# then you probably assume the F2003 feature that arrays can be allocated as a result of a function.
# Add the file afected to the list
# INTEL_EXCLUDE
# below. This will not set the compiler flag -assume realloc-lhs.
# If this does not work, try to reduce the optimisation in the make.config files (e.g. -O1)
#
#
# Specific notes on optimisation and debugging
# INTEL optimisation: -fast (=-ipo -O3 -static)
# -fast Multifile interprocedure optimization
# INTEL debug: -fpe=0 -fpe-all=0 -no-ftz -ftrapuv
# -fpe=0 -fpe-all=0 errors on all floating point exceptions except underflow.
# -no-ftz catches then also all underflows.
# -ftrapuv sets undefined numbers to arbitrary values so that floating point exceptions kick in.
# SUN optimisation: -xipo=2
# -xipo=n 0 disables interprocedural analysis, 1 enables inlining across source files,
# 2 adds whole-program detection and analysis.
# SUN debug: -ftrap=%all, %none, common, [no%]invalid, [no%]overflow, [no%]underflow, [no%]division, [no%]inexact.
# -ftrap=%n Set floating-point trapping mode.
# NAG debug: -C=undefined -C=intovf
# -C=undefined is also checking 0-strings. Function nonull in UFZ mo_string_utils will stop with error.
# -C=undefined must be used on all routines, i.e. also on netcdf for example.
# This means that all tests do not work which use netcdf and/or lapack.
# -C=intovf check integer overflow, which is intentional in UFZ mo_xor4096.
# Special compilation flags
EXTRA_FCFLAGS :=
EXTRA_F90FLAGS := #-C=undefined
EXTRA_DEFINES :=
EXTRA_INCLUDES :=
EXTRA_LDFLAGS :=
EXTRA_LIBS :=
EXTRA_CFLAGS :=
# Intel F2003 -assume realloc-lhs
INTEL_EXCLUDE :=
# Exclude certin files from compilation
EXCLUDE_FILES :=
# Fortran 90 file endings: .f90 .F90 .f95 .F95 .f03 .F03 .f08 .F08
F90SUFFIXES = .f90 .F90 .f95 .F95 .f03 .F03 .f08 .F08
# Fortran 77 file endings: .f .F .for .FOR .f77 .F77 .ftn .FTN
F77SUFFIXES = .f .F .for .FOR .f77 .F77 .ftn .FTN
# C file endings: .c .C
CSUFFIXES = .c .C
# Library file endings: .a .so .dylib
LIBSUFFIXES = .a .so .dylib
#
# --- CHECK 0 ---------------------------------------------------
#
# Check available switches
ifeq (,$(findstring $(release),debug release))
$(error Error: release '$(release)' not found: must be in 'debug release')
endif
ifneq ($(netcdf),)
ifeq (,$(findstring $(netcdf),netcdf3 netcdf4))
$(error Error: netcdf '$(netcdf)' not found: must be in 'netcdf3 netcdf4')
endif
endif
ifeq (,$(findstring $(static),static shared dynamic))
$(error Error: static '$(static)' not found: must be in 'static shared dynamic')
endif
#
# --- PATHS ------------------------------------------------
#
# Make absolute pathes from relative pathes - there should be no space nor comment at the end of the next lines
SRCPATH := $(abspath $(SRCPATH:~%=${HOME}%))
PROGPATH := $(abspath $(PROGPATH:~%=${HOME}%))
CONFIGPATH := $(abspath $(CONFIGPATH:~%=${HOME}%))
MAKEDPATH := $(abspath $(MAKEDPATH:~%=${HOME}%))
CHECKPATH := $(abspath $(CHECKPATH:~%=${HOME}%))
DOXCONFIG := $(abspath $(DOXCONFIG:~%=${HOME}%))
#$(info "DOXCONFIG: "$(DOXCONFIG))
# Program names
# Only Prog or Lib
ifeq (,$(strip $(PROGNAME)))
ifeq (,$(strip $(LIBNAME)))
$(error Error: PROGNAME or LIBNAME must be given.)
else
islib := True
LIBNAME := $(PROGPATH)/$(strip $(LIBNAME))
endif
else
ifeq (,$(strip $(LIBNAME)))
islib := False
PROGNAME := $(PROGPATH)/$(strip $(PROGNAME))
else
$(error Error: only one of PROGNAME or LIBNAME can be given.)
endif
endif
MAKEDSCRIPT := make.d.sh
MAKEDEPSPROG := $(MAKEDPATH)/$(MAKEDSCRIPT)
#
# --- CHECK 1 ---------------------------------------------------
#
systems := $(shell ls -1 $(CONFIGPATH) | sed -e "/$(MAKEDSCRIPT)/d" -e '/f2html/d' | cut -d '.' -f 1 | sort | uniq)
ifeq (,$(findstring $(system),$(systems)))
$(error Error: system '$(system)' not found: known systems are $(systems))
endif
#
# --- ALIASES ---------------------------------------------------
#
# Include compiler alias on specific systems, e.g. nag for nag53
icompiler := $(compiler)
ALIASINC := $(CONFIGPATH)/$(system).alias
ifneq ("$(wildcard $(ALIASINC))","")
include $(ALIASINC)
endif
#
# --- CHECK 2 ---------------------------------------------------
#
compilers := $(shell ls -1 $(CONFIGPATH) | sed -e "/$(MAKEDSCRIPT)/d" -e '/f2html/d' -e '/alias/d' -e '/~$$/d' | grep $(system) | cut -d '.' -f 2 | sort | uniq)
gnucompilers := $(filter gnu%, $(compilers))
nagcompilers := $(filter nag%, $(compilers))
intelcompilers := $(filter intel%, $(compilers))
ifeq (,$(findstring $(icompiler),$(compilers)))
$(error Error: compiler '$(icompiler)' not found: configured compilers for system $(system) are $(compilers))
endif
#
# --- DEFAULTS ---------------------------------------------------
#
# These variables will be used to compile
FC :=
FCFLAGS := $(EXTRA_FCFLAGS)
F90 :=
F90FLAGS := $(EXTRA_F90FLAGS)
CC :=
CFLAGS := $(EXTRA_CFLAGS)
CPP :=
DEFINES := $(EXTRA_DEFINES)
INCLUDES := $(EXTRA_INCLUDES)
# and link, and therefore set below
LD :=
LDFLAGS := $(EXTRA_LDFLAGS)
LIBS := $(EXTRA_LIBS) $(addprefix -L,$(SRCPATH))
AR := ar
ARFLAGS := -ru
RANLIB := ranlib
#
# --- COMPILER / MACHINE SPECIFIC --------------------------------
#
# Set path where all the .mod, .o, etc. files will be written, set before include $(MAKEINC)
OBJPATH := $(addsuffix /.$(strip $(icompiler)).$(strip $(release)), $(SRCPATH))
# Include the individual configuration files
MAKEINC := $(addsuffix /$(system).$(icompiler), $(abspath $(CONFIGPATH:~%=${HOME}%)))
#$(info "MAKEINC: "$(MAKEINC))
ifeq ("$(wildcard $(MAKEINC))","")
$(error Error: '$(MAKEINC)' not found.)
endif
include $(MAKEINC)
# Always use -DCFORTRAN for mixed C and Fortran compilations
DEFINES += -DCFORTRAN
# Mac OS X is special, there is (almost) no static linking.
# MAC OS X does not work with -rpath. Set DYLD_LIBRARY_PATH if needed.
iOS := $(shell uname -s)
istatic := $(static)
ifneq (,$(findstring $(iOS),Darwin))
istatic := dynamic
endif
# Start group for cyclic search in static linking
iLIBS :=
ifeq ($(istatic),static)
iLIBS += -Bstatic -Wl,--start-group
else
ifneq (,$(findstring $(iOS),Darwin))
iLIBS += -Wl,-dynamic
else
iLIBS += -Bdynamic
endif
endif
# --- COMPILER ---------------------------------------------------
ifneq (,$(findstring $(icompiler),$(gnucompilers)))
ifeq ("$(wildcard $(GFORTRANDIR)*)","")
$(error Error: GFORTRAN path '$(GFORTRANDIR)' not found.)
endif
GFORTRANLIB ?= $(GFORTRANDIR)/lib
iLIBS += -L$(GFORTRANLIB) -lgfortran
RPATH += -Wl,-rpath,$(GFORTRANLIB)
endif
# --- IMSL ---------------------------------------------------
ifneq (,$(findstring $(imsl),vendor imsl))
ifeq ("$(wildcard $(IMSLDIR)*)","")
$(error Error: IMSL path '$(IMSLDIR)' not found.)
endif
IMSLINC ?= $(IMSLDIR)/include
IMSLLIB ?= $(IMSLDIR)/lib
INCLUDES += -I$(IMSLINC)
ifneq ($(ABSOFT),)
INCLUDES += -p $(IMSLINC)
endif
DEFINES += -DIMSL
ifeq (,$(findstring $(iOS),Darwin))
iLIBS += -z muldefs
ifneq ($(istatic),static)
iLIBS += -i_dynamic
endif
endif
ifneq (,$(findstring $(iOS),Darwin))
iLIBS += -L$(IMSLLIB) -limsl -limslscalar -limsllapack -limslblas -limsls_err -limslmpistub -limslsuperlu
else
ifeq ($(imsl),imsl)
iLIBS += -L$(IMSLLIB) -limsl -limslscalar -limsllapack_imsl -limslblas_imsl -limsls_err -limslmpistub -limslsuperlu
else
iLIBS += -L$(IMSLLIB) -limsl -limslscalar -limsllapack_vendor -limslblas_vendor -limsls_err -limslmpistub -limslsuperlu -limslhpc_l
endif
endif
RPATH += -Wl,-rpath,$(IMSLLIB)
endif
# --- OPENMP ---------------------------------------------------
iopenmp=
ifeq ($(openmp),true)
ifneq (,$(findstring $(icompiler),$(gnucompilers)))
iopenmp := -fopenmp
else
iopenmp := -openmp
endif
DEFINES += -DOPENMP
endif
F90FLAGS += $(iopenmp)
FCFLAGS += $(iopenmp)
CFLAGS += $(iopenmp)
LDFLAGS += $(iopenmp)
# IMSL needs openmp during linking in any case
ifneq ($(openmp),true)
ifneq (,$(findstring $(imsl),vendor imsl))
ifneq (,$(findstring $(icompiler),$(gnucompilers)))
LDFLAGS += -fopenmp
else
LDFLAGS += -openmp
endif
endif
endif
# --- MKL ---------------------------------------------------
ifneq (,$(findstring $(mkl),mkl mkl95))
ifeq ($(mkl),mkl95) # First mkl95 then mkl for .mod files other then intel
ifeq ("$(wildcard $(MKL95DIR)*)","")
$(error Error: MKL95 path '$(MKL95DIR)' not found.)
endif
MKL95INC ?= $(MKL95DIR)/include
MKL95LIB ?= $(MKL95DIR)/lib
INCLUDES += -I$(MKL95INC)
ifneq ($(ABSOFT),)
INCLUDES += -p $(MKL95INC)
endif
DEFINES += -DMKL95
iLIBS += -L$(MKL95LIB) -lmkl_blas95_lp64 -lmkl_lapack95_lp64
RPATH += -Wl,-rpath,$(MKL95LIB)
ifneq ($(ABSOFT),)
F90FLAGS += -p $(MKL95INC)
endif
endif
ifeq ("$(wildcard $(MKLDIR)*)","")
$(error Error: MKL path '$(MKLDIR)' not found.)
endif
MKLINC ?= $(MKLDIR)/include
MKLLIB ?= $(MKLDIR)/lib
INCLUDES += -I$(MKLINC)
ifneq ($(ABSOFT),)
INCLUDES += -p $(MKLINC)
endif
DEFINES += -DMKL
iLIBS += -L$(MKLLIB) -lmkl_intel_lp64 -lmkl_core #-lpthread
ifneq (,$(findstring $(imsl),vendor imsl))
iLIBS += -lmkl_intel_thread #-lpthread
else
ifeq ($(openmp),true)
iLIBS += -lmkl_intel_thread #-lpthread
else
iLIBS += -lmkl_sequential #-lpthread
endif
endif
RPATH += -Wl,-rpath,$(MKLLIB)
ifeq ($(openmp),true)
ifeq (,$(findstring $(icompiler),$(intelcompilers)))
iLIBS += -L$(INTELLIB) -liomp5
RPATH += -Wl,-rpath,$(INTELLIB)
endif
endif
endif
# --- NETCDF ---------------------------------------------------
ifneq (,$(findstring $(netcdf),netcdf3 netcdf4))
ifeq ("$(wildcard $(NCDIR)*)","")
$(error Error: NETCDF path '$(NCDIR)' not found.)
endif
NCINC ?= $(strip $(NCDIR))/include
NCLIB ?= $(strip $(NCDIR))/lib
INCLUDES += -I$(NCINC)
ifneq ($(ABSOFT),)
INCLUDES += -p $(NCINC)
endif
DEFINES += -DNETCDF
iLIBS += -L$(NCLIB)
RPATH += -Wl,-rpath,$(NCLIB)
ifeq (libnetcdff, $(shell ls $(NCLIB)/libnetcdff.* 2> /dev/null | sed -n '1p' | sed -e 's/.*\(libnetcdff\)/\1/' -e 's/\(libnetcdff\).*/\1/'))
iLIBS += -lnetcdff
endif
iLIBS += -lnetcdf
ifneq ("$(wildcard $(NCFDIR)*)","")
NCFINC ?= $(strip $(NCFDIR))/include
NCFLIB ?= $(strip $(NCFDIR))/lib
INCLUDES += -I$(NCFINC)
ifneq ($(ABSOFT),)
INCLUDES += -p $(NCFINC)
endif
iLIBS += -L$(NCFLIB)
RPATH += -Wl,-rpath,$(NCFLIB)
ifeq (libnetcdff, $(shell ls $(NCFLIB)/libnetcdff.* 2> /dev/null | sed -n '1p' | sed -e 's/.*\(libnetcdff\)/\1/' -e 's/\(libnetcdff\).*/\1/'))
iLIBS += -lnetcdff
endif
endif
# other libraries for netcdf4, ignored for netcdf3
ifeq ($(system),cygwin)
ifeq ($(netcdf),netcdf4)
iLIBS += -L$(HDF5LIB) -lhdf5_hl -lhdf5
RPATH += -Wl,-rpath,$(HDF5LIB)
ifneq ($(CURLLIB),)
iLIBS += -L$(CURLLIB) -lcurl
RPATH += -Wl,-rpath,$(CURLLIB)
endif
endif
else
ifeq ($(netcdf),netcdf4)
iLIBS += -L$(HDF5LIB) -lhdf5_hl -lhdf5 -L$(SZLIB) -lsz
ifneq ($(ZLIB),)
iLIBS += -L$(ZLIB) -lz
RPATH += -Wl,-rpath,$(ZLIB)
else
iLIBS += -lz
endif
RPATH += -Wl,-rpath,$(HDF5LIB) -Wl,-rpath,$(SZLIB)
ifneq ($(CURLLIB),)
iLIBS += -L$(CURLLIB) -lcurl
RPATH += -Wl,-rpath,$(CURLLIB)
endif
endif
endif
endif
# --- PROJ --------------------------------------------------
ifeq ($(proj),true)
ifeq ("$(wildcard $(PROJ4DIR)*)","")
$(error Error: PROJ4 path '$(PROJ4DIR)' not found.)
endif
PROJ4LIB ?= $(PROJ4DIR)/lib
iLIBS += -L$(PROJ4LIB) -lproj
RPATH += -Wl,-rpath=$(PROJ4LIB)
ifeq ("$(wildcard $(FPROJDIR)*)","")
$(error Error: FPROJ path '$(FPROJDIR)' not found.)
endif
FPROJINC ?= $(FPROJDIR)/include
FPROJLIB ?= $(FPROJDIR)/lib
INCLUDES += -I$(FPROJINC)
ifneq ($(ABSOFT),)
INCLUDES += -p $(FPROJINC)
endif
DEFINES += -DFPROJ
iLIBS += -L$(FPROJLIB) -lfproj4 $(FPROJLIB)/proj4.o
RPATH += -Wl,-rpath,$(FPROJLIB)
endif
# --- LAPACK ---------------------------------------------------
ifeq ($(lapack),true)
# Mac OS X uses frameworks
ifneq (,$(findstring $(iOS),Darwin))
iLIBS += -framework veclib
else
ifeq ("$(wildcard $(LAPACKDIR)*)","")
$(error Error: LAPACK path '$(LAPACKDIR)' not found.)
endif
LAPACKLIB ?= $(LAPACKDIR)/lib
iLIBS += -L$(LAPACKLIB) -lblas -llapack
RPATH += -Wl,-rpath,$(LAPACKLIB)
endif
DEFINES += -DLAPACK
endif
# --- MPI ---------------------------------------------------
ifeq ($(mpi),true)
ifeq ("$(wildcard $(MPIDIR)*)","")
$(error Error: MPI path '$(MPIDIR)' not found.)
endif
MPIINC ?= $(MPIDIR)/include
MPILIB ?= $(MPIDIR)/lib
iLIBS += -L$(MPILIB) # -lproj
RPATH += -Wl,-rpath=$(MPILIB)
INCLUDES += -I$(MPIINC) -I$(MPILIB) # mpi.h in lib and not include <- strange
DEFINES += -DMPI
endif
# --- DOXYGEN ---------------------------------------------------
ifneq (,$(filter doxygen html latex pdf, $(MAKECMDGOALS)))
ifneq ("$(wildcard $(DOXCONFIG))","")
ISDOX := True
ifneq ($(DOXYGENDIR),)
ifeq ("$(wildcard $(DOXYGENDIR)*)","")
$(error Error: doxygen not found in $(strip $(DOXYGENDIR)).)
else
DOXYGEN := $(strip $(DOXYGENDIR))/"doxygen"
endif
else
ifneq (, $(shell which doxygen))
DOXYGEN := doxygen
else
$(error Error: doxygen not found in $PATH.)
endif
endif
ifneq ($(DOTDIR),)
ifeq ("$(wildcard $(DOTDIR)*)","")
$(error Error: dot not found in $(strip $(DOTDIR)).)
else
DOTPATH := $(strip $(DOTDIR))
endif
else
ifneq (, $(shell which dot))
DOTPATH := $(dir $(shell which dot))
else
DOTPATH :=
endif
endif
ifneq ($(TEXDIR),)
ifeq ("$(wildcard $(strip $(TEXDIR))/latex)","")
$(error Error: latex not found in $(strip $(TEXDIR)).)
else
TEXPATH := $(strip $(TEXDIR))
endif
else
ifneq (, $(shell which latex))
TEXPATH := $(dir $(shell which latex))
else
$(error Error: latex not found in $PATH.)
endif
endif
ifneq ($(PERLDIR),)
ifeq ("$(wildcard $(strip $(PERLDIR))/perl)","")
$(error Error: perl not found in $(strip $(PERLDIR)).)
else
PERLPATH := $(strip $(PERLDIR))
endif
else
ifneq (, $(shell which perl))
PERLPATH := $(dir $(shell which perl))
else
$(error Error: perl not found in $PATH.)
endif
endif
else
ISDOX := False