Home | History | Annotate | Download | only in common
      1 # pylint:disable=I0011,W0401,W0614,C0103,E0602
      2 ############################################################################
      3 # Copyright 2017 Intel Corporation
      4 #
      5 # Licensed under the Apache License, Version 2.0 (the "License");
      6 # you may not use this file except in compliance with the License.
      7 # You may obtain a copy of the License at
      8 #
      9 #     http://www.apache.org/licenses/LICENSE-2.0
     10 #
     11 # Unless required by applicable law or agreed to in writing, software
     12 # distributed under the License is distributed on an "AS IS" BASIS,
     13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14 # See the License for the specific language governing permissions and
     15 # limitations under the License.
     16 ############################################################################
     17 """Build confioguration for include-only common
     18 
     19 Needed to avoid linking to avoid listing ipp in dependencies when only
     20 depending on headers. Eventually should unify this into single header.
     21 
     22 """
     23 Import('*')
     24 env.PartName('tinycommon')
     25 
     26 include_files = Pattern(src_dir='.',
     27                         includes=['*.h'],
     28                         recursive=False).files()
     29 
     30 install_files = Pattern(src_dir='.',
     31                         includes=[
     32                             '*.h',
     33                             '*.c',
     34                             '*-test.cc',
     35                             '*-testhelper.cc',
     36                             '*.parts'
     37                             'Makefile'],
     38                         recursive=True)
     39 
     40 if 'install_package' in env['MODE']:
     41     env.InstallTopLevel(install_files,
     42                         sub_dir='epid/common')
     43 else:
     44     env.SdkInclude(include_files, sub_dir='epid/common')
     45     if 'install_lib' in env['MODE']:
     46         env.InstallInclude(include_files, sub_dir='epid/common')
     47