-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
97 lines (90 loc) · 2.1 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#----------------------------------------------------------
# !DO NOT EDIT THIS FILE!
#----------------------------------------------------------
# To set compile option create a 'Make.inc' file (or copy
# from the samples) in this directory and set compiler
# variables there.
include Make.inc
MF= Makefile src/globals.inc src/2DPMF.inc
WD=$(shell pwd)
SRCDIR:=src
OBJDIR:=build
SRCPATH=$(addprefix $(WD)/,$(SRCDIR))
SRCFILES=\
useful.f90 \
FileMod.f90 \
RDF_obj.f90 \
module_thermostat.f90 \
module_barostat.f90 \
module_gle.f90 \
module_f_env.f90 \
intmod.f90 \
trajavmod.f90 \
RPMDDFT.f90\
setup_positions.f90\
setup_ice.f90 \
setup_interface.f90 \
setup_options.f90 \
md_eq.f90 \
md_melt.f90 \
md_static.f90 \
md_dynamics.f90 \
md_pathi.f90 \
md_forces.f90 \
md_tools.f90 \
md_rattle.f90 \
evolve.f90 \
evolve_basic.f90 \
evolve_cl.f90 \
evolve_pi.f90 \
evolve_rigid.f90 \
evolve_cl_RPMDDFT.f90 \
evolve_pi_RPMDDFT.f90 \
evolve_pi_rc_RPMDDFT.f90 \
evolve_cl_pi_RPMDDFT.f90 \
random.f90 \
kinetic.f90 \
fourier.f90 \
io.f90 \
ljones.f90 \
epsr.f90 \
buckingham.f90 \
ewald_cubic.f90 \
ewald_noncubic.f90 \
ewald_smeared.f90 \
intra_harmonic.f90 \
intra_morse.f90 \
intra_morse_harm.f90 \
intra_spcfw.f90 \
ipi_driver.f90 \
linked_cell.f90 \
neigh_list.f90 \
correct_tem.f90 \
blas_lapack.f90 \
md_pressure.f90 \
e3b.f90 \
main.f90
SRC=$(addprefix $(SRCPATH)/,$(SRCFILES) sockets.c)
###############################
.PHONY: directories
OBJPATH=$(addprefix $(WD)/,$(OBJDIR))
OBJ= $(addprefix $(OBJPATH)/,$(SRCFILES:.f90=.o) sockets.o)
all: directories $(EXE)
@echo '----------------------'
@echo ' ***Build complete*** '
@echo '----------------------'
directories:
mkdir -p $(OBJPATH)
$(EXE): $(OBJ)
$(FC) $(LDFLAGS) $^ $(LIBS) -o $@
$(OBJPATH)/%.o: $(SRCPATH)/%.f90 $(MF)
$(FC) -c $(FCFLAGS) $(CPFLAGS) $(INCDIR) $< -J $(OBJPATH) -o $@
$(OBJPATH)/%.o: $(SRCPATH)/%.c $(MF)
$(CC) $(CCFLAGS) -c $< -o $@
zip:
zip $(EXE).zip $(MF) $(SRC)
tar:
tar cvf $(EXE).tar $(MF) $(SRC)
clean:
rm -rf $(EXE) $(OBJPATH)
@echo ***Cleanup complete***