add Environment.execute(); implement first version of Program builder
This commit is contained in:
1 parent
3b8763a424
commit
62e9bfa5d3
3 files changed
+22
-3
No files matched your search
@@ -7,7 +7,7 @@ module Rscons
|
||||
'OBJSUFFIX' => '.o',
|
||||
}
|
||||
|
||||
def run(env, sources)
|
||||
def run(env, target, sources)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -5,10 +5,20 @@ module Rscons
|
||||
'OBJSUFFIX' => '.o',
|
||||
'LIBSUFFIX' => '.a',
|
||||
'LDFLAGS' => [],
|
||||
'LIBPATHS' => [],
|
||||
'LIBS' => [],
|
||||
}
|
||||
|
||||
def run(env, sources)
|
||||
def run(env, target, sources)
|
||||
command = [
|
||||
env['LD'] || env['CC'],
|
||||
'-o', target,
|
||||
*env['LDFLAGS'],
|
||||
*sources,
|
||||
*env['LIBPATHS'].map {|lp| "-L#{lp}"},
|
||||
*env['LIBS'].map {|lib| "-l#{lib}"}
|
||||
]
|
||||
env.execute("LINK #{target}", command)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user