From 6bc62b2465bc939248d4da82fc34be174dcd701a Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sun, 15 Mar 2020 10:41:39 +0100 Subject: [PATCH] Compile scm files and install guile module --- .gitignore | 1 + Makefile.am | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 23 ++++++++++++++++++++++- 3 files changed, 73 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4389d9c..16d3b14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.go *.la *.lo *.log diff --git a/Makefile.am b/Makefile.am index 1bdd2ce..d666607 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,25 @@ +# guile-irrlicht --- GNU Guile bindings for Irrlicht Engine +# +# Copyright (C) 2020 Javier Sancho +# +# 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 +# . + + +# C++ code ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libguile-irrlicht.la libguile_irrlicht_la_SOURCES = \ @@ -22,3 +44,31 @@ libguile_irrlicht_la_CPPFLAGS = @GUILE_CFLAGS@ 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/device.scm \ + irrlicht/gui.scm \ + irrlicht/irr.scm \ + irrlicht/scene.scm diff --git a/configure.ac b/configure.ac index e066e04..ca4d56d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,24 @@ +# guile-irrlicht --- GNU Guile bindings for Irrlicht Engine +# +# Copyright (C) 2020 Javier Sancho +# +# 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 +# . + + AC_INIT([guile-irrlicht], [0.1], [jsf@jsancho.org]) AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects]) AC_CONFIG_MACRO_DIRS([m4]) @@ -5,7 +26,7 @@ AM_PROG_AR AC_PROG_CXX LT_INIT -PKG_CHECK_MODULES([GUILE], [guile-2.2]) +GUILE_SITE_DIR AC_CHECK_LIB( [Irrlicht], -- 2.39.2