Skip to content

Commit

Permalink
added suport for linux2
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus committed Jun 25, 2012
1 parent 9e0fa28 commit 74ac9f3
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions wscript
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Options
from os import unlink, symlink, popen
from os import unlink, symlink, popen, sys
from os.path import exists

srcdir = '.'
Expand All @@ -8,13 +8,13 @@ VERSION = '0.0.1'

def set_options(opt):
opt.tool_options('compiler_cxx')
#opt.tool_options('osx')

def configure(conf):
conf.check_tool('compiler_cxx')
conf.check_tool('node_addon')

if sys.platform = osx:
print(sys.platform)
if sys.platform != 'linux2':
conf.check_tool('osx')
tc_framework = 'TelldusCore'
conf.env.append_value("FRAMEWORK_TC", tc_framework)
Expand All @@ -23,17 +23,11 @@ def configure(conf):
tc_lib = tc_frameworkpath + 'Headers/'
conf.env.append_value("CPPPATH_TC", tc_lib)
else:
#tc_config = conf.find_program('pg_config', var='PG_CONFIG', mandatory=True)
#tc_libdir = popen("%s --libdir" % pg_config).readline().strip()
tc_libdir = '/usr/lib/'
conf.env.append_value("LIBPATH_TC", tc_libdir)
conf.env.append_value("LIB_TC", "tc")
#pg_includedir = popen("%s --includedir" % pg_config).readline().strip()

tc_libpath = '/usr/include/'
tc_lib = tc_libpath # + 'Headers/'
conf.env.append_value("CPPPATH_TC", tc_lib)

conf.env.LIB_TC = 'telldus-core'
#conf.env.LIBPATH_TC = ['/usr/lib']
#conf.env.CCFLAGS_TC = ['-O0']
conf.env.CCDEFINES_TC = ['TC']
#conf.env.LINKFLAGS_TC = ['-g']

def build(bld):
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
Expand Down

0 comments on commit 74ac9f3

Please sign in to comment.