-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
66 lines (48 loc) · 2 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
FC=mpif90
EXE = neqDMFT
DIREXE= $(HOME)/.bin
#=========================================================================
include lib.mk
#=========================================================================
.SUFFIXES: .f90
OBJS = CONTOUR_GF.o VARS_GLOBAL.o ELECTRIC_FIELD.o BATH.o EQUILIBRIUM.o IPT_NEQ.o FUNX_NEQ.o KADANOFBAYM.o
#=================STANDARD COMPILATION====================================
all: FLAG=$(STD)
ARGS=$(LIBDMFT) $(SFMODS) $(SFLIBS)
BRANCH= $(shell git rev-parse --abbrev-ref HEAD)
all: compile
#================OPTIMIZED COMPILATION====================================
opt: FLAG=$(OPT)
ARGS=$(LIBDMFT) $(SFMODS) $(SFLIBS)
BRANCH= $(shell git rev-parse --abbrev-ref HEAD)
opt: compile
#================DEBUGGIN COMPILATION=====================================
debug: FLAG=$(DEB)
ARGS=$(LIBDMFT_DEB) $(SFMODS_DEB) $(SFLIBS_DEB)
BRANCH= $(shell git rev-parse --abbrev-ref HEAD)
debug: compile
compile: version $(OBJS)
@echo " ..................... compile ........................... "
$(FC) $(FLAG) $(OBJS) $(EXE).f90 -o $(DIREXE)/$(EXE)_$(BRANCH) $(ARGS)
@echo " ...................... done .............................. "
@echo ""
@echo ""
@echo "created" $(DIREXE)/$(EXE)_$(BRANCH)
#==============DATA EXTRACTION======================================
data: FLAG=$(STD)
ARGS=$(LIBDMFT) $(SFMODS) $(SFLIBS) #$(DSL_MODS) $(DSL_LIBS)
BRANCH= $(shell git rev-parse --abbrev-ref HEAD)
data: version $(OBJS)
@echo " ........... compile: getdata ........... "
${FC} ${FLAG} $(OBJS) get_data_$(EXE).f90 -o ${DIREXE}/get_data_$(EXE)_$(BRANCH) $(ARGS)
@echo ""
@echo " ...................... done .............................. "
.f90.o:
$(FC) $(FLAG) -c $< $(SFMODS)
#=============CLEAN ALL===================================================
clean:
@echo "Cleaning:"
@rm -f *.mod *.o *~ revision.inc
#=========================================================================
include version.mk
#=========================================================================