§
    Ü+ög«  ã                   ó�   — d Z ddlmZmZ ddlmZ d„ Zd„ Zd„ Zed„ ¦   «         Z	ed„ ¦   «         Z
ed	„ ¦   «         Zed
„ ¦   «         ZdS )z)base for all c/c++ programs and librariesé    )ÚUtilsÚErrors)Úconfc                 óÖ   — g }t          j        | ¦  «        D ]Q}t          |t          ¦  «        s|j        }|                     ||                     d¦  «        dz   d…         ¦  «         ŒR|S )zØ
	Returns the file extensions for the list of files given as input

	:param lst: files to process
	:list lst: list of string or :py:class:`waflib.Node.Node`
	:return: list of file extensions
	:rtype: list of string
	ú.é   N)r   Úto_listÚ
isinstanceÚstrÚnameÚappendÚrfind)ÚlstÚretÚxs      ú+/git_repos/avwlv2/waflib/Tools/c_aliases.pyÚget_extensionsr   
   so   € ð 
€Ý
Œ-˜Ñ
Ô
ð #ð #€QÝ	�A•sÑ	Ô	ð Ø„v€1Ø‡*‚*ˆQˆq�wŠw�s‰|Œ|˜aÑÐ Ð Ô!Ñ"Ô"Ð"Ð"Ø€ó    c                  óf  — t          | d         ¦  «        }| d         }g }d                     ¦   «         D ]}||v r|                     d¦  «          nŒd|v sd|v sd|v r|                     d¦  «         d                     ¦   «         D ]}||v r|                     d	¦  «          nŒd
|v r|                     d
¦  «         d|v r|                     d¦  «         dS |dv rTd}|D ] }|dv r|                     ||z   ¦  «         d}Œ!|s-|                      dg ¦  «        st	          j        d| z  ¦  «        ‚|S )a  
	Computes and returns the features required for a task generator by
	looking at the file extensions. This aimed for C/C++ mainly::

		snif_features(source=['foo.c', 'foo.cxx'], type='shlib')
		# returns  ['cxx', 'c', 'cxxshlib', 'cshlib']

	:param source: source files to process
	:type source: list of string or :py:class:`waflib.Node.Node`
	:param type: object type in *program*, *shlib* or *stlib*
	:type type: string
	:return: the list of features for a task generator processing the source files
	:rtype: list of string
	ÚsourceÚtypzcxx cpp c++ cc CÚcxxÚcÚvalaÚgszf f90 F F90 for FORÚfcÚdÚjava)ÚprogramÚshlibÚstlibF)r   r   r   r   TÚfeaturesz;Cannot link from %r, try passing eg: features="c cprogram"?)r   Úsplitr   Úgetr   ÚWafError)ÚkwÚextsr   Úfeatsr   Ú	will_links         r   Úsniff_featuresr*      s’  € õ 	�r˜(”|Ñ$Ô$€Ø	ˆ%„y€Ø	€ð ×
"Ò
"Ñ
$Ô
$ð 	ð 	€QØˆ$€Y€YØ‡<‚<�ÑÔÐØ€5ð ð ˆ4€K€K�6˜T�>�> T¨T \ \Ø‡,‚,ˆsÑÔÐà
×
%Ò
%Ñ
'Ô
'ð 	ð 	€QØˆ$€Y€YØ‡<‚<�ÑÔÐØ€5ð ð ˆ4€K€KØ‡,‚,ˆsÑÔÐà
ˆd€N€NØ‡,‚,ˆvÑÔÐØ	ˆàÐ(Ð(Ð(Ø€)Øð ð €aØÐ"Ð"Ð"Ø	‡L‚L��S‘ÑÔÐØ€IøØ	ð ]˜2Ÿ6š6 *¨bÑ1Ô1ð ]Ý	ŒÐVÐY[Ñ[Ñ	\Ô	\Ð\Ø€r   c                 ó¤   — || d<   t          j        |                      dg ¦  «        ¦  «        t          j        t          di | ¤Ž¦  «        z   | d<   dS )zÏ
	Inserts data in the input dict *kw* based on existing data and on the type of target
	required (typ).

	:param kw: task generator parameters
	:type kw: dict
	:param typ: type of target
	:type typ: string
	r   r"   N© )r   r	   r$   r*   )r&   r   s     r   Úset_featuresr-   L   sP   € ð €€E�Ý”- §¢ z°2Ñ 6Ô 6Ñ7Ô7½%¼-ÍÐH\ÐH\ÐY[ÐH\ÐH\Ñ:]Ô:]Ñ]€€J�€€r   c                 ó2   — t          |d¦  «          | |i |¤ŽS )zÖ
	Alias for creating programs by looking at the file extensions::

		def build(bld):
			bld.program(source='foo.c', target='app')
			# equivalent to:
			# bld(features='c cprogram', source='foo.c', target='app')

	r   ©r-   ©ÚbldÚkr&   s      r   r   r   Y   ó&   € õ ˆb�)ÑÔÐØˆˆQˆ�"ˆˆÐr   c                 ó2   — t          |d¦  «          | |i |¤ŽS )zÚ
	Alias for creating shared libraries by looking at the file extensions::

		def build(bld):
			bld.shlib(source='foo.c', target='app')
			# equivalent to:
			# bld(features='c cshlib', source='foo.c', target='app')

	r    r/   r0   s      r   r    r    g   ó&   € õ ˆb�'ÑÔÐØˆˆQˆ�"ˆˆÐr   c                 ó2   — t          |d¦  «          | |i |¤ŽS )zâ
	Alias for creating static libraries by looking at the file extensions::

		def build(bld):
			bld.stlib(source='foo.cpp', target='app')
			# equivalent to:
			# bld(features='cxx cxxstlib', source='foo.cpp', target='app')

	r!   r/   r0   s      r   r!   r!   u   r5   r   c                 ó2   — t          |d¦  «          | |i |¤ŽS )zÑ
	Alias for creating object files by looking at the file extensions::

		def build(bld):
			bld.objects(source='foo.c', target='app')
			# equivalent to:
			# bld(features='c', source='foo.c', target='app')

	Úobjectsr/   r0   s      r   r8   r8   ƒ   r3   r   N)Ú__doc__Úwaflibr   r   Úwaflib.Configurer   r   r*   r-   r   r    r!   r8   r,   r   r   ú<module>r<      sÞ   ðð
 ,Ð +à  Ð  Ð  Ð  Ð  Ð  Ð  Ð  Ø !Ð !Ð !Ð !Ð !Ð !ðð ð ð 0ð 0ð 0ðd^ð ^ð ^ð ðð ñ „ðð ðð ñ „ðð ðð ñ „ðð ðð ñ „ðð ð r   