Sherman-Morrison/Makefile.vfc_ci
Aurélien Delval 1d1da00931 Integration of vfc_ci
The vfc_ci tool has been directly added to the repository, since it's
not integrated into Verificarlo yet. The vfc_test_h5.cpp file defines a
test inspired by test_h5.cpp that reads a list of cycles and dump the
vfc_probes for these cycles.
2021-04-29 23:41:23 +02:00

65 lines
1.6 KiB
Makefile

## Compiler
CXX = verificarlo-c++
## Compiler flags
H5FLAGS = -I/usr/include/hdf5/serial -lhdf5_serial -lhdf5_cpp
# H5FLAGS = -lhdf5 -lhdf5_cpp
CXXFLAGS = -O0 -g $(H5FLAGS)
INCLUDE = -I $(INC_DIR)/ -I="/usr/include"
DEPS_CXX = $(OBJ_DIR)/SM_MaponiA3.o $(OBJ_DIR)/SM_MaponiA3S.o $(OBJ_DIR)/SM_Standard.o $(OBJ_DIR)/SM_Helpers.o
SRC_DIR := src
TST_DIR := tests
INC_DIR := include
OBJ_DIR := build
BIN_DIR := bin
EXEC := $(BIN_DIR)/vfc_test_h5
## Build tagets
.PHONY: all clean distclean
all: $(EXEC)
clean:
@rm -vrf $(OBJ_DIR)
@rm -vrf $(BIN_DIR)
distclean: clean
@rm -vrf $(BIN_DIR) \
Slater* Updates.dat
#### COMPILING
$(BIN_DIR) $(OBJ_DIR):
mkdir -p $@
### IMPLICIT BUILD RULES
## C++ objects
$(OBJ_DIR)/%.o: $(TST_DIR)/%.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) $(INCLUDE) -c -o $@ $<
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -fPIE $(INCLUDE) -c -o $@ $<
## HDF5/C++ objects
$(OBJ_DIR)/%_h5.o: $(TST_DIR)/%_h5.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(H5CXXFLAGS) $(INCLUDE) -c -o $@ $<
### EXPLICIT BUILD RULES
## special compiler flag -fPIC otherwise h5c++ builds fail
$(OBJ_DIR)/SM_MaponiA3.o: $(SRC_DIR)/SM_MaponiA3.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -fPIC $(INCLUDE) -c -o $@ $<
$(OBJ_DIR)/SM_MaponiA3S.o: $(SRC_DIR)/SM_MaponiA3S.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -fPIC $(INCLUDE) -c -o $@ $<
$(OBJ_DIR)/SM_Standard.o: $(SRC_DIR)/SM_Standard.cpp $(INC_DIR)/* | $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -fPIC $(INCLUDE) -c -o $@ $<
#### LINKING
$(BIN_DIR)/vfc_test_h5: $(OBJ_DIR)/vfc_test_h5.o $(DEPS_CXX) | $(BIN_DIR)
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ $^ $(H5FLAGS)