Changeset 7:2ba083653995

Show
Ignore:
Timestamp:
08/09/06 15:24:15 (2 years ago)
Author:
vadim@mbdsys.com
Message:

Fixes to build on Linux without video

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Env/BuildJob.py

    r6 r7  
    1414 
    1515    def prepare(self, env): 
     16        """ add to the given environement information needed to use this moduel""" 
    1617 
     18        dict = env.Dictionary() 
     19         
     20        def evar(k): 
     21            if dict.has_key(k): 
     22                return dict[k] 
     23 
     24            return [] 
     25 
     26        print "Preparing for:", self.name  
    1727        for m in self.depends: 
    1828            m.prepare(env) 
     29 
    1930         
    20         elp = sets.ImmutableSet(env['LIBPATH']) 
    21         einc = sets.ImmutableSet(env['INCLUDE']) 
    22         elibs = sets.ImmutableSet(env['LIBS']) 
     31             
     32        elp = sets.ImmutableSet(evar('LIBPATH')) 
     33        einc = sets.ImmutableSet(evar('CPPPATH')) 
     34        elibs = sets.ImmutableSet(evar('LIBS')) 
    2335 
    2436        newlp = self.libpathes - elp 
     
    2739 
    2840        if len(newlp): 
    29             env.Append(LIBPATH = newlp
     41            env.Append(LIBPATH = list(newlp)
    3042        if len(newinc): 
    31             env.Append(INCLUDE = newinc
     43            env.Append(CPPPATH = list(newinc)
    3244        if len(newlibs): 
    33             env.Append(LIBS = newlp
     45            env.Append(LIBS = list(newlp)
    3446             
    3547         
     
    7082 
    7183 
    72           self.buildpath += "/" + self.buildpath 
    7384 
    7485          if self.debug: 
    7586              self.buildpath += "/debug" 
    7687          else: 
    77               self.buildpath += "/relsease" 
     88              self.buildpath += "/release" 
    7889           
    7990           
     
    102113    def Prepare(self, env,  uses): 
    103114 
    104           return 
     115          dict = env.Dictionary() 
     116          def showprep(msg): 
     117              l = [] 
     118              for k in ["CPPPATH", "LIBPATH", "LIBS"]: 
     119                  v = "" 
     120                  if dict.has_key(k): 
     121                      v = dict[k] 
     122                  l += [(k,v)]     
     123              print msg, l 
     124 
     125          showprep("Before preparing") 
    105126          usedModules = [ self.modules[x] for x in uses ] 
    106127          for m in usedModules: 
    107128              m.prepare(env) 
    108129               
     130          showprep("After preparing") 
     131 
     132 
    109133 
    110134 
     
    156180        try: 
    157181           #SCons 0.96.91 support (pre-release for 0.97) 
    158            tmp = self['LDMODULEPREFIX'] 
     182           tmp = env['LDMODULEPREFIX'] 
    159183           #Removes the library name prefix 
    160            self['LDMODULEPREFIX'] = '' 
    161            lib = env.LoadableModule(pluginName, source, **kw) 
    162            self['LDMODULEPREFIX'] = tmp 
     184           env['LDMODULEPREFIX'] = '' 
     185           lib = env.LoadableModule(target, source, **kw) 
     186           env['LDMODULEPREFIX'] = tmp 
    163187        except KeyError: 
    164188           #SCons 0.96.1 support (stable version) 
    165            tmp = self['SHLIBPREFIX'] 
     189           tmp = env['SHLIBPREFIX'] 
    166190           #Removes the library name prefix 
    167            self['SHLIBPREFIX'] = '' 
    168            lib = env.SharedLibrary(pluginName, source, **kw) 
    169            self['SHLIBPREFIX'] = tmp 
     191           env['SHLIBPREFIX'] = '' 
     192           lib = env.SharedLibrary(target, source, **kw) 
     193           env['SHLIBPREFIX'] = tmp 
    170194         
    171195        return lib 
  • SConscript

    r6 r7  
    5555 
    5656 
    57 projects = [  
     57projects = [ 
     58        'libs/portaudio',  
    5859        'libs/curl', 
    5960        'libs/util', 
    6061        'httptunnel', 
    6162        'libosip2', 
     63        'ortp', 
    6264        'eXosip', 
    6365        'phapi/stun', 
    6466        'phapi/gsm', 
    6567        'phapi/ilbc', 
     68        'phapi/speex', 
     69        'phapi' 
    6670         ] 
    6771 
  • SConstruct

    r6 r7  
    1515        BoolOption('libsamplerate', "Enable usage of libsamplerate", False), 
    1616        BoolOption('phapi_audio_arts', "Build PortAudio/arts support",  False), 
     17        BoolOption('phapi_audio_esd', "Build PortAudio/esd support",  False), 
    1718        BoolOption('portaudio_oss', "Build PortAudio/OSS",  False), 
    1819        BoolOption('portaudio_dsound', "Build PortAudio/DirectSound support",  False), 
     
    2122        BoolOption('speexwb_replaces_g726wb', "if set replace negotiated G726wb payload by SPEEX WB", False), 
    2223        BoolOption('ipp', "Enable usage of INTEL IPP Library", False), 
     24        BoolOption('amr', "Enable usage of AMR codec", False), 
    2325        BoolOption('debug', "Enable debug build", True), 
     26        BoolOption('enable_phapi_embed', "Enable EMBEDDED version of PHAPI", False), 
     27        BoolOption('qos_debug', "Enable QoS debugging functionality", False), 
     28        BoolOption('enable_video', "Enable Video functionality", False), 
     29        BoolOption('enable_alsa', "Disable ALSA driver", False), 
    2430        ('target_os', "Target platform", sys.platform), 
    25         ('VERONA_VERSION', "Software version", "0.0.1") 
     31        ('VERONA_VERSION', "Software version", "0.0.2") 
    2632        ) 
    2733 
  • eXosip/SConscript

    r6 r7  
    5353exosipobj = env.SharedObject( source=sources, CPPDEFINES = defines, CPPPATH = include_path) 
    5454exosiplib = env.StaticLibrary('eXosip', source = exosipobj) 
     55BJ.DefModule('eXosip', includes = ["#eXosip/include"], libpath = ["#eXosip"], libs = ["eXosip"]) 
     56 
    5557Alias('eXosip', exosiplib) 
  • httptunnel/SConscript

    r6 r7  
    2020 
    2121 
    22 BJ.Prepare(env, 'veronacurl'
     22BJ.Prepare(env, ['veronacurl']
    2323httptunnel = env.StaticLibrary('httptunnel', sources, CPPDEFINES = defines, CPPPATH=["#libs/curl/include", "."]) 
    2424BJ.DefModule('httptunnel', includes = ['.'], libpath = ['.'], libs = ['httptunnel'], uses = ['veronacurl'], node = httptunnel) 
  • libosip2/SConscript

    r6 r7  
    106106 
    107107osip = env.StaticLibrary('osip', source = osipobj) 
     108 
     109BJ.DefModule('osip', includes = ['#libosip2/include'], libpath = ["libosip2"], libs = ["osip"])  
    108110Alias("osip", osip) 
  • libs/portaudio/SConscript

    r0 r7  
     1Import("BJ") 
    12import sys 
    23 
    3 env = GlobalGetEnvironment() 
     4env = BJ.NewEnv() 
    45 
    56lib_path = [ 
     
    110111} 
    111112 
    112 if GlobalDebugMode()
     113if env['debug']
    113114        defines['DEBUG'] = 1 
    114115 
     
    116117headers = headers_common 
    117118 
    118 if GlobalOSLinux() or GlobalOSBSD()
     119if BJ.linuxTarget
    119120        defines['PA_LITTLE_ENDIAN'] = 1 
    120121        defines['HAVE_LIBPTHREAD'] = 1 
     
    122123        sources += sources_linux 
    123124        headers += headers_linux 
    124         if GlobalGetConsoleArgument('portaudio-oss') == 0
     125        if not env['portaudio_oss']
    125126                defines['PA_USE_ALSA'] = 1 
    126127                libs += ['libasound'] 
     
    131132                sources += sources_oss 
    132133 
    133 elif GlobalOSMacOSX()
     134elif BJ.osxTarget
    134135        defines['PA_BIG_ENDIAN'] = 1 
    135136        defines['WORDS_BIGENDIAN'] = 1 
     
    139140        headers += headers_mac 
    140141 
    141 elif GlobalOSWindows()
     142elif BJ.win32Target
    142143        defines['PA_LITTLE_ENDIAN'] = 1 
    143144        defines['PA_NO_ASIO'] = 1 
     
    146147        headers += headers_win 
    147148         
    148         if GlobalGetConsoleArgument('portaudio-dsound') == 1
     149        if env['portaudio_dsound']
    149150                sources += source_dsound 
    150151                headers += headers_dsound 
     
    154155                headers += headers_wmme 
    155156                defines['PA_NO_DS'] = 1 
    156         if not GlobalCCGCC()
     157        if not BJ.gcc
    157158                sources += source_msvc 
    158159 
     
    161162        sys.exit() 
    162163 
    163 env.GlobalAddLinkFlags(lib_flags) 
    164 env.GlobalAddLibPath(lib_path
    165 env.GlobalUseLibraries(libs) 
    166 env.GlobalAddDefines(defines) 
    167 env.GlobalAddIncludePath(include_path
    168 env.GlobalStaticLibrary('portaudio', sources, headers) 
     164 
     165env.Append(CPPPATH = include_path, LIBPATH = "lib", CPPDEFINES = defines
     166pa = env.SharedLibrary('portaudio', sources) 
     167BJ.DefModule('portaudio', includes = ["#libs/portaudio/pa_common"], libpath = ["#libs/portaudio"], libs = ["portaudio"])  
     168Alias('portaudio', pa
     169 
    169170 
    170171#env.SConscript('tests/SConscript') 
  • ortp/SConscript

    r0 r7  
    1 env = GlobalGetEnvironment() 
     1Import('BJ') 
     2 
     3env = BJ.NewEnv() 
    24 
    35env['WIN32_INSERT_DEF'] = 1 
     
    911        'RTP_MAX_SIZE' : 8192 
    1012} 
     13 
    1114headers = [] 
    1215sources = [ 
     
    3134 
    3235 
    33 if GlobalGetConsoleArgument('enable-http-tunnel')
     36if env['httptunnel']
    3437        defines['USE_HTTP_TUNNEL'] = 1 
    3538 
    36 if GlobalOSWindows()
     39if BJ.win32Target
    3740        defines['WIN32'] = 1 
    3841        libs += ['ws2_32', 'winmm'] 
    3942 
    40 if GlobalOSLinux() or GlobalOSMacOSX()
    41         env.ParseConfig('pkg-config --cflags --libs gthread-2.0') 
     43if BJ.linuxTarget or BJ.osxTarget
     44        env.ParseConfig('pkg-config --cflags gthread-2.0') 
    4245 
    43 env.GlobalAddIncludePath(include_path) 
    44 env.GlobalAddDefines(defines) 
    45 env.GlobalUseLibraries(libs) 
    46 env.GlobalAddDoxyfile() 
    47  
    48 env.GlobalStaticLibrary('ortp', sources) 
     46env.Append(CPPPATH = include_path, CPPDEFINES = defines) 
     47ortpobj = env.SharedObject( source=sources )  
     48ortplib = env.StaticLibrary('ortp', source = ortpobj) 
     49Alias('ortp', ortplib) 
     50BJ.DefModule('ortp', includes = [ "#ortp/src" ], libpath = ["#ortp/src"], libs = ["ortp"])   
  • phapi/SConscript

    r6 r7  
    66defines = { } 
    77 
    8 if env['speexwb_replaces_amrwb'] and env['speexwb_replaces_amrnb'] and env['speexwb_replaces_g726wb'] 
     8env = BJ.NewEnv() 
     9 
     10if env['speexwb_replaces_amrwb'] and env['speexwb_replaces_amrnb'] and env['speexwb_replaces_g726wb']: 
    911   print "******* Please Select ONLY ONE of: [ speexwb_replaces_amrwb  speexwb_replaces_amrnb or speexwb_replaces_g726wb]" 
    1012   Exit(1) 
    1113 
    1214 
    13 if env['speexwb_replaces_amrwb'] 
     15if env['speexwb_replaces_amrwb']: 
    1416    amr_defines['PH_SPEEXWB_REPLACES_AMRWB'] = 1 
    1517    speex_defines['PH_SPEEXWB_REPLACES_AMRWB'] = 1 
     
    4648 
    4749 
    48 sppex_env.Append(CPPDEFINES = speex_defines, LIBS = speex_libs, CCFLAGS = BJ.phapi_optimization_flags) 
     50speex_env.Append(CPPDEFINES = speex_defines, LIBS = speex_libs, CCFLAGS = BJ.phapi_optimization_flags) 
    4951speex = BJ.Plugin(speex_env, 'phspeexplugin', ['phcodec-speex.c']) 
    5052 
     
    123125        'BLOCKING_MODE' : 0, 
    124126        'DO_ECHO_CAN' : 1, 
    125         'ENABLE_AMR_WB' : 1
    126         'ENABLE_AMR' : 1
     127        'ENABLE_AMR_WB' : 0
     128        'ENABLE_AMR' : 0
    127129        'MY_DLLEXPORTS' : 1, 
    128130        'USE_WAVEIN_CBK' : 1, 
     
    168170        sources += ['phmedia-oss.c'] 
    169171 
    170         if env['phapi_audio_arts')
     172        if env['phapi_audio_arts']
    171173                defines['ENABLE_ARTS'] = 1 
    172174                sources += ['phmedia-audio-arts.c'] 
     
    242244 
    243245if BJ.linuxTarget: 
    244         if env['disable-alsa']: 
     246        if env['enable_alsa']: 
    245247                defines['ENABLE_ALSA'] = 1 
    246248                libs += ['asound'] 
     
    288290 
    289291 
     292 
     293if BJ.linuxTarget or BJ.osxTarget: 
     294        env.ParseConfig('pkg-config --cflags --libs gthread-2.0') 
     295 
    290296env.Append(CPPPATH = include_path, CPPDEFINES = defines, LINKFLAGS = link_flags, LIBS = libs) 
     297BJ.Prepare(env, ["ortp", "eXosip", "portaudio"]) 
    291298 
    292299if shphapi: 
     
    299306#Depends(phapi, [amr, speex]) 
    300307Depends(phapi, [speex]) 
     308Alias('phapi', phapi) 
    301309 
    302310#pyphapi 
     
    323331 
    324332 
    325 if not BJ.win32Target and not BJ.osxTarget
     333if not BJ.win32Target and not BJ.osxTarget and "testec" in BUILD_TARGETS
    326334    tenv = BJ.NewEnv() 
    327     tec = tenv.Program(target = 'testec',  source = ['testec.c', 'spxec.c', 'spxecfft.c'],  LIBS='m') 
     335    tecobjs = tenv.Object(['testec.c', 'spxec.c', 'spxecfft.c']) 
     336    tec = tenv.Program(target = 'testec',  source = tecobjs, LIBS = ['m']) 
    328337    Alias('testec',  tec) 
    329338 
  • phapi/speex/SConscript

    r6 r7  
    55if BJ.osxTarget: 
    66        env.Autoconf('speex', ['libspeex/.libs/libspeex.la']) 
    7         BJ.Module('speex', includes = ['include'], libpath, 'speex') 
     7        BJ.DefModule('speex', ['include'], None, 'speex') 
    88 
    99else: 
  • phapi/speex/libspeex/SConscript

    r6 r7  
    4343includes = [] 
    4444libpath = [] 
    45 node = Null 
     45node = None 
    4646# this is private WIN32 specific include 
    4747if BJ.win32Target: 
     
    5757 
    5858 
    59 BJ.Module("speex", includes, libpath, "speex")   
     59BJ.DefModule("speex", includes, libpath, "speex")   
    6060