#------------------------------------------------------------------------------- # dimr top-level automake configutation # common.am (see also configure.ac) # #------------------------------------------------------------------------------- # Remove .exe extension (defaults to .exe on cygwin). EXEEXT= #------------------------------------------------------------------------------- # C/C++ flags AM_CFLAGS = \ -D_GNU_SOURCE \ -DSTR_LEN_AT_END \ -DWITH_DELFTONLINE ## For future reference for D-Flow FM ## -std=c99 AM_CXXFLAGS = \ -D_GNU_SOURCE \ -DSTR_LEN_AT_END \ -DWITH_DELFTONLINE ## For future reference for D-Flow FM ## -std=c++98 STANDARD_C_INCLUDES = \ -I$(top_builddir)/engines_gpl/dimr/packages/dimr/include \ -I$(top_builddir)/engines_gpl/dimr/packages/dimr_lib/include \ -I$(top_builddir)/engines_gpl/flow2d3d/packages/flow2d3d/include \ -I$(top_builddir)/utils_lgpl/delftonline/include \ -I$(top_builddir)/utils_lgpl/d_hydro_lib/include \ -I$(top_builddir)/utils_lgpl/esmfsm/include \ -I$(top_builddir)/utils_lgpl/deltares_common/packages/deltares_common_c/include #------------------------------------------------------------------------------- # Fortran flags # Set FINCLUDES and FMODULES to empty here, so they can be expanded with += later. FINCLUDES = FMODULES = flow2d3dincludedir = $(includedir)/flow2d3d #------------------------------------------------------------------------------- # Fortran 90 flags AM_FCFLAGS = \ $(FINCLUDES) \ $(FMODULES) \ -DWITH_DELFTONLINE # For future references D-Flow FM #FOPTFLAGS = -O2 #LDOPTFLAGS = -O2 AM_FCFLAGS+=$(FOPTFLAGS) # Do not use the openmp libraries by default: # When using the Intel compiler, this will cause the multi-threaded version to be # used, even if no OpenMP is used. And the multi-threaded version is known # to have a very high latency. # AM_FCFLAGS += $(OPENMP_FCFLAGS) # TODO does D-Flow FM still has OMP despite the line above? #------------------------------------------------------------------------------- # Fortran 77 flags AM_FFLAGS = \ $(FINCLUDES) \ $(FMODULES) \ -DWITH_DELFTONLINE # Do not use the openmp libraries by default: # When using the Intel compiler, this will cause the multi-threaded version to be # used, even if no OpenMP is used. And the multi-threaded version is known # to have a very high latency. # AM_FFLAGS += $(OPENMP_FFLAGS) # TODO does D-Flow FM still has OMP despite the line above? #------------------------------------------------------------------------------- # (disabled) LEX and YACC flags #AM_LFLAGS += -L #AM_YFLAGS += -d #------------------------------------------------------------------------------- # Allow to build in different subdirectories # This is described in http://www.gnu.org/software/automake/manual/automake.html#VPATH-Builds srcdir = @srcdir@ VPATH = @srcdir@ nodistdir = @abs_builddir@/bin noinst_nodistdir = @abs_builddir@/bin #------------------------------------------------------------------------------- # Custom make targets ds-install: install ( \ cd $(top_builddir) ; \ ./install.sh $(prefix) \ ) # Improved version_number: # Something like find . -?newer ../version_number.h.... # make directory if it doesn't exist and add a version number # relative to build dir # make revision expects: # include/version_number.h: # if [ ! -d include ]; then mkdir include; fi # $(top_srcdir)/scripts/linux/make_revision.sh $(abs_top_builddir) $(abs_top_builddir) $(abs_srcdir) $(abs_builddir) # ToDo: make delftflow-dist part of ds-install? delftflow-dist: ds-install ( \ export DEST=$(top_builddir)/dist/delftflow-linux ; \ mkdir -p $$DEST ; \ cp -p $(top_builddir)/bin/dimr $$DEST ; \ cd $$DEST/.. ; \ tar czf delftflow-linux.tgz delftflow-linux ; \ rm -rf delftflow-linux \ ) # # Make dist depends on make. So force to do a make when doing make dist. #dist dist-all: all # $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir=' :' # $(am__post_remove_distdir) distclean-local: rm -f $(top_builddir)/bin/* rm -f $(top_builddir)/lib/* clean-local: rm -f *.mod ds-clean: distclean distclean-local clean-local maintainer-clean maintainer-clean-am