]>
src.bluestatic.org Git - armadillo.git/blob - build.py
1 #!/usr/bin/env python2.5
7 SRC_PATH
= os
.path
.join(ROOT
, 'src')
8 PROD_PATH
= os
.path
.join(ROOT
, 'out')
14 PRODUCT_NAME
= 'armadillo'
20 def _ObjFileName(gofile
):
21 gofile
= os
.path
.basename(gofile
)
22 return os
.path
.join(PROD_PATH
, os
.path
.splitext(gofile
)[0] + '.' + O_EXTENSION
)
25 print '=== Starting Build ==='
27 for gofile
in SOURCES
:
28 gofile
= os
.path
.join(SRC_PATH
, gofile
)
29 args
= [ COMPILER
, '-I', PROD_PATH
, '-I', SRC_PATH
, '-o', _ObjFileName(gofile
), gofile
]
30 print ' ' + ' '.join(args
)
31 handle
= subprocess
.Popen(args
, stdout
= sys
.stdout
, stderr
= sys
.stderr
)
35 objects
= map(_ObjFileName
, SOURCES
)
36 args
= [ LINKER
, '-o', os
.path
.join(PROD_PATH
, PRODUCT_NAME
) ] + objects
37 print ' ' + ' ' .join(args
)
38 handle
= subprocess
.Popen(args
, stdout
= sys
.stdout
, stderr
= sys
.stderr
)
41 if __name__
== '__main__':