diff --git a/lib/atc/Makefile.clang b/lib/atc/Makefile.clang new file mode 100644 index 000000000..e4426bdcf --- /dev/null +++ b/lib/atc/Makefile.clang @@ -0,0 +1,54 @@ +SHELL = /bin/sh + +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.installed + +# ------ FILES ------ +SRC = $(wildcard *.cpp) +INC = $(wildcard *.h) + +# ------ DEFINITIONS ------ + +LIB = libatc.a +OBJ = $(SRC:.cpp=.o) + +# ------ SETTINGS ------ + +# include any MPI settings needed for the ATC library to build with +# must be the same MPI library that LAMMPS is built with + +CC = env OMPI_CC=clang OMPI_CXX=clang++ mpic++ $(OPENMP) +CCFLAGS = -O3 -fomit-frame-pointer -I../../src -DOMPI_SKIP_MPICXX=1 \ + -march=native -ffast-math -g -fstrict-aliasing \ + -Wall -W -Wextra -DMPICH_IGNORE_CXX_SEEK \ + -Wno-unused-parameter -Wno-sometimes-uninitialized -Wno-sign-compare +ARCHIVE = ar +ARCHFLAG = -rc +DEPFLAGS = -M +LINK = $(CC) +LINKFLAGS = -O +USRLIB = +SYSLIB = + +# ------ MAKE PROCEDURE ------ + +lib: $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + @cp $(EXTRAMAKE) 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)