Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[joss review] Update Makefiles #14

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions examples_C++/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,34 @@ MOLE = ../mole_C++

CXX ?= g++

CXXFLAGS = -O3 -fopenmp -DARMA_DONT_USE_WRAPPER
ifeq ($(DEBUG),1)
CXXFLAGS = -O0 -g
else
CXXFLAGS = -O3
endif
CXXFLAGS += -fopenmp -DARMA_DONT_USE_WRAPPER

INCPATH = -I. $(if $(ARMA), -I$(ARMA)/include) -I$(MOLE)

LIBS = -L$(MOLE) -lmole $(if $(ARMA), -L$(ARMA)) -larmadillo -lopenblas
#LIBS = -L$(MOLE) -lmole $(if $(ARMA),-L$(ARMA)/lib -Wl,-rpath,$(ARMA)/lib) -larmadillo -lopenblas
LIBS = -L$(MOLE) -lmole

ifdef ARMA
LIBS += -L$(ARMA)/lib -Wl,-rpath,$(ARMA)/lib -larmadillo -lopenblas
else
$(error ARMA is not defined. Please define ARMA with the path to the Armadillo library.)
endif

ifdef EIGEN
CXXFLAGS += -DEIGEN
INCPATH += -I$(EIGEN)
else
ifdef SUPERLU
LIBS += -L$(SUPERLU)/lib -Wl,-rpath,$(SUPERLU)/lib -lsuperlu
else
LIBS += -lsuperlu
endif
endif

all: transport1D schrodinger1D elliptic1D elliptic2D

Expand Down
7 changes: 6 additions & 1 deletion mole_C++/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CXX ?= g++

CXXFLAGS = -O3 -fopenmp
ifeq ($(DEBUG),1)
CXXFLAGS = -O0 -g
else
CXXFLAGS = -O3
endif
CXXFLAGS += -fopenmp

INCPATH = -I. $(if $(ARMA), -I$(ARMA)/include)

Expand Down
8 changes: 6 additions & 2 deletions tests_C++/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ CXX ?= g++

CXXFLAGS = -O3 -fopenmp -DARMA_DONT_USE_WRAPPER

INCPATH = -I. $(if $(ARMA), -I$(ARMA)/include) -I$(MOLE)
ifdef ARMA
INCPATH = -I. -I$(ARMA)/include -I$(MOLE)
else
$(error ARMA is not defined. Please define ARMA with the path to the Armadillo library.)
endif

LIBS = -L$(MOLE) -lmole $(if $(ARMA), -L$(ARMA)) -larmadillo -lopenblas
LIBS = -L$(MOLE) -lmole -lopenblas

all: test1 test2 test3 test4 run

Expand Down
Loading