forked from lijiext/lammps
30 lines
686 B
Makefile
30 lines
686 B
Makefile
SHELL = /bin/sh
|
|
# ------ FILES ------
|
|
SRC = $(wildcard *.cpp)
|
|
INC = $(wildcard *.h)
|
|
# ------ DEFINITIONS ------
|
|
LIB = libatc.a
|
|
OBJ = $(SRC:.cpp=.o)
|
|
# ------ SETTINGS ------
|
|
CC = mpic++
|
|
CCFLAGS = -O -g -I../../src -fPIC -DMPICH_IGNORE_CXX_SEEK
|
|
ARCHIVE = ar
|
|
ARCHFLAG = -rc
|
|
DEPFLAGS = -M
|
|
LINK = ${CC}
|
|
LINKFLAGS = -O
|
|
# ------ MAKE PROCEDURE ------
|
|
lib: $(OBJ)
|
|
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
|
|
@cp Makefile.lammps.installed Makefile.lammps
|
|
# ------ COMPILE RULES ------
|
|
%.o:%.cpp
|
|
$(CC) $(CCFLAGS) -c $<
|
|
%.d:%.cpp
|
|
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
|
|
# ------ DEPENDENCIES ------
|
|
DEPENDS = $(OBJ:.o=.d)
|
|
# ------ CLEAN ------
|
|
clean:
|
|
@rm *.o *.d $(LIB)
|