-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (35 loc) · 846 Bytes
/
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
# Makefile for MD with DNN forces via LAMMPS <-> tensorflow coupling
#
# @2017, Jon Belof and Will Lowe
SHELL = /bin/sh
# System-specific settings
LAMMPS = /users/jbelof/lammps-31Mar17.DNN
CC = mpicxx
CCFLAGS = -g -O -I./lammps.library
DEPFLAGS = -M
LINK = mpicxx
LINKFLAGS = -g -O -L./lammps.library -L${LAMMPS}/src -L/users/jbelof/FFTW/lib
USRLIB = -lcouple -llammps_mpi
SYSLIB = -lfftw -lmpi -lpthread
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size
# Files
EXE = lmpdnn
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
OBJ = $(SRC:.cpp=.o)
# Targets
$(EXE): $(OBJ)
$(LINK) $(LINKFLAGS) $(OBJ) $(USRLIB) $(SYSLIB) -o $(EXE)
$(SIZE) $(EXE)
clean:
rm -f $(EXE) *.o
# Compilation rules
%.o:%.cpp
$(CC) $(CCFLAGS) -c $<
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# Individual dependencies
DEPENDS = $(OBJ:.o=.d)
include $(DEPENDS)