srcdir = @srcdir@
VPATH = @srcdir@

BZDIR = ..

CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @CXX_DEBUG_FLAGS@

LIBS = -lblitz -lm

############################################################################

EXAMPLES =  array cast deriv matmult numinquire outer pick \
	rangexpr reduce simple slicing storage tiny fixed where qcd erf \
	transform nested complex stencil stencil2 diff curldiv cfd \
	indirect

.SUFFIXES: .o .cpp 

.cpp.o:
	$(CXX) $(CXXFLAGS) -c $(srcdir)/$*.cpp

$(EXAMPLES):
	$(CXX) $(LDFLAGS) $@.o -o $@ $(LIBS)

###########################################################################

all:	$(EXAMPLES)

examples:	all

array:	array.o
cast:	cast.o
deriv:	deriv.o
matmult:	matmult.o
numinquire:	numinquire.o
outer:	outer.o
pick:	pick.o
rangexpr:	rangexpr.o
reduce:	reduce.o
simple:	simple.o
slicing:	slicing.o
storage:	storage.o
tiny:	tiny.o
fixed:	fixed.o
where:	where.o
qcd:	qcd.o
erf:	erf.o
transform:	transform.o
stencil:	stencil.o
nested:	nested.o
complex:	complex.o
stencil2:	stencil2.o
curldiv:	curldiv.o
diff:	diff.o
cfd:	cfd.o
indirect:	indirect.o

###########################################################################


clean:
	rm -f *.o *.ii *.int.c *.s $(EXAMPLES)
