[cig-commits] [commit] devel: BLD: Move extra programs into auxiliaries directory. (d7babb2)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Jan 7 02:23:54 PST 2015


Repository : https://github.com/geodynamics/specfem2d

On branch  : devel
Link       : https://github.com/geodynamics/specfem2d/compare/a7da6467b6d122c0472513444ce29f2e16a04648...de54f292fc495b3e612e883ea9c3ad063282a6e9

>---------------------------------------------------------------

commit d7babb224a5736569a4278c467c7b5641a7f6a1d
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Tue Jan 6 18:20:51 2015 -0500

    BLD: Move extra programs into auxiliaries directory.


>---------------------------------------------------------------

d7babb224a5736569a4278c467c7b5641a7f6a1d
 .gitignore                                         |   1 +
 Makefile.in                                        |  16 +--
 configure                                          |  25 ++--
 configure.ac                                       |   1 +
 Makefile.in => src/auxiliaries/Makefile.in         | 134 ++++++++++++++-------
 src/{shared => auxiliaries}/adj_seismogram.f90     |   0
 .../check_quality_external_mesh.f90                |   0
 .../convolve_source_timefunction.f90               |   0
 src/meshfem2D/Makefile.in                          |  24 +---
 .../define_shape_functions.f90                     |   0
 src/specfem2D/Makefile.in                          |  50 ++------
 11 files changed, 123 insertions(+), 128 deletions(-)

diff --git a/.gitignore b/.gitignore
index ee0d55f..31eb729 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ config.status
 ./Makefile
 src/meshfem2D/Makefile
 src/specfem2D/Makefile
+src/auxiliaries/Makefile
 
 setup/config.h
 setup/constants.h
diff --git a/Makefile.in b/Makefile.in
index 4ff220c..56ab7f3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -71,29 +71,29 @@ xmeshfem2D:
 	$(MAKE) -C src/meshfem2D
 
 ##
-## check_quality_external_mesh
-##
-xcheck_quality_external_mesh:
-	$(MAKE) -C src/meshfem2D xcheck_quality_external_mesh
-
-##
 ## solver
 ##
 xspecfem2D:
 	$(MAKE) -C src/specfem2D specfem2D
 
 ##
+## check_quality_external_mesh
+##
+xcheck_quality_external_mesh:
+	$(MAKE) -C src/auxiliaries xcheck_quality_external_mesh
+
+##
 ## convolve_source_timefunction
 ##
 xconvolve_source_timefunction:
-	$(MAKE) -C src/specfem2D xconvolve_source_timefunction
+	$(MAKE) -C src/auxiliaries xconvolve_source_timefunction
 
 
 ##
 ## adj_seismogram
 ##
 xadj_seismogram:
-	$(MAKE) -C src/specfem2D xadj_seismogram
+	$(MAKE) -C src/auxiliaries xadj_seismogram
 
 
 clean:
diff --git a/configure b/configure
index e704c5f..fc2b1d9 100755
--- a/configure
+++ b/configure
@@ -2,6 +2,8 @@
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.69 for Specfem 2D 6.2.0.
 #
+# Report bugs to <see the wiki>.
+#
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
@@ -264,11 +266,10 @@ fi
     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
-    $as_echo "$0: Please tell bug-autoconf at gnu.org
-$0: about your system, including any error
-$0: possibly output before this message. Then install a
-$0: modern shell, or manually run the script under such a
-$0: shell if you do have one."
+    $as_echo "$0: Please tell bug-autoconf at gnu.org and see the wiki about
+$0: your system, including any error possibly output before
+$0: this message. Then install a modern shell, or manually
+$0: run the script under such a shell if you do have one."
   fi
   exit 1
 fi
@@ -1389,7 +1390,7 @@ Some influential environment variables:
   MPIFC       MPI Fortran compiler command
   MPILIBS     extra libraries for linking MPI programs
   MPICC       MPI C compiler command
-  DEF_FFLAGS Fortran compiler flags
+  DEF_FFLAGS  Fortran compiler flags
   LOCAL_PATH_IS_ALSO_GLOBAL
               files on a local path on each node are also seen as global with
               same path [default=true]
@@ -1397,7 +1398,7 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-.
+Report bugs to <see the wiki>.
 _ACEOF
 ac_status=$?
 fi
@@ -1703,8 +1704,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## -------------------------------------- ##
-## -------------------------------------- ##"
+( $as_echo "## --------------------------- ##
+## Report this to see the wiki ##
+## --------------------------- ##"
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
@@ -5781,7 +5783,7 @@ fi
 
 # Checks for library functions.
 
-ac_config_files="$ac_config_files Makefile src/meshfem2D/Makefile src/specfem2D/Makefile setup/constants.h setup/precision.h src/meshfem2D/scotch_5.1.12b/src/Makefile.inc"
+ac_config_files="$ac_config_files Makefile src/meshfem2D/Makefile src/specfem2D/Makefile src/auxiliaries/Makefile setup/constants.h setup/precision.h src/meshfem2D/scotch_5.1.12b/src/Makefile.inc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -6349,7 +6351,7 @@ $config_files
 Configuration headers:
 $config_headers
 
-."
+Report bugs to <see the wiki>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -6480,6 +6482,7 @@ do
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "src/meshfem2D/Makefile") CONFIG_FILES="$CONFIG_FILES src/meshfem2D/Makefile" ;;
     "src/specfem2D/Makefile") CONFIG_FILES="$CONFIG_FILES src/specfem2D/Makefile" ;;
+    "src/auxiliaries/Makefile") CONFIG_FILES="$CONFIG_FILES src/auxiliaries/Makefile" ;;
     "setup/constants.h") CONFIG_FILES="$CONFIG_FILES setup/constants.h" ;;
     "setup/precision.h") CONFIG_FILES="$CONFIG_FILES setup/precision.h" ;;
     "src/meshfem2D/scotch_5.1.12b/src/Makefile.inc") CONFIG_FILES="$CONFIG_FILES src/meshfem2D/scotch_5.1.12b/src/Makefile.inc" ;;
diff --git a/configure.ac b/configure.ac
index c618d7b..86c98ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,6 +232,7 @@ AC_CONFIG_FILES([
 	Makefile
 	src/meshfem2D/Makefile
 	src/specfem2D/Makefile
+	src/auxiliaries/Makefile
 	setup/constants.h
 	setup/precision.h
 	src/meshfem2D/scotch_5.1.12b/src/Makefile.inc
diff --git a/Makefile.in b/src/auxiliaries/Makefile.in
similarity index 52%
copy from Makefile.in
copy to src/auxiliaries/Makefile.in
index 4ff220c..656b6f6 100644
--- a/Makefile.in
+++ b/src/auxiliaries/Makefile.in
@@ -40,81 +40,125 @@
 #
 #========================================================================
 
+# @configure_input@
+
+FC = @FC@
+FCFLAGS = #@FCFLAGS@
+
+MPIFC = @MPIFC@
+MPILIBS = @MPILIBS@
+
+DEF_FFLAGS = @DEF_FFLAGS@ -I../../setup
+
+CC = @CC@
+CPPFLAGS = @CPPFLAGS@ $(COND_MPI_CPPFLAGS)
+CFLAGS = @CFLAGS@ $(CPPFLAGS) -I../../setup
+
+## serial or parallel
+ at COND_MPI_TRUE@F90 = $(MPIFC) $(FCFLAGS) @FC_DEFINE at USE_MPI $(MPILIBS)
+ at COND_MPI_FALSE@F90 = $(FC) $(FCFLAGS)
+
+LIB = 
+
+LINK = $(F90)
+
+## compilation directories
+# E : executables directory
+E = ../../bin
+# O : objects directory
+O = ../../obj
+# SHARED : shared directoy
+SHARED = ../shared
+# S : source file directory
+S = .
+## setup file directory
+SETUP = ../../setup
+
+
+.PHONY: help clean default all \
+	check_quality_external_mesh xcheck_quality_external_mesh \
+	xadj_seismogram convolve_source_timefunction xconvolve_source_timefunction
+
 ####
 #### targets
 ####
 
 DEFAULT = \
-	xmeshfem2D \
-	xspecfem2D \
-	xconvolve_source_timefunction \
-	xcheck_quality_external_mesh \
 	xadj_seismogram \
+	xcheck_quality_external_mesh \
+	xconvolve_source_timefunction \
 	$(EMPTY_MACRO)
 
 default: $(DEFAULT)
 
 all: default
 
-mesh : meshfem2D
-spec : specfem2D
-specfem2D: xspecfem2D
-meshfem2D: xmeshfem2D
-convolve_source_timefunction: xconvolve_source_timefunction
 check_quality_external_mesh: xcheck_quality_external_mesh
-adj_seismogram: xadj_seismogram
+convolve_source_timefunction: xconvolve_source_timefunction
 
-##
-## mesher
-##
-xmeshfem2D:
-	$(MAKE) -C src/meshfem2D
+
+clean:
+	-rm -rf $O/*.o \
+	$O/*.il *.mod \
+	$E/xcheck_quality_external_mesh \
+	$E/xconvolve_source_timefunction \
+	*.oo *.ipo
+
+
+help:
+	@echo "usage: make [executable]"
+	@echo ""
+	@echo "supported executables:"
+	@echo "    xcheck_quality_external_mesh"
+	@echo "    xconvolve_source_timefunction"
+	@echo "    xadj_seismogram"
+	@echo ""
 
 ##
 ## check_quality_external_mesh
 ##
-xcheck_quality_external_mesh:
-	$(MAKE) -C src/meshfem2D xcheck_quality_external_mesh
+xcheck_quality_external_mesh: $E/xcheck_quality_external_mesh
+$E/xcheck_quality_external_mesh: $O/check_quality_external_mesh.o $O/read_value_parameters.o $O/param_reader.o $O/define_shape_functions.o
+	${F90} $(DEF_FFLAGS) -o ${E}/xcheck_quality_external_mesh $O/check_quality_external_mesh.o $O/read_value_parameters.o $O/param_reader.o $O/define_shape_functions.o
 
 ##
-## solver
+## convolve_source_timefunction
 ##
-xspecfem2D:
-	$(MAKE) -C src/specfem2D specfem2D
+xconvolve_source_timefunction: $E/xconvolve_source_timefunction
+$E/xconvolve_source_timefunction: $O/convolve_source_timefunction.o
+	${F90} $(DEF_FFLAGS) -o ${E}/xconvolve_source_timefunction $O/convolve_source_timefunction.o
 
 ##
-## convolve_source_timefunction
+## adj_seismogram
 ##
-xconvolve_source_timefunction:
-	$(MAKE) -C src/specfem2D xconvolve_source_timefunction
+xadj_seismogram: $E/xadj_seismogram
+$E/xadj_seismogram: $O/adj_seismogram.o
+	${F90} $(DEF_FFLAGS) -o ${E}/xadj_seismogram $O/adj_seismogram.o
 
 
 ##
-## adj_seismogram
+## object files
 ##
-xadj_seismogram:
-	$(MAKE) -C src/specfem2D xadj_seismogram
 
+$O/adj_seismogram.o: $S/adj_seismogram.f90
+	${F90} $(DEF_FFLAGS) -c -o $O/adj_seismogram.o $S/adj_seismogram.f90
 
-clean:
-	rm -rf obj/* bin/* src/meshfem2D/*.mod src/specfem2D/*.mod src/meshfem2D/*__genmod.f90 src/specfem2D/*__genmod.f90
-	$(MAKE) -C src/meshfem2D/scotch/src realclean
+$O/check_quality_external_mesh.o: $S/check_quality_external_mesh.f90
+	${F90} $(DEF_FFLAGS) -c -o $O/check_quality_external_mesh.o $S/check_quality_external_mesh.f90
 
-help:
-	@echo "usage: make [executable]"
-	@echo ""
-	@echo "supported executables:"
-	@echo "    xspecfem3D"
-	@echo "    xmeshfem3D"
-	@echo "    xconvolve_source_timefunction"
-	@echo "    xcheck_quality_external_mesh"
-	@echo "    xadj_seismogram"
-	@echo ""
+$O/convolve_source_timefunction.o: $S/convolve_source_timefunction.f90
+	${F90} $(DEF_FFLAGS) -c -o $O/convolve_source_timefunction.o $S/convolve_source_timefunction.f90
 
-.PHONY: default all clean help \
-	mesh meshfem2D xmeshfem2D \
-	spec specfem2D xspecfem2D \
-	convolve_source_timefunction xconvolve_source_timefunction \
-	check_quality_external_mesh xcheck_quality_external_mesh \
-	adj_seismogram xadj_seismogram
+##
+## shared
+##
+
+$O/define_shape_functions.o: ${SHARED}/define_shape_functions.f90 ${SETUP}/constants.h
+	${F90} $(DEF_FFLAGS) -c -o $O/define_shape_functions.o ${SHARED}/define_shape_functions.f90
+
+$O/read_value_parameters.o: ${SHARED}/read_value_parameters.f90
+	${F90} $(DEF_FFLAGS) -c -o $O/read_value_parameters.o ${SHARED}/read_value_parameters.f90
+
+$O/param_reader.o: ${SHARED}/param_reader.c
+	${CC} -c $(CFLAGS) -o $O/param_reader.o ${SHARED}/param_reader.c
 
diff --git a/src/shared/adj_seismogram.f90 b/src/auxiliaries/adj_seismogram.f90
similarity index 100%
rename from src/shared/adj_seismogram.f90
rename to src/auxiliaries/adj_seismogram.f90
diff --git a/src/shared/check_quality_external_mesh.f90 b/src/auxiliaries/check_quality_external_mesh.f90
similarity index 100%
rename from src/shared/check_quality_external_mesh.f90
rename to src/auxiliaries/check_quality_external_mesh.f90
diff --git a/src/shared/convolve_source_timefunction.f90 b/src/auxiliaries/convolve_source_timefunction.f90
similarity index 100%
rename from src/shared/convolve_source_timefunction.f90
rename to src/auxiliaries/convolve_source_timefunction.f90
diff --git a/src/meshfem2D/Makefile.in b/src/meshfem2D/Makefile.in
index 4ee40ff..8589bc0 100644
--- a/src/meshfem2D/Makefile.in
+++ b/src/meshfem2D/Makefile.in
@@ -1,4 +1,3 @@
-
 #========================================================================
 #
 #                   S P E C F E M 2 D  Version 7 . 0
@@ -80,7 +79,7 @@ S = .
 SETUP = ../../setup
 
 
-.PHONY: help clean default all check_quality_external_mesh xcheck_quality_external_mesh mesh meshfem2D xmeshfem2D
+.PHONY: help clean default all mesh meshfem2D xmeshfem2D
 
 ####
 #### targets
@@ -88,7 +87,6 @@ SETUP = ../../setup
 
 DEFAULT = \
 	xmeshfem2D \
-	xcheck_quality_external_mesh \
 	$(EMPTY_MACRO)
 
 OBJS_MESHFEM2D = \
@@ -113,7 +111,6 @@ all: default
 
 mesh : meshfem2D
 meshfem2D: xmeshfem2D
-check_quality_external_mesh: xcheck_quality_external_mesh
 
 @SCOTCH_INCLUDEDIR@/scotchf.h: scotch_library
 scotch_library:
@@ -128,7 +125,6 @@ endif
 clean:
 	-rm -rf $O/*.o $E/xmeshfem2D \
 	$O/*.il *.mod \
-	$E/xcheck_quality_external_mesh \
 	*.oo *.ipo
 
 
@@ -137,7 +133,6 @@ help:
 	@echo ""
 	@echo "supported executables:"
 	@echo "    xmeshfem2D"
-	@echo "    xcheck_quality_external_mesh"
 	@echo ""
 
 ##
@@ -148,16 +143,6 @@ $E/xmeshfem2D: $(OBJS_MESHFEM2D)
 	$(LINK) $(DEF_FFLAGS) -o ${E}/xmeshfem2D $(OBJS_MESHFEM2D) $(LIB)
 
 ##
-## check_quality_external_mesh
-##
-xcheck_quality_external_mesh: $E/xcheck_quality_external_mesh
-$E/xcheck_quality_external_mesh: $O/check_quality_external_mesh.o $O/read_value_parameters.o $O/param_reader.o $O/define_shape_functions.o
-	${F90} $(DEF_FFLAGS) -o ${E}/xcheck_quality_external_mesh $O/check_quality_external_mesh.o $O/read_value_parameters.o $O/param_reader.o $O/define_shape_functions.o
-
-$O/define_shape_functions.o: ${S}/../specfem2D/define_shape_functions.f90 ${SETUP}/constants.h
-	${F90} $(DEF_FFLAGS) -c -o $O/define_shape_functions.o ${S}/../specfem2D/define_shape_functions.f90
-
-##
 ## object files
 ##
 
@@ -203,13 +188,6 @@ $O/spline_routines.o: ${S}/spline_routines.f90 ${SETUP}/constants.h
 	${F90} $(DEF_FFLAGS) -c -o $O/spline_routines.o ${S}/spline_routines.f90
 
 ##
-## check_quality_external_mesh
-##
-
-$O/check_quality_external_mesh.o: ${SHARED}/check_quality_external_mesh.f90
-	${F90} $(DEF_FFLAGS) -c -o $O/check_quality_external_mesh.o ${SHARED}/check_quality_external_mesh.f90
-
-##
 ## shared
 ##
 $O/read_value_parameters.o: ${SHARED}/read_value_parameters.f90
diff --git a/src/specfem2D/define_shape_functions.f90 b/src/shared/define_shape_functions.f90
similarity index 100%
rename from src/specfem2D/define_shape_functions.f90
rename to src/shared/define_shape_functions.f90
diff --git a/src/specfem2D/Makefile.in b/src/specfem2D/Makefile.in
index bb18eda..151fb1c 100644
--- a/src/specfem2D/Makefile.in
+++ b/src/specfem2D/Makefile.in
@@ -1,4 +1,3 @@
-
 #========================================================================
 #
 #                   S P E C F E M 2 D  Version 7 . 0
@@ -82,7 +81,7 @@ SETUP = ../../setup
 
 LIBJPEG = ./libjpeg
 
-.PHONY: help clean default all xadj_seismogram convolve_source_timefunction xconvolve_source_timefunction spec specfem2D xspecfem2D
+.PHONY: help clean default all spec specfem2D xspecfem2D
 
 ####
 #### targets
@@ -90,7 +89,6 @@ LIBJPEG = ./libjpeg
 
 DEFAULT = \
 	xspecfem2D \
-	xconvolve_source_timefunction \
 	$(EMPTY_MACRO)
 
 
@@ -184,13 +182,11 @@ all: default
 
 spec : specfem2D
 specfem2D: xspecfem2D
-convolve_source_timefunction: xconvolve_source_timefunction
 
 
 clean:
 	-rm -rf $O/*.o $E/xspecfem2D \
 	$O/*.o $O/*.il *.mod \
-	$E/xconvolve_source_timefunction \
 	*.oo *.ipo
 
 
@@ -199,8 +195,6 @@ help:
 	@echo ""
 	@echo "supported executables:"
 	@echo "    xspecfem2D"
-	@echo "    xconvolve_source_timefunction"
-	@echo "    xadj_seismogram"
 	@echo ""
 
 
@@ -211,37 +205,6 @@ xspecfem2D: $E/xspecfem2D
 $E/xspecfem2D: $(OBJS_SPECFEM2D)
 	$(LINK) $(DEF_FFLAGS) -o ${E}/xspecfem2D $(OBJS_SPECFEM2D)
 
-##
-## convolve_source_timefunction
-##
-xconvolve_source_timefunction: $E/xconvolve_source_timefunction
-$E/xconvolve_source_timefunction: $O/convolve_source_timefunction.o
-	${F90} $(DEF_FFLAGS) -o ${E}/xconvolve_source_timefunction $O/convolve_source_timefunction.o
-
-##
-## adj_seismogram
-##
-xadj_seismogram: $E/xadj_seismogram
-$E/xadj_seismogram: $O/adj_seismogram.o
-	${F90} $(DEF_FFLAGS) -o ${E}/xadj_seismogram $O/adj_seismogram.o
-
-
-##
-## object files
-##
-
-##
-## convolve_source_timefunction
-##
-$O/convolve_source_timefunction.o: ${SHARED}/convolve_source_timefunction.f90
-	${F90} $(DEF_FFLAGS) -c -o $O/convolve_source_timefunction.o ${SHARED}/convolve_source_timefunction.f90
-
-##
-## adj_seismogram
-##
-$O/adj_seismogram.o: ${SHARED}/adj_seismogram.f90
-	${F90} $(DEF_FFLAGS) -c -o $O/adj_seismogram.o ${SHARED}/adj_seismogram.f90
-
 
 ###
 ### Module dependencies
@@ -303,6 +266,11 @@ $O/construct_acoustic_surfaces.o: $O/specfem2D_par.o
 $O/get_global.o: $O/specfem2D_par.o
 $O/recompute_jacobian.o: $O/specfem2D_par.o
 
+
+##
+## object files
+##
+
 ##
 ## specfem2D
 ##
@@ -369,9 +337,6 @@ $O/define_derivation_matrices.o: ${S}/define_derivation_matrices.f90 ${SETUP}/co
 $O/define_external_model.o: ${S}/define_external_model.f90 ${SETUP}/constants.h
 	${F90} $(DEF_FFLAGS) -c -o $O/define_external_model.o ${S}/define_external_model.f90
 
-$O/define_shape_functions.o: ${S}/define_shape_functions.f90 ${SETUP}/constants.h
-	${F90} $(DEF_FFLAGS) -c -o $O/define_shape_functions.o ${S}/define_shape_functions.f90
-
 $O/exit_mpi.o: ${S}/exit_mpi.F90 ${SETUP}/constants.h
 	${F90} $(DEF_FFLAGS) -c -o $O/exit_mpi.o ${S}/exit_mpi.F90
 
@@ -539,6 +504,9 @@ $O/specfem2D.o: ${S}/specfem2D.F90 ${SETUP}/constants.h
 ## shared
 ##
 
+$O/define_shape_functions.o: ${SHARED}/define_shape_functions.f90 ${SETUP}/constants.h
+	${F90} $(DEF_FFLAGS) -c -o $O/define_shape_functions.o ${SHARED}/define_shape_functions.f90
+
 $O/jaricom.o: ${LIBJPEG}/jaricom.c
 	${CC} -c $(CFLAGS) -I${LIBJPEG} -o $O/jaricom.o ${LIBJPEG}/jaricom.c
 



More information about the CIG-COMMITS mailing list