Skip to content

Commit 53f335f

Browse files
committed
add conditional logic for freebsd vs linux
1 parent ae3bd96 commit 53f335f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

wscript

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- python -*-
22

3+
import sys
4+
35
def set_options(opt):
46
opt.tool_options("compiler_cxx")
57

@@ -9,8 +11,13 @@ def configure(conf):
911

1012
def build(bld):
1113
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
12-
obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall",
13-
"-I/usr/local/include/tcl8.5" ]
14-
obj.ldflags = [ "-ltcl85" ]
14+
obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
15+
16+
if sys.platform.startswith('freebsd'):
17+
obj.cxxflags.append("-I/usr/local/include/tcl8.5")
18+
obj.ldflags = [ "-ltcl85" ]
19+
else:
20+
obj.ldflags = [ "-ltcl8.5" ]
21+
1522
obj.target = "nodetcl"
1623
obj.source = "src/nodetcl.cc"

0 commit comments

Comments
 (0)