CFLAGS          = 'not_configured'
LFLAGS          = 'not_configured'
CFLAGS_INSOURCE = -I`pwd`/../../include
LFLAGS_INSOURCE = -ldolfin -lkwpoisson -lkwconvdiff -lkwnavierstokes -lkwfem -lkwgrid -lkwio -lkwla -lkwcommon -L`pwd`/../../lib
FILE            = ./dolfin-config
TEMPLATE        = ./dolfin-config.template
KW_INCLUDES     = $(top_builddir)/src/init/dolfin.h
KW_LIBS         = $(top_builddir)/src/init/libdolfin.a $(top_builddir)/src/fem/libkwfem.a $(top_builddir)/src/common/libkwcommon.a $(top_builddir)/src/io/libkwio.a $(top_builddir)/src/grid/libkwgrid.a $(top_builddir)/src/la/libkwla.a $(top_builddir)/src/modules/poisson/libkwpoisson.a $(top_builddir)/src/modules/navier-stokes/libkwnavierstokes.a $(top_builddir)/src/modules/conv-diff/libkwconvdiff.a

all:
	echo Generating data for dolfin-config...
	rm -f ./dolfin-config
	echo \#!/bin/sh >> $(FILE)
	echo \# config-script for $(PACKAGE) version $(VERSION) >> $(FILE)
	echo >> $(FILE)
	echo COMPILER=$(CXX) >> $(FILE)
	echo CFLAGS=\"$(CFLAGS)\" >> $(FILE)
	echo LFLAGS=\"$(LFLAGS)\" >> $(FILE)
	echo CFLAGS_INSOURCE=\"$(CFLAGS_INSOURCE)\" >> $(FILE)
	echo LFLAGS_INSOURCE=\"$(LFLAGS_INSOURCE)\" >> $(FILE)
	echo PACKAGE=$(PACKAGE) >> $(FILE)
	echo VERSION=$(VERSION) >> $(FILE)
	echo >> $(FILE)
	cat $(TEMPLATE) >> $(FILE)
	chmod 0755 $(FILE)
	echo Copying include files: $(KW_INCLUDES)
	cp $(KW_INCLUDES) $(top_builddir)/include
	echo Copying library files: $(KW_LIBS)
	cp $(KW_LIBS) $(top_builddir)/lib
