Skip to content

Commit

Permalink
updates compilation of convolve_stf
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeter committed Jun 24, 2019
1 parent 47b6d33 commit b9a5889
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
27 changes: 23 additions & 4 deletions utils/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
F90 = gfortran
CC = gcc

#############################################################
# modify to point to your own SAC installation path
SAC_DIR = /opt/sac
SAC_INC = ${SAC_DIR}/include
SAC_LIB = ${SAC_DIR}/lib


#############################################################

F90FLAGS = -O2
CCFLAGS = -O2
Expand All @@ -20,19 +25,33 @@ COBJ = $(patsubst %,%.o,$(CSRC))
OBJ = $(F90OBJ) $(COBJ)


all : lib
all : lib convolve_stf

lib : $(OBJ)


#
# convolve_stf
#
CFLAGS = -I$(SAC_INC)
LIBS = -L$(SAC_LIB) -lsac -lsacio

convolve_stf: convolve_stf.c
$(CC) $(CFLAGS) -o convolve_stf convolve_stf.c $(LIBS)



#
# library routines
#
$(F90OBJ) : %.o : %.f90
$(F90) $(F90FLAGS) -c $*.f90

$(COBJ): %.o : %.c
$(CC) $(CCFLAGS) -c $*.c

clean:
\rm -f $(OBJS) *~ *.o
\rm -f $(OBJS) *~ *.o convolve_stf

cleanall:
\rm -f $(OBJS) *.o *~
\rm -f $(OBJS) *.o *~ convolve_stf
7 changes: 6 additions & 1 deletion utils/lib/convolve_stf.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
#include <errno.h>
#include <math.h>
#include "sacio.h"
#include "config.h"

//from: #include "config.h"
// 64-bit
// typedef long int sac_int_t;
// 32-bit
typedef int sac_int_t;


/* defined in libsac */
Expand Down
4 changes: 3 additions & 1 deletion utils/seis_process/process_syn.pl
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ END
$phtimes="./phtimes.csh";
$asc2sac="ascii2sac.csh";

#if (! -e $saclst) {die(" No $saclst file\n");}
#if (! -e $saclst) {die("No $saclst file\n");}
#if (! -e $phtimes) {die("No $phtimes file\n");}
#if (! -e $asc2sac) {die("No $asc2sac file\n");}



$min_hdur=1.0;

if ($opt_m) { # extract event information from CMTSOLUTION
Expand Down

0 comments on commit b9a5889

Please sign in to comment.