Makefile 3.16 KB
Newer Older
Simone Butzer's avatar
Simone Butzer committed
1 2 3 4 5 6 7 8 9 10
# Makefile for IFOS3D

#--------------------------------------------------------
# edit here:

# source code for model generation (acoustic)
# MODEL_SCR_A = hh_acoustic.c

# source code for model generation (elastic)

11
MODEL_SCR = hh_toy.c
Simone Butzer's avatar
Simone Butzer committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

# Compiler (LAM: CC=hcc, CRAY T3E: CC=cc, SHARCNet: mpicc)

# ON Linux cluster running LAM
CC=mpicc
LFLAGS=-lm -lmpi -lcseife
CFLAGS=-Wall -O4
SFLAGS=-L./../libcseife 
IFLAGS=-I./../libcseife

#Hermit
#CC=cc
#LFLAGS=-lm -lcseife
#CFLAGS=-O3
#SFLAGS=-L./../libcseife 
#IFLAGS=-I./../libcseife

# Juropa
#CC=mpicc
#LFLAGS=-lm -lcseife
#CFLAGS=-Wall -O4 -ipo
#SFLAGS=-L./../libcseife 
#IFLAGS=-I./../libcseife

# Jureka
#CC=mpiicc
#LFLAGS=-lm -lcseife
#CFLAGS=-w -xhost -fast -ipo -pipe
#SFLAGS=-L./../libcseife 
#IFLAGS=-I./../libcseife


# after this line, no further editing should be necessary
# --------------------------------------------------------

.c.o:
	$(CC) -c  $(CFLAGS) $< $(IFLAGS)

Tilman Steinweg's avatar
Tilman Steinweg committed
50
SNAPMERGE_OBJ = $(SNAPMERGE_SCR:%.c=%.o)
Simone Butzer's avatar
Simone Butzer committed
51 52 53 54 55 56 57

SEISMERGE_SCR = seismerge.c


SNAPMERGE_SCR = \
	snapmerge.c \
	merge.c \
Tilman Steinweg's avatar
Tilman Steinweg committed
58
	json_parser.c \
Simone Butzer's avatar
Simone Butzer committed
59
	read_par.c \
Tilman Steinweg's avatar
Tilman Steinweg committed
60
	read_par_json.c \
Simone Butzer's avatar
Simone Butzer committed
61 62 63 64 65 66 67
	readdsk.c \
	writedsk.c \
	util.c 
	
PARTMODEL_SCR = \
	part_model.c \
	read_par.c \
Tilman Steinweg's avatar
Tilman Steinweg committed
68
	read_par_json.c \
Simone Butzer's avatar
Simone Butzer committed
69 70 71
	util.c 	


72
IFOS_UTIL = \
Simone Butzer's avatar
Simone Butzer committed
73 74 75 76 77 78 79 80 81 82 83 84 85
		absorb.c \
		av_mat.c \
		comm_ini.c \
		info.c \
		initproc.c \
		merge.c \
		mergemod.c \
		note.c \
		outseis.c \
		output_source_signal.c \
		rd_sour.c \
		readdsk.c \
		read_par.c \
Tilman Steinweg's avatar
Tilman Steinweg committed
86 87
		json_parser.c \
		read_par_json.c \
Simone Butzer's avatar
Simone Butzer committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101
		exchange_par.c \
		receiver.c \
		readmod.c \
		saveseis.c \
		sources.c \
		splitrec.c \
		splitsrc.c \
		util.c \
		wavelet.c \
		writedsk.c \
		writemod.c \
		writepar.c \
		rwsegy.c \

102
IFOS_SRC = \
Simone Butzer's avatar
Simone Butzer committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
		ifos3d.c \
		comm_ini_s.c \
		checkfd_ssg.c \
		CPML_coeff.c \
		CPML_ini_elastic.c\
		seismo_ssg.c \
		matcopy.c \
		surface_ssg.c \
		surface_ssg_elastic.c\
		update_s_ssg.c \
		update_s_ssg_CPML.c \
		update_s_ssg_elastic.c \
		update_s_ssg_CPML_elastic.c \
		update_v_ssg.c \
		update_v_ssg_CPML.c \
		snap_ssg.c \
		exchange_v.c \
		exchange_s.c \
		psource.c \
		readseis.c \
		readseis_split.c \
		residual.c \
		zero_wavefield.c \
		gradient_F.c \
		conjugategrad.c \
		hess_F.c \
		readhess.c \
		modelupdate.c \
		zero_invers.c \
		zero_grad.c \
		precongrad.c \
		hess_apply.c \
		outgrad.c \
		outmod.c \
		steplength.c \
		cpmodel.c \
		readinv.c \
		disc_fourier.c \
		exchange_Fv.c \
		filt_seis.c \
		model2_5D.c \
		smooth.c \
		lbfgs.c \
		lbfgs_save.c \
		constant_boundary.c \
		$(MODEL_SCR) \
149
		$(IFOS_UTIL) 
Simone Butzer's avatar
Simone Butzer committed
150 151 152
# model_gauss.c \


153 154
IFOS_OBJ = $(IFOS_SRC:%.c=%.o)
IFOS_OBJ_RSG = $(IFOS_SRC_RSG:%.c=%.o)
Simone Butzer's avatar
Simone Butzer committed
155 156 157 158 159 160 161 162 163
# FDMPI_ACOUSTIC_OBJ = $(FDMPI_ACOUSTIC_SRC:%.c=%.o)
# SNAPMERGE_OBJ = $(SNAPMERGE_SCR:%.c=%.o)
# PARTMODEL_OBJ = $(PARTMODEL_SCR:%.c=%.o)
# SEISMERGE_OBJ = $(SEISMERGE_SCR:%.c=%.o)

seismerge:	$(SEISMERGE_OBJ)
	$(CC) $(LFLAGS) $(SEISMERGE_OBJ) -o ../bin/seismerge	

snapmerge:	$(SNAPMERGE_OBJ)
Tilman Steinweg's avatar
Tilman Steinweg committed
164
	$(CC)  $(SFLAGS) $(SNAPMERGE_OBJ) -o ../bin/snapmerge $(LFLAGS)
Simone Butzer's avatar
Simone Butzer committed
165 166 167 168
		
# part_model:	$(PARTMODEL_OBJ)
#	$(CC) $(LFLAGS) $(PARTMODEL_OBJ) -o ../bin/partmodel

169 170
ifos3d: $(IFOS_OBJ)
	$(CC)   $(SFLAGS) $(IFOS_OBJ) $(LFLAGS) -o ../bin/ifos3d
Simone Butzer's avatar
Simone Butzer committed
171 172 173 174 175 176 177


clean:
	find . -name "*.o" -exec rm {} \;
	find . -name "*.bck" -exec rm {} \;
	find . -name "core" -exec rm {} \;