Sha256: 497059bc1a91201c7cffaf9d521a87918b110cf320f122014a46f92b78306c42

Contents?: true

Size: 911 Bytes

Versions: 2

Compression:

Stored size: 911 Bytes

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"
find_header "lzham_comp.h", "$(srcdir)/../contrib/lzham/lzhamcomp"
find_header "lzham_decomp.h", "$(srcdir)/../contrib/lzham/lzhamdecomp"

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

create_makefile("extlzham")

Version data entries

2 entries across 2 versions & 1 rubygems

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