Changeset 34:7ae1d360e460

Show
Ignore:
Timestamp:
08/23/06 17:46:12 (2 years ago)
Author:
halina@ada
Message:

compiles for armlinux

Files:

Legend:

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

    r21 r34  
    6464          self.targetos = env["target_os"] 
    6565 
    66           self.linuxTarget = "linux" in self.targetos 
     66 
     67          self.cc = os.environ['CC'] 
     68          print "self CC is ", self.cc 
     69           
     70          self.cf = os.environ['CFLAGS'] 
     71          print "self CFLAGS is ", self.cf 
     72           
     73          self.armlinuxTarget = "arm-linux" in self.cc 
     74           
     75          if not self.armlinuxTarget: 
     76             self.linuxTarget = "linux" in self.targetos 
     77          else:    
     78             self.linuxTarget = 0 
     79              
    6780          self.win32Target = self.targetos == "win32" 
    6881          self.posixTarget = self.targetos in [ "linux", "osx" ] 
     
    7083          self.bsdTarget = "BSD" in self.targetos 
    7184           
    72           self.cc = env["CC"] 
    7385          self.msvc = self.cc == "cl" 
    7486          self.gcc =  ("gcc" in self.cc) or ("mingw" in self.cc)  
     
    7789          self.opts = opts 
    7890           
    79           if self.mingw: 
     91          if self.armlinuxTarget: 
     92               self.buildpath = "armlinux" 
     93          elif self.mingw: 
    8094              self.buildpath = "mingw" 
    8195          elif self.win32Target: 
     
    128142              print msg, l 
    129143 
    130           # showprep("Before preparing") 
     144          #showprep("Before preparing") 
    131145          usedComponents = [ self.components[x] for x in ( Set(uses) & Set(self.components.keys())) ] 
    132146          for m in usedComponents: 
    133147              m.use(env) 
    134148               
    135           # showprep("After preparing") 
     149          #showprep("After preparing") 
    136150 
    137151 
     
    139153 
    140154    def NewEnv(self): 
    141           return Environment(options = self.opts) 
     155         
     156          return Environment(CC = self.cc,  options = self.opts) 
     157#          return Environment(CC = self.cc, CPPFLAGS = self.cf,  options = self.opts) 
    142158 
    143159 
  • SConscript

    r22 r34  
    4040env = BJ.NewEnv() 
    4141 
     42print "SConscript Compiling with", env.subst('$CC') 
     43 
    4244projects = [] 
    4345 
     
    5658 
    5759 
    58  
    5960projects += [ 
    6061        'libs/openssl', 
     
    6768        'phapi/stun', 
    6869        'phapi/gsm', 
    69       'phapi/ilbc', 
    70       'phapi/speex', 
     70#     'phapi/ilbc', 
     71#     'phapi/speex', 
    7172        'phapi', 
    7273        'miniua' 
  • SConstruct

    r22 r34  
    77        BoolOption('video', "Enable Video Support", False), 
    88        BoolOption('ssl', "Enable SSL support",  True), 
    9         BoolOption('httptunnel', "Enable HTTP tunneling support", True), 
     9        BoolOption('httptunnel', "Enable HTTP tunneling support", False), 
    1010        BoolOption('netlib',  "Enable netlib module support", False), 
    11         BoolOption('phapi_embed',  'Compile PHPAPI for embedded environment', False), 
     11        BoolOption('phapi_embed',  'Compile PHPAPI for embedded environment', True), 
    1212        BoolOption('phapi_video_hack', "enable VIDEO HACK", False), 
    13         BoolOption('shared_phapi', "Compile PHAPI as shared library", True), 
     13        BoolOption('shared_phapi', "Compile PHAPI as shared library", False), 
    1414        BoolOption('vcproj',  "Build .vcproj files for use with debugger", False), 
    1515        BoolOption('libsamplerate', "Enable usage of libsamplerate", False), 
     
    2424        BoolOption('amr', "Enable usage of AMR codec", False), 
    2525        BoolOption('debug', "Enable debug build", True), 
    26         BoolOption('enable_phapi_embed', "Enable EMBEDDED version of PHAPI", False), 
     26        BoolOption('enable_phapi_embed', "Enable EMBEDDED version of PHAPI", True), 
    2727        BoolOption('qos_debug', "Enable QoS debugging functionality", False), 
    2828        BoolOption('enable_alsa', "Disable ALSA driver", False), 
     
    3636 
    3737env = BJ.NewEnv() 
     38print "SConstruct Compiling with ", env['CC'] 
    3839 
    3940#Duplicate = 0 is very important: it tells SCons 
     
    4546 
    4647 
     48print "SConstruct Building in ", BJ.buildpath 
    4749 
    4850env.SConscript('SConscript', build_dir = BJ.buildpath,  duplicate = 0) 
  • SOptions

    r0 r34  
    88        'enable-video' : 1, 
    99        'enable-ssl' : 1, 
    10         'enable-http-tunnel' : 1
     10        'enable-http-tunnel' : 0
    1111        'enable-netlib' : 1, 
    12         'enable-phapi-embed' : 0
     12        'enable-phapi-embed' : 1
    1313        'enable-phapi-video-hack' : 0, 
    1414        'enable-shared-phapi' : 1, 
     
    3232 
    3333        #if 1 replace negotiated G726-WB payload by SPEEX WB 
    34         'speexwb-replaces-g726wb' : 1
     34        'speexwb-replaces-g726wb' : 0
    3535 
    3636        'enable-ipp' : 0, 
  • libosip2/SConscript

    r19 r34  
    8686        defines['WIN32'] = 1 
    8787 
    88 if BJ.linuxTarget or BJ.bsdTarget
     88if BJ.linuxTarget or BJ.bsdTarget or BJ.armlinuxTarget
    8989        defines.update({ 
    9090                'HAVE_PTHREAD' : 1, 
  • libs/curl/SConscript

    r22 r34  
    8989] 
    9090 
     91 
     92if BJ.armlinuxTarget: 
     93        defines['__armlinux'] = 1 
     94 
    9195if BJ.win32Target: 
    9296        libs += [ 
     
    110114 
    111115 
    112  
    113116env.Append(CPPPATH = include_path, CPPDEFINES = defines, LIBS = libs) 
    114117 
    115118BJ.Use(env, uses) 
    116119 
    117 if BJ.osxTarget
     120if BJ.osxTarget or BJ.armlinuxTarget
    118121        lib=env.StaticLibrary('veronacurl', sources) 
    119122else: 
  • libs/curl/lib/setup.h

    r0 r34  
    8383#endif 
    8484 
     85//halina 
     86#if defined(__armlinux) 
     87#include "config-armlinux.h" 
     88#else 
     89//!halina 
    8590#if defined(__linux__) || defined(__linux) 
    8691/* hand-modified Linux config.h! */ 
     
    8893#elif defined(__FreeBSD__) 
    8994#include "config-freebsd.h" 
     95#endif 
    9096#endif 
    9197//!tanguy_k 
  • libs/portaudio/SConscript

    r26 r34  
    132132                sources += sources_oss 
    133133 
     134elif BJ.armlinuxTarget: 
     135        defines['PA_LITTLE_ENDIAN'] = 1 
     136        defines['HAVE_LIBPTHREAD'] = 1 
     137        libs += ['pthread', 'm'] 
     138        sources += sources_linux 
     139        headers += headers_linux 
     140        if not env['portaudio_oss']: 
     141                defines['PA_USE_ALSA'] = 1 
     142                libs += ['libasound'] 
     143                sources += sources_alsa 
     144                headers += headers_alsa 
     145        else: 
     146                defines['PA_USE_OSS'] = 1 
     147                sources += sources_oss 
     148 
    134149elif BJ.osxTarget: 
    135150        defines['PA_BIG_ENDIAN'] = 1 
  • miniua/SConscript

    r22 r34  
    55env = BJ.NewEnv() 
    66 
    7 defines = { 'PHAPI_DLL' : 1} 
     7if BJ.armlinuxTarget: 
     8   defines = { } 
     9else: 
     10   defines = { 'PHAPI_DLL' : 1} 
    811 
    912 
     
    3033 
    3134 
     35if BJ.linuxTarget: 
     36   libs += ["z", "veronacurl", "portaudio"] 
    3237 
     38   env.ParseConfig('pkg-config alsa --cflags --libs') 
    3339 
     40   if env["video"]: 
     41       env.ParseConfig('sdl-config --cflags --libs') 
    3442 
    35 if BJ.linuxTarget: 
     43if BJ.armlinuxTarget: 
    3644   libs += ["z", "veronacurl", "portaudio"] 
    3745 
  • ortp/SConscript

    r19 r34  
    3737        defines['USE_HTTP_TUNNEL'] = 1 
    3838 
     39 
     40if BJ.armlinuxTarget: 
     41        defines['__armlinux'] = 1 
     42         
    3943if BJ.win32Target: 
    4044        defines['WIN32'] = 1 
     
    4347if BJ.linuxTarget or BJ.osxTarget: 
    4448        env.ParseConfig('pkg-config --cflags --libs gthread-2.0') 
     49 
    4550 
    4651env.Append(CPPPATH = include_path, CPPDEFINES = defines) 
  • ortp/src/rtpport.h

    r0 r34  
    2727 
    2828#ifndef _WIN32  /* do not include ortp-config.h when we are on win32 */ 
     29#ifdef __armlinux 
     30#include <ortp-config-armlinux.h> 
     31#else 
    2932#include <ortp-config.h> 
     33#endif 
    3034#else 
    3135#include "ortp-config-win32.h" 
  • phapi/SConscript

    r22 r34  
    88env = BJ.NewEnv() 
    99 
    10 if env['speexwb_replaces_amrwb'] and env['speexwb_replaces_amrnb'] and env['speexwb_replaces_g726wb']: 
    11    print "******* Please Select ONLY ONE of: [ speexwb_replaces_amrwb  speexwb_replaces_amrnb or speexwb_replaces_g726wb]" 
    12    Exit(1) 
    13  
    14  
    15 if env['speexwb_replaces_amrwb']: 
    16     amr_defines['PH_SPEEXWB_REPLACES_AMRWB'] = 1 
    17     speex_defines['PH_SPEEXWB_REPLACES_AMRWB'] = 1 
    18     defines['PH_SPEEXWB_REPLACES_AMRWB'] = 1 
    19 elif env['speexwb_replaces_amrnb']: 
    20     amr_defines['PH_SPEEXWB_REPLACES_AMRNB'] = 1     
    21     speex_defines['PH_SPEEXWB_REPLACES_AMRNB'] = 1     
    22     defines['PH_SPEEXWB_REPLACES_AMRNB'] = 1     
    23 elif env['speexwb_replaces_g726wb']: 
    24     amr_defines['PH_SPEEXWB_REPLACES_G726WB'] = 1     
    25     speex_defines['PH_SPEEXWB_REPLACES_G726WB'] = 1     
    26     defines['PH_SPEEXWB_REPLACES_G726WB'] = 1     
    27  
    28  
    29  
    30 if env["amr"]: 
    31         amr_env = BJ.NewEnv() 
    32         amr_libs = [ 
    33                 'amrwb', 
    34                 'amrnb', 
    35         ] 
    36  
    37  
    38         amr_env.Append(CPPDEFINES = amr_defines, LIBS = amr_libs, CCFLAGS = BJ.phapi_optimization_flags) 
    39         amr = BJ.Plugin(amr_env, 'phamrplugin', ['phcodec-amr-wrapper.c']) 
    40  
    41  
    42  
    43 speex_env = BJ.NewEnv() 
    44 speex_libs = [ 
    45         'speex', 
    46 
    47  
    48  
    49  
    50 speex_env.Append(CPPDEFINES = speex_defines, LIBS = speex_libs, CCFLAGS = BJ.phapi_optimization_flags) 
    51 speex = BJ.Plugin(speex_env, 'phspeexplugin', ['phcodec-speex.c']) 
    52  
    53  
    54  
    55 if speex_env['ipp']: 
     10if not BJ.armlinuxTarget: 
     11 
     12   if env['speexwb_replaces_amrwb'] and env['speexwb_replaces_amrnb'] and env['speexwb_replaces_g726wb']: 
     13      print "******* Please Select ONLY ONE of: [ speexwb_replaces_amrwb  speexwb_replaces_amrnb or speexwb_replaces_g726wb]" 
     14      Exit(1) 
     15 
     16 
     17   if env['speexwb_replaces_amrwb']: 
     18       amr_defines['PH_SPEEXWB_REPLACES_AMRWB'] = 1 
     19       speex_defines['PH_SPEEXWB_REPLACES_AMRWB'] = 1 
     20       defines['PH_SPEEXWB_REPLACES_AMRWB'] = 1 
     21   elif env['speexwb_replaces_amrnb']: 
     22       amr_defines['PH_SPEEXWB_REPLACES_AMRNB'] = 1     
     23       speex_defines['PH_SPEEXWB_REPLACES_AMRNB'] = 1     
     24       defines['PH_SPEEXWB_REPLACES_AMRNB'] = 1     
     25   elif env['speexwb_replaces_g726wb']: 
     26       amr_defines['PH_SPEEXWB_REPLACES_G726WB'] = 1     
     27       speex_defines['PH_SPEEXWB_REPLACES_G726WB'] = 1     
     28       defines['PH_SPEEXWB_REPLACES_G726WB'] = 1     
     29 
     30 
     31 
     32   if env["amr"]: 
     33           amr_env = BJ.NewEnv() 
     34           amr_libs = [ 
     35                   'amrwb', 
     36                   'amrnb', 
     37           ] 
     38 
     39 
     40           amr_env.Append(CPPDEFINES = amr_defines, LIBS = amr_libs, CCFLAGS = BJ.phapi_optimization_flags) 
     41           amr = BJ.Plugin(amr_env, 'phamrplugin', ['phcodec-amr-wrapper.c']) 
     42 
     43 
     44 
     45   speex_env = BJ.NewEnv() 
     46   speex_libs = [ 
     47           'speex', 
     48   ] 
     49 
     50 
     51 
     52   speex_env.Append(CPPDEFINES = speex_defines, LIBS = speex_libs, CCFLAGS = BJ.phapi_optimization_flags) 
     53   speex = BJ.Plugin(speex_env, 'phspeexplugin', ['phcodec-speex.c']) 
     54 
     55 
     56       
     57if env['ipp']: 
    5658    IPPROOT = False 
    5759    IPPSAMPLEROOT = False 
     
    167169] 
    168170 
    169 if BJ.linuxTarget or BJ.bsdTarget
     171if BJ.linuxTarget or BJ.bsdTarget or BJ.armlinuxTarget
    170172        sources += ['phmedia-oss.c'] 
    171173 
     
    183185        defines['SCHEDULING_MODE'] =  1 
    184186 
    185 if BJ.osxTarget
     187if BJ.osxTarget or BJ.armlinuxTarget
    186188        shphapi = False 
    187189else: 
     
    196198        defines['PHAPI_QOS_DEBUG'] =  1 
    197199 
    198 if BJ.linuxTarget
     200if BJ.linuxTarget or BJ.armlinuxTarget
    199201        libs += ['pthread', 'rt'] 
    200202 
     
    243245        env.ParseConfig('pkg-config --cflags --libs gthread-2.0') 
    244246 
    245 if BJ.linuxTarget
     247if BJ.linuxTarget or BJ.armlinuxTarget
    246248        if env['enable_alsa']: 
    247249                defines['ENABLE_ALSA'] = 1 
     
    294296        env.ParseConfig('pkg-config --cflags --libs gthread-2.0') 
    295297 
     298 
     299if BJ.armlinuxTarget: 
     300        defines['__armlinux'] = 1 
     301 
    296302env.Append(CPPPATH = include_path, CPPDEFINES = defines, LINKFLAGS = link_flags,  LIBPATH = ["ilbc", "stun", "gsm"]) 
    297303BJ.Use(env, libs) 
     
    307313 
    308314#Depends(phapi, [amr, speex]) 
    309 Depends(phapi, [speex]) 
     315 
     316if not BJ.armlinuxTarget: 
     317   Depends(phapi, [speex]) 
     318 
    310319Alias('phapi', phapi) 
    311320