Makefile 3.11 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)

tilman.metz's avatar
tilman.metz committed
11
MODEL_SCR = hh_toy_true.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.metz's avatar
tilman.metz 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.metz's avatar
tilman.metz committed
58 59
	json_parser.c \
	read_par_json.c \
Simone Butzer's avatar
Simone Butzer committed
60 61 62 63 64 65
	readdsk.c \
	writedsk.c \
	util.c 
	
PARTMODEL_SCR = \
	part_model.c \
tilman.metz's avatar
tilman.metz committed
66
	read_par_json.c \
Simone Butzer's avatar
Simone Butzer committed
67 68 69
	util.c 	


70
IFOS_UTIL = \
Simone Butzer's avatar
Simone Butzer committed
71 72 73 74 75 76 77 78 79 80 81 82
		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 \
tilman.metz's avatar
tilman.metz committed
83 84
		json_parser.c \
		read_par_json.c \
Simone Butzer's avatar
Simone Butzer committed
85 86 87 88 89 90 91 92 93 94 95 96 97
		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 \

98
IFOS_SRC = \
Simone Butzer's avatar
Simone Butzer committed
99 100 101 102 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
		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) \
145
		$(IFOS_UTIL) 
Simone Butzer's avatar
Simone Butzer committed
146 147 148
# model_gauss.c \


149 150
IFOS_OBJ = $(IFOS_SRC:%.c=%.o)
IFOS_OBJ_RSG = $(IFOS_SRC_RSG:%.c=%.o)
Simone Butzer's avatar
Simone Butzer committed
151 152 153 154 155 156 157 158 159
# 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.metz's avatar
tilman.metz committed
160
	$(CC)  $(SFLAGS) $(SNAPMERGE_OBJ) -o ../bin/snapmerge $(LFLAGS)
Simone Butzer's avatar
Simone Butzer committed
161 162 163 164
		
# part_model:	$(PARTMODEL_OBJ)
#	$(CC) $(LFLAGS) $(PARTMODEL_OBJ) -o ../bin/partmodel

165 166
ifos3d: $(IFOS_OBJ)
	$(CC)   $(SFLAGS) $(IFOS_OBJ) $(LFLAGS) -o ../bin/ifos3d
Simone Butzer's avatar
Simone Butzer committed
167 168 169 170 171 172 173


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