2010-04-02 [長年日記]
[ツッコミを入れる]
2010-04-26 [長年日記]
_ [Linux][プログラミング] ruby extconf.rb のオプション
ruby の拡張ライブラリを作成するときに extconf.rb を使って makefile を作る。このときに $LDFLAGS や $CFLAGS にコマンドラインからオプションを与えたい。
require "mkmf" if opts = arg_config('--ldflags', nil) $LDFLAGS += ' ' + opts end if opts = arg_config('--cflags', nil) $CFLAGS += ' ' + opts end
のように arg_config を使うとうまくいく。
[ツッコミを入れる]