Sha256: 00f46bf464a473966759519e23d38f6f09b81fa161b61d66726ec8cb6ffdaa01

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

#!ruby
#vim: set fileencoding:utf-8

require "mkmf"

dir = File.dirname(__FILE__).gsub(/[\[\{\?\*]/, "[\\0]")
filepattern = "{.,../contrib/lzham/{lzhamcomp,lzhamdecomp,lzhamlib}}/*.c{,pp}"
target = File.join(dir, filepattern)
files = Dir.glob(target).map { |n| File.basename n }
rejects = (RbConfig::CONFIG["arch"] =~ /mswin|mingw/) ? /_pthreads_/ : /_win32_/
files.reject! { |n| n =~ rejects }
$srcs = files

$VPATH.push "$(srcdir)/../contrib/lzham/lzhamcomp",
            "$(srcdir)/../contrib/lzham/lzhamdecomp",
            "$(srcdir)/../contrib/lzham/lzhamlib"

find_header "lzham.h", "$(srcdir)/../contrib/lzham/include" or abort 1
find_header "lzham_comp.h", "$(srcdir)/../contrib/lzham/lzhamcomp" or abort 1
find_header "lzham_decomp.h", "$(srcdir)/../contrib/lzham/lzhamdecomp" or abort 1

if RbConfig::CONFIG["arch"] =~ /mingw/
  $CPPFLAGS << " -D__forceinline=__attribute__\\(\\(always_inline\\)\\)"
  $LDFLAGS << " -static-libgcc -static-libstdc++"
end

try_link "void main(void){}", " -Wl,-Bsymbolic " and $LDFLAGS << " -Wl,-Bsymbolic "

create_makefile("extlzham")

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
extlzham-0.0.1.PROTOTYPE3-x86-mingw32 ext/extconf.rb
extlzham-0.0.1.PROTOTYPE3 ext/extconf.rb