lammps/lib/atc/Makefile.serial

56 lines
1.0 KiB
Makefile
Raw Normal View History

# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
LIB = libatc.a
OBJ = $(SRC:.cpp=.o)
default: lib
# ------ SETTINGS ------
.PHONY: clean lib depend
# include any MPI settings needed for the ATC library to build with
# must be the same MPI library that LAMMPS is built with
CC = g++
CCFLAGS = -O3 -g -fPIC
CPPFLAGS = -I../../src -I../../src/STUBS
ARCHIVE = ar
ARCHFLAG = -rc
# ------ MAKE PROCEDURE ------
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
%.o:%.cpp
$(CC) $(CPPFLAGS) $(CCFLAGS) -c $<
# ------ DEPENDENCIES ------
depend .depend : fastdep.exe $(SRC)
@./fastdep.exe $(INCFLAGS) -- $^ > .depend || exit 1
fastdep.exe: ../../src/DEPEND/fastdep.c
@cc -O -o $@ $<
# ------ CLEAN ------
clean:
-rm -f *.o *~ .depend $(LIB) fastdep.exe
sinclude .depend