]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - Makefile.am
Quit regular expressions
[guile-irrlicht.git] / Makefile.am
index 8e877004187b3aff82e4a6b9545a9be20f3f2489..8e6609321bc903913855f322e8385c98d42974bd 100644 (file)
@@ -1,12 +1,69 @@
+# guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
+#
+# Copyright (C) 2021 Javier Sancho <jsf@jsancho.org>
+#
+# This file is part of guile-irrlicht.
+#
+# guile-irrlicht is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 3 of the
+# License, or (at your option) any later version.
+#
+# guile-irrlicht is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with guile-irrlicht. If not, see
+# <http://www.gnu.org/licenses/>.
+
+
 ACLOCAL_AMFLAGS = -I m4
+
+# Swig wrapper
+
 lib_LTLIBRARIES = libguile-irrlicht.la
-libguile_irrlicht_la_SOURCES = \
-  src/dimension2d.cpp \
-  src/EDriverTypes.cpp \
-  src/GuileIrrlicht.cpp \
-  src/IrrlichtDevice.cpp \
-  src/IVideoDriver.cpp
+
+BUILT_SOURCES = $(builddir)/irrlicht_wrap.cxx
+SWIG_FLAGS = -guile -scmstub -Linkage passive -proxy -emitslotaccessors
+$(builddir)/irrlicht_wrap.cxx: irrlicht.i
+       $(SWIG) $(SWIG_FLAGS) $(IRRLICHT_CFLAGS)  -o $@ $<
+libguile_irrlicht_la_SOURCES = $(builddir)/irrlicht_wrap.cxx irrlicht.i
 libguile_irrlicht_la_CPPFLAGS = @GUILE_CFLAGS@
-libguile_irrlicht_la_LDFLAGS = \
-  -version-info 0:1 \
-  @GUILE_LIBS@
+libguile_irrlicht_la_LDFLAGS = -version-info 0:1 @GUILE_LIBS@
+
+# Guile code
+
+GOBJECTS = $(SOURCES:%.scm=%.go)
+
+nobase_mod_DATA = $(SOURCES)
+nobase_go_DATA = $(GOBJECTS)
+
+guile_install_go_files = install-nobase_goDATA
+$(guile_install_go_files): install-nobase_modDATA
+
+CLEANFILES = $(GOBJECTS)
+EXTRA_DIST = $(SOURCES)
+GUILE_COMPILE_FLAGS = -L .
+GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
+SUFFIXES = .scm .go
+.scm.go:
+       $(GUILE_TOOLS) compile $(GUILE_WARNINGS) $(GUILE_COMPILE_FLAGS) -o "$@" "$<"
+
+moddir = @GUILE_SITE@
+godir = @GUILE_SITE_CCACHE@
+
+SOURCES = irrlicht.scm \
+         irrlicht-primitive.scm \
+         Swig/common.scm
+
+nodist_noinst_SCRIPTS = pre-inst-env
+
+# Documentation
+
+# info_TEXINFOS = doc/irrlicht.texi
+
+# doc_guile_irrlicht_TEXINFOS = \
+#      doc/fdl.texi \
+#      doc/irrlicht.texi