,Rc@sdZdZddlZddlZddlZddlmZmZddlm Z ddl m Z ddl m Z mZmZddlmZmZmZmZdd lmZejd krddlZnd e fd YZdS( s9distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library search directories specified with -Ldir * compile handled by 'cc' (or similar) executable with -c option: compiles .c to .o * link static library handled by 'ar' command (possibly with 'ranlib') * link shared library handled by 'cc -shared' s$Id$iN(t StringTypetNoneType(t sysconfig(tnewer(t CCompilertgen_preprocess_optionstgen_lib_options(tDistutilsExecErrort CompileErrortLibErrort LinkError(tlogtdarwint UnixCCompilerc BsgeZdZid&d6dgd6dgd6dgd6ddgd6dgd6d d gd 6d&d 6Zejd dkrd ged t target_langtoutput_filenameR.((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pytcreate_static_lib|s cCs?|j||\}}|j|||\}}}t||||}t|ttfkrotdn|dk rtj j ||}n|j ||r+||j |d|g}| rdg|d*n| r| |d*n| r|j | n|jtj j|y|tjkr7|j}n |j}| dkr|jrd}tj j|ddkrd}x!d||kr|d}qWnd ||kr|d}n|jd||(R$t target_descR=RAR9t librariest library_dirstruntime_library_dirstexport_symbolsR>R)R*t build_tempR@tlib_optstld_argstlinkertiR.((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pytlinksH        cCsd|S(Ns-L((R$tdir((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pytlibrary_dir_optionscCsd|kpd|kS(Ntgccsg++((R$t compiler_name((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pyt_is_gccscCstjjtjd}tjd dkr6d|Stjd dkrt|j|rfdd|gSdd|gStjd d kstjd d krd |gS|j|rd |Sd|SdS(NtCCiR s-Lishp-uxs-Wl,+ss+sitirix646tosf1V5s-rpaths-Wl,-Rs-R(R R!RKRtget_config_varR0R1R[(R$RWR((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pytruntime_library_dir_options & cCsd|S(Ns-l((R$tlib((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pytlibrary_optionscCs|j|dd}|j|dd}|j|dd}tjdkrtjd}tjd|}|dkrd} q|jd } nx#|D]} t j j | |} t j j | |} t j j | |} tjdkrv| j d s| j d rv| j d  rvt j j | | d |} t j j | | d |} t j j | | d |} nt j j | r| St j j | r| St j j | r| SqWdS( Ntlib_typetsharedtdylibtstaticR tCFLAGSs-isysroot\s+(\S+)t/is/System/s/usr/s /usr/local/(R;R0R1RR_tretsearchRtgroupR R!RIt startswithtexists(R$tdirsRaR>tshared_ftdylib_ftstatic_ftcflagstmtsysrootRWRdReRf((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pytfind_library_files4   N(t__name__t __module__t compiler_typeRt executablesR0R1tsrc_extensionst obj_extensiontstatic_lib_extensiontshared_lib_extensiontdylib_lib_extensiontstatic_lib_formattshared_lib_formattdylib_lib_formatt exe_extensionR/R8RBRVRXR[R`RbRu(((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pyR 0s@            9    (t__doc__t __revision__R R0RittypesRRt distutilsRtdistutils.dep_utilRtdistutils.ccompilerRRRtdistutils.errorsRRR R R R1R2R (((s8/opt/freeware/lib64/python2.7/distutils/unixccompiler.pyts$"