• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1############################################################################
2# Copyright 2016-2017 Intel Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15############################################################################
16
17Import('*')
18
19env.PartName("verifysig")
20
21src_files = Pattern(src_dir='src/',
22                        includes=['*.c'],
23                        recursive=True).files()
24
25inc_files = Pattern(src_dir='src/',
26                        includes=['*.h'],
27                        recursive=True).files()
28
29parts_file = ['verifysig.parts']
30
31if 'install_package' in env['MODE']:
32    env.InstallTopLevel(src_files + inc_files, sub_dir='example/${PART_SHORT_NAME}/src')
33    env.InstallTopLevel(parts_file, sub_dir='example/${PART_SHORT_NAME}')
34
35else:
36    env.DependsOn([
37        Component('verifier'),
38        Component('util'),
39        Component('argtable3')
40    ])
41
42    env.Append(CPPPATH='#/example/verifysig')
43
44    if env['TARGET_PLATFORM']['OS'] == 'win32':
45        if env.isConfigBasedOn('debug'):
46            env['PDB'] = '${PART_NAME}.pdb'
47
48    outputs = env.Program('${PART_NAME}', src_files,
49                          no_import_lib=True)
50
51    env.InstallBin(outputs,
52                   no_pkg=False,
53                   INSTALL_BIN='${INSTALL_SAMPLE_BIN}')
54