-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
124 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,8 @@ | ||
|
||
# We are not following the standard layout of a GNU proyect | ||
AUTOMAKE_OPTIONS = foreign | ||
|
||
EXTRA_DIST = LICENSE README.md | ||
|
||
bin_PROGRAMS = dana | ||
|
||
dana_SOURCES = dana.F90 \ | ||
Constants.F90 \ | ||
Cells.F90 \ | ||
Neighbor.F90 \ | ||
Elements.F90 \ | ||
Program_Types.F90 \ | ||
Errors.f90 \ | ||
Strings.f90 \ | ||
Groups.F90 | ||
|
||
# Fortran Preprocesor Templates | ||
FPTDDS=$(top_srcdir)/lib/fpt/include/ | ||
AM_FCFLAGS = -I$(FPTDDS) | ||
include_HEADERS = $(FPTDDS)/prep.inc \ | ||
$(FPTDDS)/vector_header.inc \ | ||
$(FPTDDS)/vector_body.inc \ | ||
$(FPTDDS)/list_header.inc \ | ||
$(FPTDDS)/list_body.inc \ | ||
$(FPTDDS)/dlist_header.inc \ | ||
$(FPTDDS)/dlist_body.inc \ | ||
$(FPTDDS)/cdlist_header.inc \ | ||
$(FPTDDS)/cdlist_body.inc \ | ||
$(FPTDDS)/arrayofptrs_header.inc | ||
|
||
DEBUG_FLAGS = -g -O0 -p | ||
PROF_FLAGS = -p | ||
|
||
AM_FCFLAGS += $(OPENMP_CFLAGS) | ||
AM_FCFLAGS += -DDIM3 | ||
|
||
if COMPILER_IS_GFORTRAN | ||
DEBUG_FLAGS += -fbacktrace | ||
DEBUG_FLAGS += -fcheck=all | ||
DEBUG_FLAGS += -Wall | ||
DEBUG_FLAGS += -fbounds-check | ||
DEBUG_FLAGS += -fcheck-array-temporaries | ||
DEBUG_FLAGS += -pedantic-errors | ||
# F90DEBUG += -std=f2003 -pedantic | ||
|
||
# Some times needed for valgrind | ||
# F90DEBUG += -static | ||
|
||
# To warn about use modules without only keyword | ||
# F90DEBUG += -Wuse-without-only | ||
endif | ||
|
||
if COMPILER_IS_IFORT | ||
DEBUG_FLAGS += -check all | ||
DEBUG_FLAGS += -traceback | ||
DEBUG_FLAGS += -warn all | ||
DEBUG_FLAGS += -debug all | ||
#F90DEBUG += "-Mprof=func" | ||
#F90DEBUG += "-Mprof=line" | ||
endif | ||
|
||
if DEBUG | ||
ENABLE_DEBUG=$(DEBUG_FLAGS) | ||
endif | ||
|
||
AM_FCFLAGS += $(ENABLE_DEBUG) | ||
|
||
|
||
|
||
.PHONY: debug | ||
|
||
debug: | ||
make ENABLE_DEBUG="$(DEBUG_FLAGS)" | ||
|
||
all: dana | ||
SUBDIRS = lib/fpt src | ||
|
||
Constants.o: | ||
Strings.o: Constants.o | ||
Errors.o: Constants.o Strings.o | ||
Elements.o: Constants.o Strings.o Errors.o | ||
|
||
Program_Types.o: Constants.o Errors.o Elements.o | ||
dana.o: Groups.o Neighbor.o Errors.o | ||
Program_Types.o: Constants.o Errors.o Elements.o | ||
Groups.o: Constants.o Elements.o Errors.o Program_Types.o | ||
Neighbor.o: Constants.o Groups.o Errors.o Cells.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,45 +5,54 @@ AC_INIT([dana], | |
[m4_esyscmd_s([git describe --always --abbrev=4 --dirty])], | ||
[[email protected]]) | ||
|
||
AC_CONFIG_SRCDIR(.) | ||
AC_CONFIG_SRCDIR(src/) | ||
|
||
AM_INIT_AUTOMAKE() | ||
AM_INIT_AUTOMAKE([subdir-objects foreign]) | ||
|
||
# Avoid make to rebuild configure | ||
AM_MAINTAINER_MODE | ||
|
||
# Set OpenMP flags | ||
# : ${enable_openmp=no} | ||
AC_OPENMP | ||
|
||
# To build libraries | ||
AC_PROG_RANLIB | ||
|
||
# Set AR | ||
AM_PROG_AR | ||
|
||
# Set FCFLAGS and FC | ||
: ${FCFLAGS=""} # Override default (i.e. "-g -O2") | ||
AC_PROG_FC | ||
|
||
# External software | ||
# ================= | ||
|
||
# subtrees | ||
# -------- | ||
AC_CONFIG_SUBDIRS([ | ||
lib/fpt | ||
]) | ||
|
||
# Debug options | ||
# other options | ||
# ============= | ||
|
||
AM_CONDITIONAL([COMPILER_IS_IFORT], [test x"$FC" = xifort]) | ||
AM_CONDITIONAL([COMPILER_IS_GFORTRAN], [test x"$FC" = xgfortran]) | ||
|
||
# Debug | ||
# ----- | ||
AC_ARG_ENABLE([debug], | ||
AS_HELP_STRING([--enable-debug],[Turn on debugging]), | ||
[case "${enableval}" in | ||
yes) debug=true ;; | ||
no) debug=false ;; | ||
*) AC_MSG_ERROR([bad value "${enableval}" for --enable-debug]) ;; | ||
esac],enable_debug=no) | ||
|
||
|
||
# Usefull variables to use inside the Makefile.am files | ||
AM_CONDITIONAL([COMPILER_IS_IFORT], [test x"$FC" = xifort]) | ||
AM_CONDITIONAL([COMPILER_IS_GFORTRAN], [test x"$FC" = xgfortran]) | ||
AM_CONDITIONAL([DEBUG], [test "x$enable_debug" = "xyes"]) | ||
|
||
|
||
AC_CONFIG_FILES([ | ||
Makefile | ||
src/Makefile | ||
]) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
# -*- Autoconf -*- | ||
# Process this file with autoconf to produce a configure script. | ||
|
||
AC_INIT([fpt-dds], | ||
[m4_esyscmd_s([git describe --always --abbrev=4 --dirty])], | ||
[[email protected]]) | ||
AC_INIT([fpt-dds],[m4_esyscmd_s([git describe --always --abbrev=4 --dirty])],[[email protected]]) | ||
|
||
AC_CONFIG_MACRO_DIR([m4]) | ||
AC_CONFIG_SRCDIR(src/) | ||
|
@@ -26,7 +24,7 @@ AC_PROG_FC | |
|
||
# Debug options | ||
AC_ARG_ENABLE([debug], | ||
AC_HELP_STRING([--enable-debug],[Turn on debugging]), | ||
AS_HELP_STRING([--enable-debug],[Turn on debugging]), | ||
[case "${enableval}" in | ||
yes) debug=true ;; | ||
no) debug=false ;; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
bin_PROGRAMS = dana | ||
|
||
dana_SOURCES = dana.F90 \ | ||
Constants.F90 \ | ||
Cells.F90 \ | ||
Neighbor.F90 \ | ||
Elements.F90 \ | ||
Program_Types.F90 \ | ||
Errors.f90 \ | ||
Strings.f90 \ | ||
Groups.F90 | ||
|
||
# zeros... | ||
dana_LDADD = | ||
AM_FCFLAGS = | ||
|
||
AM_FCFLAGS += $(OPENMP_CFLAGS) | ||
AM_FCFLAGS += -DDIM3 | ||
|
||
# External software | ||
# ================= | ||
|
||
# Note on local vs external libraries: | ||
# > We recommend that you avoid using -l options in LDADD or prog_LDADD when | ||
# referring to libraries built by your package. Instead, write the file name of | ||
# the library explicitly as in the above cpio example. Use -l only to list | ||
# third-party libraries. If you follow this rule, the default value of | ||
# prog_DEPENDENCIES will list all your local libraries and omit the other ones. | ||
# [source](https://www.gnu.org/software/automake/manual/html_node/Linking.html) | ||
|
||
# Fortran Preprocesor Templates | ||
# ----------------------------- | ||
AM_FCFLAGS += -I$(top_srcdir)/lib/fpt/include/ | ||
|
||
# Debug | ||
# ===== | ||
|
||
DEBUG_FLAGS = -g -O0 -p | ||
PROF_FLAGS = -p | ||
|
||
if COMPILER_IS_GFORTRAN | ||
DEBUG_FLAGS += -fbacktrace | ||
DEBUG_FLAGS += -fcheck=all | ||
DEBUG_FLAGS += -Wall | ||
DEBUG_FLAGS += -fbounds-check | ||
DEBUG_FLAGS += -fcheck-array-temporaries | ||
DEBUG_FLAGS += -pedantic-errors | ||
# F90DEBUG += -std=f2003 -pedantic | ||
|
||
# Some times needed for valgrind | ||
# F90DEBUG += -static | ||
|
||
# To warn about use modules without only keyword | ||
# F90DEBUG += -Wuse-without-only | ||
endif | ||
|
||
if COMPILER_IS_IFORT | ||
DEBUG_FLAGS += -check all | ||
DEBUG_FLAGS += -traceback | ||
DEBUG_FLAGS += -warn all | ||
DEBUG_FLAGS += -debug all | ||
#F90DEBUG += "-Mprof=func" | ||
#F90DEBUG += "-Mprof=line" | ||
endif | ||
|
||
if DEBUG | ||
ENABLE_DEBUG=$(DEBUG_FLAGS) | ||
endif | ||
|
||
AM_FCFLAGS += $(ENABLE_DEBUG) | ||
|
||
|
||
|
||
.PHONY: debug | ||
|
||
debug: | ||
make ENABLE_DEBUG="$(DEBUG_FLAGS)" | ||
|
||
all: dana | ||
|
||
|
||
Constants.o: | ||
Strings.o: Constants.o | ||
Errors.o: Constants.o Strings.o | ||
Elements.o: Constants.o Strings.o Errors.o | ||
|
||
Program_Types.o: Constants.o Errors.o Elements.o | ||
dana.o: Groups.o Neighbor.o Errors.o Elements.o Constants.o | ||
Program_Types.o: Constants.o Errors.o Elements.o | ||
Groups.o: Constants.o Elements.o Errors.o Program_Types.o | ||
Neighbor.o: Constants.o Groups.o Errors.o Cells.o | ||
|
||
clean-local: | ||
rm -f *.mod | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.