From 934ffc55b4dc486a825fedeac03d1b7ac1002a38 Mon Sep 17 00:00:00 2001 From: "Mulas, Giacomo" <gmulas@oa-cagliari.inaf.it> Date: Fri, 12 Jan 2024 16:50:15 +0100 Subject: [PATCH] Moved all Makefile variable definitions to make.inc, include it from Makefiles downward --- src/make.inc | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/make.inc diff --git a/src/make.inc b/src/make.inc new file mode 100644 index 00000000..77cf05c0 --- /dev/null +++ b/src/make.inc @@ -0,0 +1,37 @@ +ifndef FC +override FC=gfortran +endif + +ifndef FCFLAGS +override FCFLAGS=-std=legacy -O3 +endif + +ifndef LDFLAGS +override LDFLAGS= +endif + +ifndef CXX +override CXX=g++ +endif + +ifndef HDF5_INCLUDE +override HDF5_INCLUDE=/usr/include/hdf5/serial +endif + +ifndef CXXFLAGS +override CXXFLAGS=-O3 -ggdb -pg -coverage -I$(HDF5_INCLUDE) +endif + +ifndef CXXLDFLAGS +ifndef HDF5_LIB +override HDF5_LIB=/usr/lib/x86_64-linux-gnu/hdf5/serial +endif +override CXXLDFLAGS=-L/usr/lib64 -L$(HDF5_LIB) -lhdf5_hl -lhdf5 $(LDFLAGS) +endif + +%.o : %.f + $(FC) $(FCFLAGS) -c -o $(BUILDDIR)/$@ $< + +%.o : %.cpp + $(CXX) $(CXXFLAGS) -c -o $(BUILDDIR)/$@ $< + -- GitLab