changeset 5:e74ff416fd54

File for the configuration and compilation of the pkg * configure.ac: Check if dolfin is available * Makefile.in: generate the makefile * bootstrap: generate the configuration file
author gedeone-octave <marco.vassallo@outlook.com>
date Fri, 05 Jul 2013 18:16:21 +0200
parents 00bfa5dd0dd6
children 93c8ee6a546f
files src/Makefile.in src/bootstrap src/configure.ac
diffstat 3 files changed, 52 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Makefile.in	Fri Jul 05 18:16:21 2013 +0200
@@ -0,0 +1,31 @@
+MKOCTFILE ?= mkoctfile
+
+OCTFILES=fem_init_env.oct fem_init_mesh.oct
+LIBS = 
+
+HAVE_DOLFIN_H = @HAVE_DOLFIN_H@
+ifdef HAVE_DOLFIN_H
+  CPPFLAGS += -DHAVE_DOLFIN_H
+  LIBS += -ldolfin
+endif
+
+all: $(OCTFILES)
+
+fem_init_env.oct:  mesh.o fem_init_env.o
+	$(MKOCTFILE) $(CPPFLAGS) -s mesh.o fem_init_env.o -o $@ $(LDFLAGS) $(LIBS)
+
+fem_init_mesh.oct:  mesh.o fem_init_mesh.o
+	$(MKOCTFILE) $(CPPFLAGS) -s mesh.o fem_init_mesh.o -o $@ $(LDFLAGS) $(LIBS)
+
+mesh.o:  mesh.cc mesh.h
+	$(MKOCTFILE) $(CPPFLAGS) -c mesh.cc $(LDFLAGS) -o $@ -I.
+
+fem_init_mesh.o:  fem_init_mesh.cc mesh.cc mesh.h
+	$(MKOCTFILE) $(CPPFLAGS) -c fem_init_mesh.cc $(LDFLAGS) -o $@ -I.
+
+fem_init_env.o:  fem_init_env.cc mesh.cc mesh.h
+	$(MKOCTFILE) $(CPPFLAGS) -c fem_init_env.cc $(LDFLAGS) -o $@ -I.
+
+clean:
+	-rm -f *.o core octave-core *.oct *~ *.xml
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/bootstrap	Fri Jul 05 18:16:21 2013 +0200
@@ -0,0 +1,5 @@
+#!/bin/bash
+## Octave-Forge: msh package bootstrap script
+
+set -e
+autoconf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/configure.ac	Fri Jul 05 18:16:21 2013 +0200
@@ -0,0 +1,16 @@
+AC_PREREQ([2.67])
+AC_INIT([Msh Package], [1.0])
+
+AC_PROG_CXX
+AC_LANG(C++)
+
+AC_CHECK_PROG([HAVE_MKOCTFILE], [mkoctfile], [yes], [no])
+if [test $HAVE_MKOCTFILE = "no"]; then
+  AC_MSG_ERROR([mkoctfile required to install $PACKAGE_NAME])
+fi
+
+AC_CHECK_HEADERS([dolfin.h], [ ],
+  [AC_MSG_ERROR([dolfin required to install $PACKAGE_NAME])]
+)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT