@@ -131,25 +131,8 @@ export abstract class CodeBuilder {
131131 paramsModTime ?: number ;
132132 } {
133133
134- const srcList : { path : string , virtualPath ?: string ; } [ ] = [ ] ;
135134 const srcParams : { [ name : string ] : string ; } = { } ;
136- const fGoups = this . project . getFileGroups ( ) ;
137- const filter = AbstractProject . getSourceFileFilter ( ) ;
138-
139- // filter source files
140- for ( const group of fGoups ) {
141- if ( group . disabled ) continue ; // skip disabled group
142- for ( const source of group . files ) {
143- if ( source . disabled ) continue ; // skip disabled file
144- if ( ! filter . some ( ( reg ) => reg . test ( source . file . path ) ) ) continue ; // skip non-source
145- const rePath = this . project . ToRelativePath ( source . file . path ) ;
146- const fInfo : any = { path : rePath || source . file . path }
147- if ( AbstractProject . isVirtualSourceGroup ( group ) ) {
148- fInfo . virtualPath = `${ group . name } /${ source . file . name } ` ;
149- }
150- srcList . push ( fInfo ) ;
151- }
152- }
135+ const srcList : { path : string , virtualPath ?: string ; } [ ] = this . project . getAllSources ( ) ;
153136
154137 // append user options for files
155138 try {
@@ -483,6 +466,25 @@ export abstract class CodeBuilder {
483466 // handle options
484467 this . preHandleOptions ( builderOptions . options ) ;
485468
469+ // gen libs.makefile
470+ const mkfile = File . fromArray ( [ this . project . ToAbsolutePath ( outDir ) , 'libs.makefile' ] ) ;
471+ const mk_txt = this . project . genLibsMakefileContent ( mkfile . name ) ;
472+ if ( mk_txt ) {
473+ try {
474+ mkfile . Write ( mk_txt ) ;
475+ let command : any = {
476+ name : 'make libs' ,
477+ command : `make --directory=./${ outDir } --makefile=./${ mkfile . name } all`
478+ } ;
479+ if ( builderOptions . options . afterBuildTasks == undefined )
480+ builderOptions . options . afterBuildTasks = [ ] ;
481+ builderOptions . options . afterBuildTasks = [ command ] . concat ( builderOptions . options . afterBuildTasks ) ;
482+ } catch ( error ) {
483+ GlobalEvent . emit ( 'msg' , newMessage ( 'Warning' , `Generating '${ mkfile . name } ' failed !` ) ) ;
484+ GlobalEvent . emit ( 'globalLog' , ExceptionToMessage ( error , 'Error' ) ) ;
485+ }
486+ }
487+
486488 // generate hash for compiler options
487489 builderOptions . sha = this . genHashFromCompilerOptions ( builderOptions ) ;
488490
0 commit comments