六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 44|回复: 0

gcc ,scons

[复制链接]

升级  52.67%

35

主题

35

主题

35

主题

秀才

Rank: 2

积分
129
 楼主| 发表于 2013-1-15 02:56:28 | 显示全部楼层 |阅读模式
1 import os
  2 env = Environment()
  3
  4 # Default build options
  5 # Multi-core parallel build
  6 SetOption('num_jobs', 4)
  7
  8 # to create only link (not copy) of source code into the build dir.
  9 SetOption('duplicate','soft-hard-copy')
10
11 env.Decider('MD5-timestamp')
12 env.MergeFlags('-g2')
13 Export('env')
14
15 buildDir = '#build'
16
17
18 # The directory structure of the project
19 dirs = ['.','common/test'
20  ]
21 for dir in dirs:
22     SConscript(
23                                                        dir + os.sep + 'SConscript',
24                                                                build_dir = buildDir + os.sep + dir,
25                                                                        duplicate = 0
26                                                                               )


1 # -*- mode: python -*-
  2
  3 # Inherit the environment from my parent.
  4 Import('env')
  5
  6 # Make a copy of the environment, so my changes are limited in this directory and sub-directories.
  7 env = env.Clone()
  8
  9
10 env.Program('first','main.cpp',LIBS='test',LIBPATH=['.','build/common/test'],CPPPATH='#common/test/include')



  1 # -*- mode: python -*-
  2
  3 # Inherit the environment from my parent.
  4 Import('env')
  5
  6 # Make a copy of the environment, so my changes are limited in this directory and sub-directories.
  7 env = env.Clone()
  8 env.Library(target="test",
  9                                      source=["test.cpp"])

  export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表