Sherman-Morrison/Makefile

57 lines
1.7 KiB
Makefile
Raw Normal View History

2021-02-04 18:52:26 +01:00
## Used compilers
2021-02-16 10:49:15 +01:00
H5CXX = h5c++
CXX = clang++
FC = flang
2021-02-04 18:52:26 +01:00
## Compiler flags
2021-02-16 10:49:15 +01:00
CXXFLAGS = -O0
FFLAGS = -O0
## Deps & objs for C++ cMaponiA3_test
cMaponiA3_testDEP = cMaponiA3_test.cpp SM_MaponiA3.cpp SM_MaponiA3.hpp Helpers.hpp
cMaponiA3_testOBJ = cMaponiA3_test.o SM_MaponiA3.o
## Deps & objs for Fortran fMaponiA3_test
fMaponiA3_testDEP = fMaponiA3_test.f90 SM_MaponiA3_mod.f90
fMaponiA3_testOBJ = SM_MaponiA3.o SM_MaponiA3_mod.o fMaponiA3_test.o
fMaponiA3_testLIB = -lstdc++
## Deps & objs for Fortran QMCChem_dataset_test
QMCChem_dataset_testDEP = QMCChem_dataset_test.f90 SM_MaponiA3_mod.f90 Utils_mod.f90
QMCChem_dataset_testOBJ = SM_MaponiA3.o Utils_mod.o SM_MaponiA3_mod.o QMCChem_dataset_test.o
QMCChem_dataset_testLIB = -lstdc++
## Compile recipes for C++ cMaponiA3_test
%.o: %.cpp $(cMaponiA3_testDEP)
$(CXX) $(ARCH) $(CXXFLAGS) -c -o $@ $<
## Compile recepies for Fortran fMaponiA3_test
%.o: %.f90 $(fMaponiA3_testDEP)
$(FC) $(ARCH) $(FFLAGS) -c -o $@ $<
2021-02-04 18:52:26 +01:00
## Build tagets
.PHONY: all clean distclean
2021-02-16 10:49:15 +01:00
all: cMaponiA3_test fMaponiA3_test QMCChem_dataset_test tests/test
clean:
@rm -vf *.o *.mod
distclean: clean
@rm -vf cMaponiA3_test fMaponiA3_test QMCChem_dataset_test Slater_* Updates.dat
## Linking the C++ example program
cMaponiA3_test: $(cMaponiA3_testOBJ)
$(CXX) $(ARCH) $(CXXFLAGS) -o $@ $^
## Linking Fortran example program calling the C++ function 'Sherman_Morrison()'
fMaponiA3_test: $(fMaponiA3_testOBJ)
$(FC) $(ARCH) $(FFLAGS) $(fMaponiA3_testLIB) -o $@ $^
## Linking Fortran example program calling the C++ function 'Sherman_Morrison()'
QMCChem_dataset_test: $(QMCChem_dataset_testOBJ)
$(FC) $(ARCH) $(FFLAGS) $(QMCChem_dataset_testLIB) -o $@ $^
2021-02-16 10:49:15 +01:00
tests/test: tests/test.cpp SM_MaponiA3.o
$(H5CXX) $(ARCH) $(CXXFLAGS) -o $@ $^