diff --git a/utils/lib/Makefile b/utils/lib/Makefile index dac6a7375..cf78e808a 100644 --- a/utils/lib/Makefile +++ b/utils/lib/Makefile @@ -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 @@ -20,11 +25,25 @@ 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 @@ -32,7 +51,7 @@ $(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 diff --git a/utils/lib/convolve_stf.c b/utils/lib/convolve_stf.c index cbd4fcd30..89aad5546 100644 --- a/utils/lib/convolve_stf.c +++ b/utils/lib/convolve_stf.c @@ -25,7 +25,12 @@ #include #include #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 */ diff --git a/utils/seis_process/process_syn.pl b/utils/seis_process/process_syn.pl index 358dfdfa7..6169634bf 100755 --- a/utils/seis_process/process_syn.pl +++ b/utils/seis_process/process_syn.pl @@ -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