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 17 Import('*') 18 19 # Normal stuff that all Parts should have 20 env.PartName("signmsg") 21 22 src_files = Pattern(src_dir='src/', 23 includes=['*.c'], 24 recursive=True).files() 25 inc_files = Pattern(src_dir='src/', 26 includes=['*.h'], 27 recursive=True).files() 28 parts_file = ['signmsg.parts'] 29 30 if 'install_package' in env['MODE']: 31 env.InstallTopLevel(inc_files + src_files, 32 sub_dir='example/${PART_SHORT_NAME}/src') 33 env.InstallTopLevel(parts_file, sub_dir='example/${PART_SHORT_NAME}') 34 else: 35 env.DependsOn([ 36 Component('member'), 37 Component('common'), 38 Component('util'), 39 Component('argtable3') 40 ]) 41 42 env.Append(CPPPATH='#/example/signmsg') 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