link in sigar.res on win32

This commit is contained in:
Doug MacEachern 2010-05-28 08:23:32 -07:00
parent 642df76807
commit d20d75908d
1 changed files with 15 additions and 5 deletions

View File

@ -102,14 +102,24 @@ unless is_win32
end
end
$distcleanfiles = ['rbsigar_generated.rx','sigar_version.c']
system('perl -Mlib=.. -MSigarWrapper -e generate Ruby .')
libname = extension_name + '.' + CONFIG['DLEXT']
system('perl -Mlib=.. -MSigarBuild -e version_file ' +
filters =
'ARCHNAME=' + RUBY_PLATFORM + ' ' +
'ARCHLIB=' + libname + ' ' +
'BINNAME=' + libname)
'BINNAME=' + libname
system('perl -Mlib=.. -MSigarBuild -e version_file ' + filters)
if is_win32
system('perl -Mlib=.. -MSigarBuild -e resource_file ' + filters)
system('rc /r sigar.rc')
$LDFLAGS += ' sigar.res'
$distcleanfiles << ['sigar.rc', 'sigar.res']
end
$distcleanfiles = ['rbsigar_generated.rx','sigar_version.c']
#XXX seems mkmf forces basename on srcs
#XXX should be linking against libsigar anyhow
(Dir["../../src/*.c"] + Dir["#{osdir}/*.c"] + Dir["#{osdir}/*.cpp"]).each do |file|