diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-06-24 18:54:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-06-24 18:54:40 +0100 |
| commit | 75d4e943eb60590c9d03ff3a4086cd5107393707 (patch) | |
| tree | a20cd92f7868a66ee9fb226376c9d5f7d5395636 /cscript | |
| parent | 8800d3e3d878531826a4b4fceee44975e68a7a08 (diff) | |
Tidy up and fix cscript some more.
Diffstat (limited to 'cscript')
| -rw-r--r-- | cscript | 42 |
1 files changed, 18 insertions, 24 deletions
@@ -19,29 +19,23 @@ def build(target, options): if target.platform == 'linux': - target.command('make generic') - target.command('make -j%d -C build_generic' % target.parallel) - target.command('mkdir -p %s/include/lwext4' % target.directory) - target.command('cp -r include/* %s/include/lwext4' % target.directory) - target.command('cp -r build_generic/include/generated %s/include/lwext4' % target.directory) - target.command('cp blockdev/linux/file_dev.h %s/include/lwext4' % target.directory) - target.command('cp build_generic/src/liblwext4.so %s/lib' % target.directory) - target.command('cp build_generic/blockdev/libblockdev.so %s/lib' % target.directory) + type = 'generic' + blockdev = 'linux' + ext = 'so' elif target.platform == 'osx': - target.command('make generic') - target.command('make -j%d -C build_generic' % target.parallel) - target.command('mkdir -p %s/include/lwext4' % target.directory) - target.command('cp -r include/* %s/include/lwext4' % target.directory) - target.command('cp -r build_generic/include/generated %s/include/lwext4' % target.directory) - target.command('cp blockdev/linux/file_dev.h %s/include/lwext4' % target.directory) - target.command('cp build_generic/src/liblwext4.dylib %s/lib' % target.directory) - target.command('cp build_generic/blockdev/libblockdev.dylib %s/lib' % target.directory) + type = 'generic' + blockdev = 'linux' + ext = 'dylib' elif target.platform == 'windows': - target.command('make mingw') - target.command('make -j%d -C build_mingw') - target.command('mkdir -p %s/include/lwext4' % target.directory) - target.command('cp -r include/* %s/include/lwext4' % target.directory) - target.command('cp -r build_mingw/include/generated %s/include/lwext4' % target.directory) - target.command('cp blockdev/windows/file_dev.h %s/include/lwext4' % target.directory) - target.command('cp build_mingw/src/liblwext4.dll %s/lib' % target.directory) - target.command('cp build_mingw/blockdev/libblockdev.dll %s/lib' % target.directory) + type = 'mingw' + blockdev = 'windows' + ext = 'dll' + + target.command('mkdir -p %s/include/lwext4' % target.directory) + target.command('cp -r include/* %s/include/lwext4' % target.directory) + target.command('make %s' % type) + target.command('make -j%d -C build_%s' % (target.parallel, type)) + target.command('cp -r build_%s/include/generated %s/include/lwext4' % (type, target.directory)) + target.command('cp blockdev/%s/file_dev.h %s/include/lwext4' % (blockdev, target.directory)) + target.command('cp build_%s/src/liblwext4.%s %s/lib' % (type, ext, target.directory)) + target.command('cp build_%s/blockdev/libblockdev.%s %s/lib' % (type, ext, target.directory)) |
