Skip to content
Snippets Groups Projects
Forked from agnumpde / dune-tectonic
564 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile.am 2.71 KiB
SUBDIRS = tests

bin_PROGRAMS = \
	one-body-sample-2D \
	one-body-sample-3D

SOURCES = \
	assemblers.cc \
	state/compute_state_dieterich_euler.cc \
	state/compute_state_dieterich_common.cc \
	state/compute_state_ruina.cc \
	mysolver.cc \
	one-body-sample.cc \
	timestepping.cc \
	vtk.cc

## 2D
.PHONY: run-one-body-sample-2D
run-one-body-sample-2D: one-body-sample-2D
	libtool --mode execute ./one-body-sample-2D

.PHONY: run-one-body-sample-2D-time
run-one-body-sample-2D-time: one-body-sample-2D
	libtool --mode execute time ./one-body-sample-2D >/dev/null

.PHONY: run-one-body-sample-2D-valgrind
run-one-body-sample-2D-valgrind: one-body-sample-2D
	libtool --mode execute valgrind ./one-body-sample-2D

.PHONY: run-one-body-sample-2D-gdb
run-one-body-sample-2D-gdb: one-body-sample-2D
	libtool --mode execute gdb ./one-body-sample-2D

one_body_sample_2D_SOURCES = $(SOURCES)

one_body_sample_2D_CPPFLAGS = \
	$(AM_CPPFLAGS) -Dsrcdir=\"$(srcdir)\" -DDIM=2

## 3D
.PHONY: run-one-body-sample-3D
run-one-body-sample-3D: one-body-sample-3D
	libtool --mode execute ./one-body-sample-3D

.PHONY: run-one-body-sample-3D-time
run-one-body-sample-3D-time: one-body-sample-3D
	libtool --mode execute time ./one-body-sample-3D >/dev/null

.PHONY: run-one-body-sample-3D-valgrind
run-one-body-sample-3D-valgrind: one-body-sample-3D
	libtool --mode execute valgrind ./one-body-sample-3D

.PHONY: run-one-body-sample-3D-gdb
run-one-body-sample-3D-gdb: one-body-sample-3D
	libtool --mode execute gdb ./one-body-sample-3D

one_body_sample_3D_SOURCES = $(SOURCES)

one_body_sample_3D_CPPFLAGS = \
	$(AM_CPPFLAGS) -Dsrcdir=\"$(srcdir)\" -DDIM=3

# Some are for clang, others are for gcc
AM_CXXFLAGS = \
	-Wall \
	-Wextra \
	-Wno-c++11-compat \
	-Wno-c++11-extensions \
	-Wno-deprecated-declarations \
	-Wno-mismatched-tags \
	-Wno-missing-declarations \
	-Wno-overloaded-virtual \
	-Wno-reorder \
	-Wno-sign-compare \
	-Wno-tautological-compare \
	-Wno-type-limits \
	-Wno-unused-parameter \
	-Wno-unused-variable

AM_CPPFLAGS = \
	$(DUNE_CPPFLAGS) \
	$(PYTHON_CPPFLAGS) \
	$(ALUGRID_CPPFLAGS) \
	-I$(top_srcdir)

# The libraries have to be given in reverse order (most basic libraries
# last).  Also, due to some misunderstanding, a lot of libraries include the
# -L option in LDFLAGS instead of LIBS -- so we have to include the LDFLAGS
# here as well.
LDADD = \
	$(DUNE_LDFLAGS) $(DUNE_LIBS) \
	$(ALUGRID_LIBS) \
	$(PYTHON_LIBS)
AM_LDFLAGS = \
	$(DUNE_LDFLAGS) \
	$(ALUGRID_LDFLAGS) \
	$(PYTHON_LDFLAGS)

# pass most important options when "make distcheck" is used
DISTCHECK_CONFIGURE_FLAGS = \
	--with-dune-common=$(DUNE_COMMON_ROOT) \
	--with-dune-fufem=$(DUNE_FUFEM_ROOT) \
	--with-dune-tnnmg=$(DUNE_TNNMG_ROOT) \
	CXX="$(CXX)" CC="$(CC)"

include $(top_srcdir)/am/global-rules