add PROGSUFFIX construction variable and default it to ".exe" for mingw/cygwin platforms
This commit is contained in:
1 parent
da457b9138
commit
87b25d7bfd
3 files changed
+56
-52
No files matched your search
@@ -5,8 +5,9 @@ module Rscons
|
||||
class Program < Builder
|
||||
def default_variables(env)
|
||||
{
|
||||
'LD' => nil,
|
||||
'OBJSUFFIX' => '.o',
|
||||
'PROGSUFFIX' => (Object.const_get("RUBY_PLATFORM") =~ /mingw|cygwin/ ? ".exe" : ""),
|
||||
'LD' => nil,
|
||||
'LIBSUFFIX' => '.a',
|
||||
'LDFLAGS' => [],
|
||||
'LIBPATH' => [],
|
||||
@@ -31,6 +32,9 @@ module Rscons
|
||||
else
|
||||
"${CC}"
|
||||
end
|
||||
unless target =~ /\./
|
||||
target += env.expand_varref("${PROGSUFFIX}", vars)
|
||||
end
|
||||
vars = vars.merge({
|
||||
'_TARGET' => target,
|
||||
'_SOURCES' => objects,
|
||||
|
||||
Reference in new issue
Block a user