-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
56 lines (39 loc) · 2.02 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
#The following lines are for gfortran compilation with MKL libraries
FXX = gfortran -o2 -ffast-math -ffree-line-length-none -m64 #-fbacktrace
CXX = g++ -o2
MKLROOT = /opt/app1/intel/oneapi/mkl/2024.1/
BLAS = -m64 -L${MKLROOT}/lib -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl
INC = -I${MKLROOT}/include
LIB = ${BLAS}
#ifort commands(if -mkl does not work, try explicit links above)
#FXX = ifort -O2 -axCORE-AVX2 -parallel -fPIC -mkl:parallel -static-intel -qopenmp-link static
#CXX = g++
CWD = $(shell pwd)
OBJ = $(CWD)/Object
JMOD = $(CWD)/JunctionMod
EXEC = RUQT.x
main: $(EXEC) junctionmod
$(EXEC): RUQT.f90 ${OBJ}/TypeMod.o ${OBJ}/InterfaceMod.o ${OBJ}/Build_G_SD_Invert.o ${OBJ}/Build_B0_CISD.o
$(FXX) ${INC} ${LIB} RUQT.f90 ${OBJ}/TypeMod.o ${OBJ}/InterfaceMod.o ${OBJ}/Build_G_SD_Invert.o ${OBJ}/Build_B0_CISD.o -o ${EXEC}
junctionmod: ${OBJ}/main.o ${OBJ}/molecule.o ${OBJ}/transform.o ${OBJ}/electrode.o ${OBJ}/job.o
$(CXX) -o junctionmod ${OBJ}/main.o ${OBJ}/molecule.o ${OBJ}/transform.o ${OBJ}/electrode.o ${OBJ}/job.o
${OBJ}/main.o : ${JMOD}/main.cpp
$(CXX) -c ${JMOD}/main.cpp -o ${OBJ}/main.o
${OBJ}/molecule.o : ${JMOD}/molecule.cpp ${JMOD}/molecule.h
$(CXX) -c ${JMOD}/molecule.cpp -o ${OBJ}/molecule.o
${OBJ}/transform.o : ${JMOD}/transform.cpp ${JMOD}/transform.h
$(CXX) -c ${JMOD}/transform.cpp -o ${OBJ}/transform.o
${OBJ}/electrode.o : ${JMOD}/electrode.cpp ${JMOD}/electrode.h
$(CXX) -c ${JMOD}/electrode.cpp -o ${OBJ}/electrode.o
${OBJ}/job.o : ${JMOD}/job.cpp ${JMOD}/job.h
$(CXX) -c ${JMOD}/job.cpp -o ${OBJ}/job.o
${OBJ}/TypeMod.o: TypeMod.f90
$(FXX) -c TypeMod.f90 -o ${OBJ}/TypeMod.o
${OBJ}/InterfaceMod.o: InterfaceMod.f90
$(FXX) -c InterfaceMod.f90 -o ${OBJ}/InterfaceMod.o
${OBJ}/Build_G_SD_Invert.o: Build_G_SD_Invert.f90
$(FXX) -c Build_G_SD_Invert.f90 -o ${OBJ}/Build_G_SD_Invert.o
${OBJ}/Build_B0_CISD.o: Build_B0_CISD.f90
$(FXX) -c Build_B0_CISD.f90 -o ${OBJ}/Build_B0_CISD.o
clean:
rm $(OBJ)/*.o; rm *.mod