forked from nirmaljp6/IB_Parallel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·61 lines (46 loc) · 1.8 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
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
50
51
52
53
54
55
56
57
58
59
60
61
PETSC_ARCH=arch-linux-c-opt
PETSC_DIR=/petsc
include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules
FFILES = parameters myfft comm grid user variables fsinterface operators_struct operators_fluid timestepper operators_pressure main
MFILES = getdata makeplot make_control001 plotcontrol
IBFILES = ${FFILES:=.o}
#FC = mpif90
#FLAGS1 = -I/usr/local/fftw/3.3.8/intel-18.0/mvapich2-2.3/include
#FLAGS2 = -L/usr/local/fftw/3.3.8/intel-18.0/mvapich2-2.3/lib -lfftw3_mpi -lfftw3
#FLAGS1 = -I/usr/local/fftw/3.3.8/intel-18.0/openmpi-3.1.1/include#-I/usr/local/fftw/3.3.8/intel-18.0/mvapich2-2.3/include
#FLAGS2 = -L/usr/local/fftw/lib -lfftw3_mpi -lfftw3#-L/usr/local/fftw/3.3.8/intel-18.0/mvapich2-2.3/lib -lfftw3_mpi -lfftw3
BASE = /home/nirmal/Studies/Thesis_PhD/Codes/IB_Parallel
SRC = src
OBJ = obj
BIN = bin
OUT = output
IN = input
DIR = ${SRC} ${OBJ} ${BIN} ${OUT} ${IN}
DIRS = ${DIR:=.dir}
IBFILES_SRC := $(foreach p, $(IBFILES), $(SRC)/$(p))
IBFILES_OBJ := $(foreach p, $(IBFILES), $(OBJ)/$(p))
ib : ${IBFILES_OBJ}
-${FLINKER} -o $(BIN)/ib $(IBFILES_OBJ) ${PETSC_LIB}
setup: ${DIRS}
@for i in ${DIR} ; do \
mkdir -p $${i} ;\
done
@for i in ${FFILES} ; do \
echo "cp -p ${BASE}/${SRC}/$${i}.f90 ${SRC}/$${i}.f90 " ;\
cp -p ${BASE}/${SRC}/$${i}.f90 ${SRC}/$${i}.f90 ;\
done
@for i in ${MFILES} ; do \
echo "cp -p ${BASE}/${OUT}/$${i}.m ${OUT}/$${i}.m " ;\
cp -p ${BASE}/${OUT}/$${i}.m ${OUT}/$${i}.m ;\
done
realclean: ${DIRS} #
@for i in ${DIR} ; do \
rm -rf $${i} ;\
done
clean ::
rm -f $(BIN)/ib ${OBJ}/*.o ${OBJ}/*.mod *.mod
$(OBJ)/%.o: $(SRC)/%.F90
${PETSC_MAKE_STOP_ON_ERROR}${FC} -c ${FC_FLAGS} ${FFLAGS} ${FCPPFLAGS} -o $@ $< $(FC_MODULE_OUTPUT_FLAG)$(OBJ)
%.dir :
$<