-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
69 lines (46 loc) · 2.69 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
62
63
64
65
66
67
68
69
include ${ITENSOR}/options.mk
ITENSOR_LIBDIR=${ITENSOR}/lib
PREFIX=${ITENSOR}
TENSOR_HEADERS=$(PREFIX)/itensor/all.h
CCFLAGS= -I. -I./include $(ITENSOR_INCLUDEFLAGS) $(CPPFLAGS) $(OPTIMIZATIONS) -Wno-unused-variable -fconcepts
CCGFLAGS= -I. -I./include $(ITENSOR_INCLUDEFLAGS) $(DEBUGFLAGS) -Wno-unused-variable -fconcepts
LIBFLAGS=-L'$(ITENSOR_LIBDIR)' $(ITENSOR_LIBFLAGS) -lhdf5 -ltbb $(myRPATH)
LIBGFLAGS=-L'$(ITENSOR_LIBDIR)' $(ITENSOR_LIBGFLAGS) -lhdf5 -ltbb -Wl,-rpath,$(myRPATH)
MPOFILES = $(wildcard SC_BathMPO*.h)
#Rules ------------------
%.o: %.cc $(ITENSOR_LIBS) $(TENSOR_HEADERS) FindGS.h
$(CCCOM) -c $(CCFLAGS) -o $@ $<
FindGS.o: FindGS.cc FindGS.h $(ITENSOR_LIBS) $(TENSOR_HEADERS) $(MPOFILES)
$(CCCOM) -c $(CCFLAGS) -o $@ $<
.debug_objs/%.o: %.cc $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
$(CCCOM) -c $(CCGFLAGS) -o $@ $<
# calcGS targets -----------------
calcGS: calcGS.o FindGS.o $(ITENSOR_LIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCFLAGS) calcGS.o FindGS.o -o calcGS $(LIBFLAGS)
calcGS-g: mkdebugdir .debug_objs/calcGS.o .debug_objs/FindGS.o $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCGFLAGS) .debug_objs/calcGS.o .debug_objs/FindGS.o -o calcGS-g $(LIBGFLAGS)
# calcOverlap targets -----------------
calcOverlap: calcOverlap.o FindGS.o $(ITENSOR_LIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCFLAGS) calcOverlap.o FindGS.o -o calcOverlap $(LIBFLAGS)
calcOverlap-g: mkdebugdir .debug_objs/calcOverlap.o .debug_objs/FindGS.o $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCGFLAGS) .debug_objs/calcOverlap.o .debug_objs/FindGS.o -o calcOverlap-g $(LIBGFLAGS)
# calcEnergy targets -----------------
calcEnergy: calcEnergy.o FindGS.o $(ITENSOR_LIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCFLAGS) calcEnergy.o FindGS.o -o calcEnergy $(LIBFLAGS)
calcEnergy-g: mkdebugdir .debug_objs/calcEnergy.o .debug_objs/FindGS.o $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCGFLAGS) .debug_objs/calcEnergy.o .debug_objs/FindGS.o -o calcEnergy-g $(LIBGFLAGS)
# MF_selfConsistent_calcGS targets -----------------
MF_selfConsistent_calcGS: MF_selfConsistent_calcGS.o FindGS.o $(ITENSOR_LIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCFLAGS) MF_selfConsistent_calcGS.o FindGS.o -o MF_selfConsistent_calcGS $(LIBFLAGS)
MF_selfConsistent_calcGS-g: mkdebugdir .debug_objs/MF_selfConsistent_calcGS.o .debug_objs/FindGS.o $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCGFLAGS) .debug_objs/MF_selfConsistent_calcGS.o .debug_objs/FindGS.o -o MF_selfConsistent_calcGS-g $(LIBGFLAGS)
buildGS: calcGS
buildOverlap: calcOverlap
buildEnergy: calcEnergy
buildMF_selfConsistent_calcGS: MF_selfConsistent_calcGS
build: calcGS calcOverlap calcEnergy MF_selfConsistent_calcGS
debug: calcGS-g
clean:
rm -v *.o calcGS calcPT calcOverlap
mkdebugdir:
mkdir -p .debug_objs