CC = @CC@
LD = @LD@
srcdir = @srcdir@

CLAPACK=base
ADDITIONAL=additional

all:
	mkdir -p build
	[ -d "$(CLAPACK)" ] || cp -a $(srcdir)/$(CLAPACK) .
	cd $(CLAPACK) && $(MAKE) blaslib CC="$(CC)" LD="$(LD)"
	cd $(CLAPACK) && $(MAKE) f2clib CC="$(CC)" LD="$(LD)"
	[ -d "$(ADDITIONAL)" ] || cp -a $(srcdir)/$(ADDITIONAL) .
	cd $(ADDITIONAL) && $(CC) -c -fPIC *.c && ar cr ../build/minlibdgels.a *.o && ranlib ../build/minlibdgels.a

install:

clean:
	-cd $(CLAPACK) && $(MAKE) clean && rm -rf *~
	-cd $(ADDITIONAL) && rm -rf *.o *~
	rm -rf build *~

distclean: clean

# This part is needed by StarPU

STARPU_SRCDIR = @srcdir@

distdir:
	cp -fRp $(STARPU_SRCDIR)/* $(distdir)
	cd $(distdir) && make -f Makefile.in clean

check:
	echo "No checks are implemented for min-dgels"

showfailed:
	@:

showcheck: check

showsuite: check

recheck: check
