williamblevins edited this page Jun 15, 2015 · 2 revisions

I have 3 groups of files, all reside in the same directory:


and then I have

I want to compile

  • group1 with "-g"
  • group2 same as group1 and in addition with "-Wall"
  • group3 same as group2 and in addition with "-fprofile-arcs -ftest-coverage"

My Sconstruct looks like this:

flags = '-g'
fsharp = flags + ' -Wall'
fprof  = fsharp + ' -fprofile-arcs -ftest-coverage'

base = Environment(CCFLAGS = flags)
sharp = base.Clone(CCFLAGS = fsharp)
prof  = sharp.Clone(CCFLAGS = fprof)

prfList = Split("""

myList = Split("""

list = Split("""

prof.Library('my1', prfList)
sharp.Library('my2', myList)
base.Library('my3', list)

# this does NOT work ...???

sharp.Program('', LIBS=['my1','my2','my3','my1','my2','my3'], LIBPATH='.') 

Because I can't build a library from libraries, I have to specify my sublibraries twice, since there are dependencies between them. Does anybody know a better way to achieve this ...???

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.