Skip to content
Snippets Groups Projects
Forked from agnumpde / dune-tectonic
763 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile.am 4.00 KiB
check_PROGRAMS = \
	test-circle \
	test-gradient-horrible \
	test-gradient-horrible-logarithmic \
	test-gradient-identity \
	test-gradient-parabola \
	test-gradient-sample \
	test-gradient-sample-3d \
	test-gradient-sample-nonsmooth \
	test-gradient-sample-steep \
	test-gradient-sample-steep2 \
	test-gradient-sample-verysteep \
	test-gradient-sample2 \
	test-gradient-trivial

test_circle_SOURCES                        = test-circle.cc
test_gradient_horrible_SOURCES             = test-gradient-horrible.cc
test_gradient_horrible_logarithmic_SOURCES = test-gradient-horrible-logarithmic.cc
test_gradient_identity_SOURCES             = test-gradient-identity.cc
test_gradient_parabola_SOURCES             = test-gradient-parabola.cc
test_gradient_sample_SOURCES               = test-gradient-sample.cc
test_gradient_sample_3d_SOURCES            = test-gradient-sample-3d.cc
test_gradient_sample_nonsmooth_SOURCES     = test-gradient-sample-nonsmooth.cc
test_gradient_sample_steep_SOURCES         = test-gradient-sample-steep.cc
test_gradient_sample_steep2_SOURCES        = test-gradient-sample-steep2.cc
test_gradient_sample_verysteep_SOURCES     = test-gradient-sample-verysteep.cc
test_gradient_sample2_SOURCES              = test-gradient-sample2.cc
test_gradient_trivial_SOURCES              = test-gradient-trivial.cc

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

## 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 = \
	assemblers.cc \
	compute_state.cc \
	compute_state_ruina.cc \
	mysolver.cc \
	one-body-sample.cc \
	vtk.cc

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 = \
	assemblers.cc \
	compute_state.cc \
	compute_state_ruina.cc \
	mysolver.cc \
	one-body-sample.cc \
	vtk.cc

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

TESTS = $(check_PROGRAMS)

# 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