/wscript

http://github.com/OpenRTMFP/ArcusNode · #! · 56 lines · 45 code · 11 blank · 0 comment · 0 complexity · 7445571d6cb4d3390e1dba352f7e9cba MD5 · raw file

  1. # wscript
  2. #
  3. # Copyright 2011 OpenRTMFP
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License received along this program for more
  14. # details (or else see http://www.gnu.org/licenses/).
  15. #
  16. # Author: arcusdev <arcus.node@gmail.com>
  17. #
  18. # This file is a part of ArcusNode.
  19. import os, sys
  20. srcdir = '.'
  21. blddir = './build'
  22. VERSION = '0.0.4'
  23. def set_options(opt):
  24. opt.tool_options('compiler_cxx')
  25. def configure(conf):
  26. conf.check_tool('compiler_cxx')
  27. conf.check_tool('node_addon')
  28. def build(bld):
  29. rtmfp = bld.new_task_gen('cxx', 'shlib', 'node_addon')
  30. if sys.platform.startswith("cygwin"):
  31. rtmfp.lib = 'crypto';
  32. rtmfp.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-L/usr/lib", "-lssl"]
  33. rtmfp.chmod = 0755
  34. rtmfp.target = 'rtmfp'
  35. rtmfp.source = 'src/rtmfp.cc'
  36. keyExchange = bld.new_task_gen('cxx', 'shlib', 'node_addon')
  37. if sys.platform.startswith("cygwin"):
  38. keyExchange.lib = 'crypto';
  39. keyExchange.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-L/usr/lib", "-lssl"]
  40. keyExchange.chmod = 0755
  41. keyExchange.target = 'keyexchange'
  42. keyExchange.source = 'src/keyexchange.cc'
  43. def clean(opt):
  44. if os.path.exists(blddir + '/default/keyexchange.node'): os.unlink(blddir + '/default/keyexchange.node')
  45. if os.path.exists(blddir + '/default/rtmfp.node'): os.unlink(blddir + '/default/rtmfp.node')