Import('env') env = env.Clone() source_files_rs = [ 'src/common/lib.rs', # Must be listed first (see below). ] source_files_c = [ 'src/common/startup.c', ] libcommon_rlib = env.Rustc('libcommon.rlib', source_files_rs[0]) for f in source_files_rs: Depends(libcommon_rlib, f) libcommon_a = env.Library('libcommon.a', source_files_c) for f in source_files_c: Depends(libcommon_a, f)