Tweak cscript for OS X.
authorCarl Hetherington <cth@carlh.net>
Mon, 24 Jun 2019 11:55:50 +0000 (12:55 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 24 Jun 2019 12:10:04 +0000 (13:10 +0100)
cscript

diff --git a/cscript b/cscript
index ec98fb9172ee0a1b605a020d48b8c6432b7a2611..2563f270a446a7bf6a6583ec1491b21b3eebb707 100644 (file)
--- a/cscript
+++ b/cscript
@@ -18,7 +18,7 @@
 #
 
 def build(target, options):
-    if target.platform == 'linux' or target.platform == 'osx':
+    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)
@@ -27,6 +27,15 @@ def build(target, options):
         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)
+    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)
     elif target.platform == 'windows':
         target.command('make mingw')
         target.command('make -j%d -C build_mingw')