Skip to content

Commit

Permalink
BLD: Move extra programs into auxiliaries directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Elliott Sales de Andrade committed Jan 6, 2015
1 parent a7da646 commit d7babb2
Show file tree
Hide file tree
Showing 11 changed files with 198 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config.status
./Makefile
src/meshfem2D/Makefile
src/specfem2D/Makefile
src/auxiliaries/Makefile

setup/config.h
setup/constants.h
Expand Down
16 changes: 8 additions & 8 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,30 +70,30 @@ adj_seismogram: xadj_seismogram
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:
Expand Down
25 changes: 14 additions & 11 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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 [email protected]
$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 [email protected] 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
Expand Down Expand Up @@ -1389,15 +1390,15 @@ 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]
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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" ;;
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
164 changes: 164 additions & 0 deletions src/auxiliaries/Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
#========================================================================
#
# S P E C F E M 2 D Version 7 . 0
# --------------------------------
#
# Main historical authors: Dimitri Komatitsch and Jeroen Tromp
# Princeton University, USA
# and CNRS / University of Marseille, France
# (there are currently many more authors!)
# (c) Princeton University and CNRS / University of Marseille, April 2014
#
# This software is a computer program whose purpose is to solve
# the two-dimensional viscoelastic anisotropic or poroelastic wave equation
# using a spectral-element method (SEM).
#
# This software is governed by the CeCILL license under French law and
# abiding by the rules of distribution of free software. You can use,
# modify and/or redistribute the software under the terms of the CeCILL
# license as circulated by CEA, CNRS and Inria at the following URL
# "http://www.cecill.info".
#
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided only
# with a limited warranty and the software's author, the holder of the
# economic rights, and the successive licensors have only limited
# liability.
#
# In this respect, the user's attention is drawn to the risks associated
# with loading, using, modifying and/or developing or reproducing the
# software by the user in light of its specific status of free software,
# that may mean that it is complicated to manipulate, and that also
# therefore means that it is reserved for developers and experienced
# professionals having in-depth computer knowledge. Users are therefore
# encouraged to load and test the software's suitability as regards their
# requirements in conditions enabling the security of their systems and/or
# data to be ensured and, more generally, to use and operate it in the
# same conditions as regards security.
#
# The full text of the license is available in file "LICENSE".
#
#========================================================================

# @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
@COND_MPI_TRUE@F90 = $(MPIFC) $(FCFLAGS) @FC_DEFINE@USE_MPI $(MPILIBS)
@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 = \
xadj_seismogram \
xcheck_quality_external_mesh \
xconvolve_source_timefunction \
$(EMPTY_MACRO)

default: $(DEFAULT)

all: default

check_quality_external_mesh: xcheck_quality_external_mesh
convolve_source_timefunction: xconvolve_source_timefunction


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: $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

##
## 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
##

$O/adj_seismogram.o: $S/adj_seismogram.f90
${F90} $(DEF_FFLAGS) -c -o $O/adj_seismogram.o $S/adj_seismogram.f90

$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

$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

##
## 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

File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 1 addition & 23 deletions src/meshfem2D/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#========================================================================
#
# S P E C F E M 2 D Version 7 . 0
Expand Down Expand Up @@ -80,15 +79,14 @@ 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
####

DEFAULT = \
xmeshfem2D \
xcheck_quality_external_mesh \
$(EMPTY_MACRO)

OBJS_MESHFEM2D = \
Expand All @@ -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:
Expand All @@ -128,7 +125,6 @@ endif
clean:
-rm -rf $O/*.o $E/xmeshfem2D \
$O/*.il *.mod \
$E/xcheck_quality_external_mesh \
*.oo *.ipo


Expand All @@ -137,7 +133,6 @@ help:
@echo ""
@echo "supported executables:"
@echo " xmeshfem2D"
@echo " xcheck_quality_external_mesh"
@echo ""

##
Expand All @@ -147,16 +142,6 @@ xmeshfem2D: $E/xmeshfem2D
$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
##
Expand Down Expand Up @@ -202,13 +187,6 @@ $O/save_stations_file.o: ${S}/save_stations_file.f90
$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
##
Expand Down
File renamed without changes.
Loading

0 comments on commit d7babb2

Please sign in to comment.