2009-09-25 00:33:23 +08:00
|
|
|
SHELL = /bin/sh
|
|
|
|
|
2013-05-31 01:30:35 +08:00
|
|
|
# which file will be copied to Makefile.lammps
|
|
|
|
|
|
|
|
EXTRAMAKE = Makefile.lammps.installed
|
|
|
|
|
2009-09-25 00:33:23 +08:00
|
|
|
# ------ FILES ------
|
2013-08-08 23:34:04 +08:00
|
|
|
SRC = $(wildcard *.cpp)
|
|
|
|
INC = $(wildcard *.h)
|
2009-09-25 00:33:23 +08:00
|
|
|
|
|
|
|
# ------ DEFINITIONS ------
|
|
|
|
|
|
|
|
LIB = libatc.a
|
|
|
|
OBJ = $(SRC:.cpp=.o)
|
|
|
|
|
|
|
|
# ------ SETTINGS ------
|
|
|
|
|
|
|
|
# include any MPI settings needed for the ATC library to build with
|
2013-05-31 03:19:20 +08:00
|
|
|
# must be the same MPI library that LAMMPS is built with
|
2009-09-25 00:33:23 +08:00
|
|
|
|
|
|
|
CC = icc
|
2012-08-14 22:16:08 +08:00
|
|
|
CCFLAGS = -O -g -fPIC -I../../src -DMPICH_IGNORE_CXX_SEEK
|
2009-09-25 00:33:23 +08:00
|
|
|
ARCHIVE = ar
|
|
|
|
ARCHFLAG = -rc
|
|
|
|
DEPFLAGS = -M
|
|
|
|
LINK = icc
|
|
|
|
LINKFLAGS = -O
|
|
|
|
USRLIB =
|
|
|
|
SYSLIB =
|
|
|
|
|
|
|
|
# ------ MAKE PROCEDURE ------
|
|
|
|
|
|
|
|
lib: $(OBJ)
|
|
|
|
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
|
2013-05-31 03:19:50 +08:00
|
|
|
@cp $(EXTRAMAKE) Makefile.lammps
|
2009-09-25 00:33:23 +08:00
|
|
|
|
|
|
|
# ------ COMPILE RULES ------
|
|
|
|
|
|
|
|
%.o:%.cpp
|
|
|
|
$(CC) $(CCFLAGS) -c $<
|
|
|
|
%.d:%.cpp
|
|
|
|
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
|
|
|
|
|
|
|
|
# ------ DEPENDENCIES ------
|
|
|
|
|
|
|
|
DEPENDS = $(OBJ:.o=.d)
|
|
|
|
|
|
|
|
# ------ CLEAN ------
|
|
|
|
|
|
|
|
clean:
|
2016-09-09 04:20:32 +08:00
|
|
|
-rm *.o *.d *~ $(LIB)
|