Add an option to use crypto source files in generated visual c project

This commit is contained in:
Andrzej Kurek 2019-04-05 05:49:53 -04:00
parent b4b1ae193b
commit 92f91fc9ff

View File

@ -4,7 +4,7 @@
# 2010
#
# Must be run from mbedTLS root or scripts directory.
# Takes no argument.
# Takes "include_crypto" as an argument, off by default.
use warnings;
use strict;
@ -18,10 +18,20 @@ my $vsx_main_file = "$vsx_dir/mbedTLS.$vsx_ext";
my $vsx_sln_tpl_file = "scripts/data_files/vs2010-sln-template.sln";
my $vsx_sln_file = "$vsx_dir/mbedTLS.sln";
my $include_crypto = 0;
if( @ARGV ) {
die "Invalid number of arguments" if scalar @ARGV != 1;
($include_crypto) = @ARGV;
}
my $programs_dir = 'programs';
my $header_dir = 'include/mbedtls';
my $source_dir = 'library';
if( $include_crypto ) {
$source_dir = 'crypto/library';
}
# Need windows line endings!
my $vsx_hdr_tpl = <<EOT;
<ClInclude Include="..\\..\\{NAME}" />\r