浏览代码

* Some cleanup in the Ruby bindings Makefile.am.

tags/v0.99.beta14
Sam Hocevar sam 17 年前
父节点
当前提交
dfb3140b8e
共有 2 个文件被更改,包括 37 次插入25 次删除
  1. +6
    -8
      configure.ac
  2. +31
    -17
      ruby/Makefile.am

+ 6
- 8
configure.ac 查看文件

@@ -346,18 +346,16 @@ ac_cv_my_have_ruby="no"
if test "${enable_ruby}" != "no"; then
AC_PATH_PROG(RUBY, ruby, no)
if test "${RUBY}" != "no"; then
RUBY_ARCHDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"archdir"@:>@'`
RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"archdir"@:>@')"
RUBY_LIBS="-L$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"libdir"@:>@') -l$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"RUBY_SO_NAME"@:>@')"
RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitearchdir"@:>@'`
RUBY_SITELIBDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitelibdir"@:>@'`
RUBY_LIBDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"libdir"@:>@'`
RUBY_SO_NAME=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"RUBY_SO_NAME"@:>@'`
AC_SUBST(RUBY_ARCHDIR)
AC_SUBST(RUBY_CFLAGS)
AC_SUBST(RUBY_LIBS)
AC_SUBST(RUBY_SITEARCHDIR)
AC_SUBST(RUBY_SITELIBDIR)
AC_SUBST(RUBY_LIBDIR)
AC_SUBST(RUBY_SO_NAME)
AC_CHECK_HEADERS(
$RUBY_ARCHDIR/ruby.h,
CPPFLAGS="${CPPFLAGS} ${RUBY_CFLAGS}"
AC_CHECK_HEADERS([ruby.h],
[ac_cv_my_have_ruby="yes"
CACA_BINDINGS="${CACA_BINDINGS} Ruby"])
fi


+ 31
- 17
ruby/Makefile.am 查看文件

@@ -1,6 +1,7 @@
# $Id: $
rubylibdir=$(RUBY_SITEARCHDIR)
rubysitedir=$(RUBY_SITELIBDIR)

rubylibdir = $(RUBY_SITEARCHDIR)
rubysitedir = $(RUBY_SITELIBDIR)

if USE_RUBY
rubylib_LTLIBRARIES = caca.la cucul.la
@@ -8,27 +9,40 @@ rubysite_DATA = lib/caca.rb
TESTS = test
endif

cucul_la_CPPFLAGS = -I$(top_srcdir)/cucul -I$(RUBY_ARCHDIR)
cucul_la_SOURCES = cucul.c cucul-canvas.c cucul-dither.c cucul-font.c
cucul_la_LDFLAGS = -module -avoid-version -shared -L$(RUBY_LIBDIR) -l$(RUBY_SO_NAME)
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes

cucul_la_CPPFLAGS = -I$(top_srcdir)/cucul $(RUBY_CFLAGS)
cucul_la_SOURCES = cucul.c \
common.h \
cucul-canvas.c \
cucul-canvas.h \
cucul-dither.c \
cucul-dither.h \
cucul-font.c \
cucul-font.h \
$(NULL)
cucul_la_LDFLAGS = -module -avoid-version -shared $(RUBY_LIBS)
cucul_la_LIBADD = ../cucul/libcucul.la

caca_la_CPPFLAGS = -I$(top_srcdir)/caca -I$(RUBY_ARCHDIR)
caca_la_SOURCES = caca.c caca-display.c caca-event.c
caca_la_LDFLAGS = -module -avoid-version -shared -L$(RUBY_LIBDIR) -l$(RUBY_SO_NAME)
caca_la_CPPFLAGS = -I$(top_srcdir)/caca $(RUBY_CFLAGS)
caca_la_SOURCES = caca.c \
common.h \
caca-display.c \
caca-display.h \
caca-event.c \
caca-event.h \
$(NULL)
caca_la_LDFLAGS = -module -avoid-version -shared $(RUBY_LIBS)
caca_la_LIBADD = ../caca/libcaca.la

EXTRA_DIST = cucul-canvas.h \
cucul-dither.h \
cucul-font.h \
caca-display.h \
caca-event.h \
common.h \
test.rb \
EXTRA_DIST = ruby.dox \
ruby-caca.dox \
ruby-cucul.dox \
lib/caca.rb \
t/tc_canvas.rb \
t/tc_dither.rb \
t/tc_font.rb \
t/tc_frame.rb \
README
README \
$(NULL)

CFLAGS+=-Wno-strict-prototypes -Wno-missing-prototypes

正在加载...
取消
保存