bin_PROGRAMS = sand-wedge-2D sand-wedge-3D

common_sources = \
	assemblers.cc \
	boundary_writer.cc \
	coupledtimestepper.cc \
	enumparser.cc \
	fixedpointiterator.cc \
	friction_writer.cc \
	sand-wedge-data/mygeometry.cc \
	sand-wedge-data/mygrid.cc \
	solverfactory.cc \
	state.cc \
	timestepping.cc \
	vtk.cc

sand_wedge_2D_SOURCES = $(common_sources) sand-wedge.cc
sand_wedge_2D_CPPFLAGS = \
	$(AM_CPPFLAGS) $(BOOST_CPPFLAGS) \
	-Ddatadir=\"$(abs_srcdir)/sand-wedge-data/\" -DMY_DIM=2
sand_wedge_3D_SOURCES = $(common_sources) sand-wedge.cc
sand_wedge_3D_CPPFLAGS = \
	$(AM_CPPFLAGS) $(BOOST_CPPFLAGS) \
	-Ddatadir=\"$(abs_srcdir)/sand-wedge-data/\" -DMY_DIM=3

# Some are for clang, others are for gcc
AM_CXXFLAGS = \
	-Wall \
	-Wextra \
	-Wno-unused-parameter \
	-Wno-overloaded-virtual

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

# The libraries have to be given in reverse order (most basic libraries
# last).
LDADD = \
	$(DUNE_LDFLAGS) $(DUNE_LIBS) \
	$(ALUGRID_LIBS) \
	$(UG_LIBS) \
	$(PYTHON_LIBS)
AM_LDFLAGS = \
	$(DUNE_LDFLAGS) \
	$(ALUGRID_LDFLAGS) \
	$(UG_LDFLAGS) \
	$(PYTHON_LDFLAGS)

if CAIROMM
AM_CPPFLAGS += $(CAIROMM_CFLAGS)
LDADD += $(CAIROMM_LIBS)
endif

include $(top_srcdir)/am/global-rules