Commit ff064b2c authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added MOAB as a git submodule, adjusted Makefiles to link the benchmarks against bundled MOAB

parent 206b9778
Loading
Loading
Loading
Loading

.gitmodules

0 → 100644
+3 −0
Original line number Diff line number Diff line
[submodule "libs/moab"]
	path = libs/moab
	url = https://bitbucket.org/fathomteam/moab.git
+10 −4
Original line number Diff line number Diff line
CXX := g++

CPPFLAGS := -MD -MP
CPPFLAGS := -MD -MP -I ./libs/install/include
CXXFLAGS := -std=c++11 -Wall -Wextra -pedantic -O3 -march=native -mtune=native -flto -fopenmp
LDFLAGS := -lm -lMOAB -lgomp -flto
LDLIBS := -lm -lMOAB -lgomp -flto
LDFLAGS := -L ./libs/install/lib -Wl,-rpath,"$(CURDIR)/libs/install/lib"

SOURCES = $(wildcard *.cpp)
TARGETS = $(SOURCES:%.cpp=%)

all: $(TARGETS)

%.o: %.cpp
.PHONY: moab
moab:
	+make -C libs moab

%.o: %.cpp moab
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<

$(TARGETS): %: %.o
	$(CXX) -o $@ $^ $(LDFLAGS)
	$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)

clean:
	$(RM) *.[od] $(TARGETS)
	+make -C libs clean

-include $(SOURCES:%.cpp=%.d)

libs/.gitignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
/build
/install

libs/Makefile

0 → 100644
+17 −0
Original line number Diff line number Diff line
PREFIX = $(CURDIR)/install

all: moab

.PHONY: moab
moab:
	cmake -B "$(CURDIR)/build" -S "$(CURDIR)/moab" -G "Unix Makefiles" \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX="$(PREFIX)" \
		-DENABLE_FORTRAN=no \
		-DENABLE_BLASLAPACK=no \
		-DENABLE_VTK=yes
	+make -C "$(CURDIR)/build" install

.PHONY: clean
clean:
	$(RM) -r $(CURDIR)/build $(CURDIR)/install

moab @ 65880ffe

Original line number Diff line number Diff line
Subproject commit 65880ffe833d91fb7e1167427becf82b18ea7a09