• 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("revokekey")
20
21src_files = Pattern(src_dir='src/',
22                    includes=['*.c'],
23                    recursive=True).files()
24
25parts_file = ['revokekey.parts']
26
27if 'install_package' in env['MODE']:
28    env.InstallTopLevel(src_files, sub_dir='tools/${PART_SHORT_NAME}/src')
29    env.InstallTopLevel(parts_file, sub_dir='tools/${PART_SHORT_NAME}')
30else:
31    env.DependsOn([
32        Component('common'),
33        Component('member'),
34        Component('util'),
35        Component('argtable3')
36    ])
37
38    if env['TARGET_PLATFORM']['OS'] == 'win32':
39        if env.isConfigBasedOn('debug'):
40            env['PDB'] = '${PART_NAME}.pdb'
41
42    outputs = env.Program('${PART_NAME}', src_files,
43                          no_import_lib=True)
44
45    env.InstallBin(outputs,
46                   no_pkg=False,
47                   INSTALL_BIN='${INSTALL_TOOLS_BIN}')
48