Changeset 34:7ae1d360e460
- Timestamp:
- 08/23/06 17:46:12 (2 years ago)
- Files:
-
- Env/BuildJob.py (modified) (5 diffs)
- SConscript (modified) (3 diffs)
- SConstruct (modified) (4 diffs)
- SOptions (modified) (2 diffs)
- libosip2/SConscript (modified) (1 diff)
- libs/curl/SConscript (modified) (2 diffs)
- libs/curl/lib/setup.h (modified) (2 diffs)
- libs/portaudio/SConscript (modified) (1 diff)
- miniua/SConscript (modified) (2 diffs)
- ortp/SConscript (modified) (2 diffs)
- ortp/src/rtpport.h (modified) (1 diff)
- phapi/SConscript (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Env/BuildJob.py
r21 r34 64 64 self.targetos = env["target_os"] 65 65 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 67 80 self.win32Target = self.targetos == "win32" 68 81 self.posixTarget = self.targetos in [ "linux", "osx" ] … … 70 83 self.bsdTarget = "BSD" in self.targetos 71 84 72 self.cc = env["CC"]73 85 self.msvc = self.cc == "cl" 74 86 self.gcc = ("gcc" in self.cc) or ("mingw" in self.cc) … … 77 89 self.opts = opts 78 90 79 if self.mingw: 91 if self.armlinuxTarget: 92 self.buildpath = "armlinux" 93 elif self.mingw: 80 94 self.buildpath = "mingw" 81 95 elif self.win32Target: … … 128 142 print msg, l 129 143 130 # showprep("Before preparing")144 #showprep("Before preparing") 131 145 usedComponents = [ self.components[x] for x in ( Set(uses) & Set(self.components.keys())) ] 132 146 for m in usedComponents: 133 147 m.use(env) 134 148 135 # showprep("After preparing")149 #showprep("After preparing") 136 150 137 151 … … 139 153 140 154 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) 142 158 143 159 SConscript
r22 r34 40 40 env = BJ.NewEnv() 41 41 42 print "SConscript Compiling with", env.subst('$CC') 43 42 44 projects = [] 43 45 … … 56 58 57 59 58 59 60 projects += [ 60 61 'libs/openssl', … … 67 68 'phapi/stun', 68 69 'phapi/gsm', 69 'phapi/ilbc',70 'phapi/speex',70 # 'phapi/ilbc', 71 # 'phapi/speex', 71 72 'phapi', 72 73 'miniua' SConstruct
r22 r34 7 7 BoolOption('video', "Enable Video Support", False), 8 8 BoolOption('ssl', "Enable SSL support", True), 9 BoolOption('httptunnel', "Enable HTTP tunneling support", True),9 BoolOption('httptunnel', "Enable HTTP tunneling support", False), 10 10 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), 12 12 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), 14 14 BoolOption('vcproj', "Build .vcproj files for use with debugger", False), 15 15 BoolOption('libsamplerate', "Enable usage of libsamplerate", False), … … 24 24 BoolOption('amr', "Enable usage of AMR codec", False), 25 25 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), 27 27 BoolOption('qos_debug', "Enable QoS debugging functionality", False), 28 28 BoolOption('enable_alsa', "Disable ALSA driver", False), … … 36 36 37 37 env = BJ.NewEnv() 38 print "SConstruct Compiling with ", env['CC'] 38 39 39 40 #Duplicate = 0 is very important: it tells SCons … … 45 46 46 47 48 print "SConstruct Building in ", BJ.buildpath 47 49 48 50 env.SConscript('SConscript', build_dir = BJ.buildpath, duplicate = 0) SOptions
r0 r34 8 8 'enable-video' : 1, 9 9 'enable-ssl' : 1, 10 'enable-http-tunnel' : 1,10 'enable-http-tunnel' : 0, 11 11 'enable-netlib' : 1, 12 'enable-phapi-embed' : 0,12 'enable-phapi-embed' : 1, 13 13 'enable-phapi-video-hack' : 0, 14 14 'enable-shared-phapi' : 1, … … 32 32 33 33 #if 1 replace negotiated G726-WB payload by SPEEX WB 34 'speexwb-replaces-g726wb' : 1,34 'speexwb-replaces-g726wb' : 0, 35 35 36 36 'enable-ipp' : 0, libosip2/SConscript
r19 r34 86 86 defines['WIN32'] = 1 87 87 88 if BJ.linuxTarget or BJ.bsdTarget :88 if BJ.linuxTarget or BJ.bsdTarget or BJ.armlinuxTarget: 89 89 defines.update({ 90 90 'HAVE_PTHREAD' : 1, libs/curl/SConscript
r22 r34 89 89 ] 90 90 91 92 if BJ.armlinuxTarget: 93 defines['__armlinux'] = 1 94 91 95 if BJ.win32Target: 92 96 libs += [ … … 110 114 111 115 112 113 116 env.Append(CPPPATH = include_path, CPPDEFINES = defines, LIBS = libs) 114 117 115 118 BJ.Use(env, uses) 116 119 117 if BJ.osxTarget :120 if BJ.osxTarget or BJ.armlinuxTarget: 118 121 lib=env.StaticLibrary('veronacurl', sources) 119 122 else: libs/curl/lib/setup.h
r0 r34 83 83 #endif 84 84 85 //halina 86 #if defined(__armlinux) 87 #include "config-armlinux.h" 88 #else 89 //!halina 85 90 #if defined(__linux__) || defined(__linux) 86 91 /* hand-modified Linux config.h! */ … … 88 93 #elif defined(__FreeBSD__) 89 94 #include "config-freebsd.h" 95 #endif 90 96 #endif 91 97 //!tanguy_k libs/portaudio/SConscript
r26 r34 132 132 sources += sources_oss 133 133 134 elif 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 134 149 elif BJ.osxTarget: 135 150 defines['PA_BIG_ENDIAN'] = 1 miniua/SConscript
r22 r34 5 5 env = BJ.NewEnv() 6 6 7 defines = { 'PHAPI_DLL' : 1} 7 if BJ.armlinuxTarget: 8 defines = { } 9 else: 10 defines = { 'PHAPI_DLL' : 1} 8 11 9 12 … … 30 33 31 34 35 if BJ.linuxTarget: 36 libs += ["z", "veronacurl", "portaudio"] 32 37 38 env.ParseConfig('pkg-config alsa --cflags --libs') 33 39 40 if env["video"]: 41 env.ParseConfig('sdl-config --cflags --libs') 34 42 35 if BJ. linuxTarget:43 if BJ.armlinuxTarget: 36 44 libs += ["z", "veronacurl", "portaudio"] 37 45 ortp/SConscript
r19 r34 37 37 defines['USE_HTTP_TUNNEL'] = 1 38 38 39 40 if BJ.armlinuxTarget: 41 defines['__armlinux'] = 1 42 39 43 if BJ.win32Target: 40 44 defines['WIN32'] = 1 … … 43 47 if BJ.linuxTarget or BJ.osxTarget: 44 48 env.ParseConfig('pkg-config --cflags --libs gthread-2.0') 49 45 50 46 51 env.Append(CPPPATH = include_path, CPPDEFINES = defines) ortp/src/rtpport.h
r0 r34 27 27 28 28 #ifndef _WIN32 /* do not include ortp-config.h when we are on win32 */ 29 #ifdef __armlinux 30 #include <ortp-config-armlinux.h> 31 #else 29 32 #include <ortp-config.h> 33 #endif 30 34 #else 31 35 #include "ortp-config-win32.h" phapi/SConscript
r22 r34 8 8 env = BJ.NewEnv() 9 9 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']: 10 if 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 57 if env['ipp']: 56 58 IPPROOT = False 57 59 IPPSAMPLEROOT = False … … 167 169 ] 168 170 169 if BJ.linuxTarget or BJ.bsdTarget :171 if BJ.linuxTarget or BJ.bsdTarget or BJ.armlinuxTarget: 170 172 sources += ['phmedia-oss.c'] 171 173 … … 183 185 defines['SCHEDULING_MODE'] = 1 184 186 185 if BJ.osxTarget :187 if BJ.osxTarget or BJ.armlinuxTarget: 186 188 shphapi = False 187 189 else: … … 196 198 defines['PHAPI_QOS_DEBUG'] = 1 197 199 198 if BJ.linuxTarget :200 if BJ.linuxTarget or BJ.armlinuxTarget: 199 201 libs += ['pthread', 'rt'] 200 202 … … 243 245 env.ParseConfig('pkg-config --cflags --libs gthread-2.0') 244 246 245 if BJ.linuxTarget :247 if BJ.linuxTarget or BJ.armlinuxTarget: 246 248 if env['enable_alsa']: 247 249 defines['ENABLE_ALSA'] = 1 … … 294 296 env.ParseConfig('pkg-config --cflags --libs gthread-2.0') 295 297 298 299 if BJ.armlinuxTarget: 300 defines['__armlinux'] = 1 301 296 302 env.Append(CPPPATH = include_path, CPPDEFINES = defines, LINKFLAGS = link_flags, LIBPATH = ["ilbc", "stun", "gsm"]) 297 303 BJ.Use(env, libs) … … 307 313 308 314 #Depends(phapi, [amr, speex]) 309 Depends(phapi, [speex]) 315 316 if not BJ.armlinuxTarget: 317 Depends(phapi, [speex]) 318 310 319 Alias('phapi', phapi) 311 320
