Skip to content

Commit

Permalink
build: Remove unnecessary creation/deletion of directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
Elliott Sales de Andrade committed Jan 16, 2014
1 parent f3c4b21 commit 09910bd
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 49 deletions.
70 changes: 28 additions & 42 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ AR = ar
ARFLAGS = cru
RANLIB = ranlib

##.PHONY: clean default all generate_databases specfem3D meshfem3D

####
#### targets
####
Expand All @@ -78,8 +76,6 @@ all: default \
xcheck_mesh_quality_CUBIT_Abaqus \
$(EMPTY_MACRO)

required: bin lib obj

mesh : meshfem3D
gen : generate_databases
spec : specfem3D
Expand All @@ -99,69 +95,45 @@ sum_kernels: xsum_kernels
model_update: xmodel_update
check_mesh_quality_CUBIT_Abaqus: xcheck_mesh_quality_CUBIT_Abaqus

bin:
mkdir -p bin

lib:
mkdir -p lib

obj:
mkdir -p obj

reqmesh:
(cd obj; mkdir -p mesh)

reqspec:
(cd obj; mkdir -p spec)

reqdec:
(cd obj; mkdir -p dec)

reqgen :
(cd obj; mkdir -p gen)

reqche :
(cd obj; mkdir -p che)

xmeshfem3D: required reqmesh
xmeshfem3D:
$(MAKE) -C src/meshfem3D

xspecfem3D: required reqspec
xspecfem3D:
$(MAKE) -C src/specfem3D specfem3D

xgenerate_databases: required reqgen
xgenerate_databases:
$(MAKE) -C src/generate_databases generate_databases

xdecompose_mesh: required reqdec
xdecompose_mesh:
$(MAKE) -C src/decompose_mesh

xcreate_movie_shakemap_AVS_DX_GMT: required
xcreate_movie_shakemap_AVS_DX_GMT:
$(MAKE) -C src/specfem3D xcreate_movie_shakemap_AVS_DX_GMT

xcombine_vol_data: required reqspec
xcombine_vol_data:
$(MAKE) -C src/specfem3D xcombine_vol_data

xcombine_surf_data: required
xcombine_surf_data:
$(MAKE) -C src/specfem3D xcombine_surf_data

xconvolve_source_timefunction: required
xconvolve_source_timefunction:
$(MAKE) -C src/specfem3D xconvolve_source_timefunction

xsmooth_vol_data: required reqspec
xsmooth_vol_data:
$(MAKE) -C src/specfem3D xsmooth_vol_data

xsum_kernels: required reqspec
xsum_kernels:
$(MAKE) -C src/specfem3D xsum_kernels

xmodel_update: required reqspec xspecfem3D
xmodel_update: xspecfem3D
$(MAKE) -C src/specfem3D xmodel_update

xcheck_mesh_quality_CUBIT_Abaqus: required reqche
xcheck_mesh_quality_CUBIT_Abaqus:
$(MAKE) -C src/check_mesh_quality_CUBIT_Abaqus


clean: required
rm -rf bin lib obj src/meshfem3D/*.mod src/decompose_mesh/*.mod src/generate_databases/*.mod src/specfem3D/*.mod
clean:
rm -rf bin/* lib/* obj/*.o obj/*/*.o src/meshfem3D/*.mod src/decompose_mesh/*.mod src/generate_databases/*.mod src/specfem3D/*.mod
$(MAKE) -C src/decompose_mesh/scotch/src realclean

help:
Expand All @@ -183,3 +155,17 @@ help:
@echo " xcheck_mesh_quality_CUBIT_Abaqus"
@echo ""

.PHONY: clean help default all \
convolve_source_timefunction xconvolve_source_timefunction \
create_movie_shakemap_AVS_DX_GMT xcreate_movie_shakemap_AVS_DX_GMT \
combine_vol_data xcombine_vol_data \
combine_surf_data xcombine_surf_data \
smooth_vol_data xsmooth_vol_data \
sum_kernels xsum_kernels \
model_update xmodel_update \
check_mesh_quality_CUBIT_Abaqus xcheck_mesh_quality_CUBIT_Abaqus \
gen generate_databases xgenerate_databases \
dec decompose_mesh xdecompose_mesh \
mesh meshfem3D xmeshfem3D \
spec specfem3D xspecfem3D

Empty file added bin/.keep
Empty file.
Empty file added lib/.keep
Empty file.
Empty file added obj/.keep
Empty file.
Empty file added obj/che/.keep
Empty file.
Empty file added obj/dec/.keep
Empty file.
Empty file added obj/gen/.keep
Empty file.
Empty file added obj/mesh/.keep
Empty file.
Empty file added obj/spec/.keep
Empty file.
2 changes: 1 addition & 1 deletion src/check_mesh_quality_CUBIT_Abaqus/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ DEFAULT = xcheck_mesh_quality_CUBIT_Abaqus xconvert_skewness_to_angle xmultiply

default: $(DEFAULT)

all: clean default
all: default

check_mesh_quality_CUBIT_Abaqus: xcheck_mesh_quality_CUBIT_Abaqus
convert_skewness_to_angle: xconvert_skewness_to_angle
Expand Down
3 changes: 2 additions & 1 deletion src/decompose_mesh/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ DEFAULT = xscotch xdecompose_mesh

default: $(DEFAULT)

all: clean default
all: default

decompose_mesh: xdecompose_mesh

Expand Down Expand Up @@ -114,6 +114,7 @@ endif

clean:
rm -f $O/*.o *.mod $E/xdecompose_mesh

####
#### rule to build each .o file below
####
Expand Down
4 changes: 2 additions & 2 deletions src/generate_databases/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ LIBGENDATABASES = $L/libgendatabases.a

default: $(DEFAULT)

all: clean default
all: default

generate_databases: xgenerate_databases

Expand All @@ -197,7 +197,7 @@ generate_databases: xgenerate_databases


clean:
rm -f $O/* *.o *.gnu *.mod $(OUTPUT)/timestamp* $(OUTPUT)/starttime*txt work.pc* \
rm -f $O/* *.o *.gnu *.mod \
xgenerate_databases \
xconvolve_source_timefunction \
xcreate_movie_shakemap_AVS_DX_GMT xcombine_vol_data xcombine_surf_data
Expand Down
2 changes: 1 addition & 1 deletion src/meshfem3D/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ LIBMESHFEM = $(COND_PYRE_OBJECTS) $L/libmeshfem.a

default: $(DEFAULT)

all: clean default
all: default

meshfem3D: xmeshfem3D

Expand Down
4 changes: 2 additions & 2 deletions src/specfem3D/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ LIBSPECFEM = $L/libspecfem.a

default: $(DEFAULT)

all: clean default
all: default

specfem3D: xspecfem3D

Expand Down Expand Up @@ -407,7 +407,7 @@ xmodel_update: $(ADIOS_PREOBJECTS) $(MODEL_UPD_OBJECTS) $(COND_MPI_OBJECTS) $(CU
${FCLINK} -o ${E}/xmodel_update $(ADIOS_OBJECTS) $(MODEL_UPD_OBJECTS) $(ADIOS_PREOBJECTS) $(COND_MPI_OBJECTS) $(MPILIBS) $(CUDA_STUBS)

clean:
rm -f $O/* *.o *.gnu *.mod $(OUTPUT)/timestamp* $(OUTPUT)/starttime*txt work.pc* \
rm -f $O/* *.o *.gnu *.mod \
xspecfem3D \
xconvolve_source_timefunction \
xcreate_movie_shakemap_AVS_DX_GMT xcombine_vol_data xcombine_surf_data \
Expand Down

0 comments on commit 09910bd

Please sign in to comment.