Home | History | Annotate | Download | only in PCbuild
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      3   <Import Project="pyproject.props" />
      4 
      5   <PropertyGroup Label="Configuration">
      6     <ConfigurationType>StaticLibrary</ConfigurationType>
      7     <IntDir>$(opensslDir)tmp\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
      8     <IntDir Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(opensslDir)tmp\$(ArchName)\$(ProjectName)\</IntDir>
      9   </PropertyGroup>
     10 
     11   <ItemGroup>
     12     <PreprocessorDefinitions Include="DSO_WIN32" />
     13     <PreprocessorDefinitions Include="WIN32_LEAN_AND_MEAN" />
     14     <PreprocessorDefinitions Include="L_ENDIAN" />
     15     <PreprocessorDefinitions Include="_CRT_SECURE_NO_WARNINGS" />
     16     <PreprocessorDefinitions Include="_CRT_SECURE_NO_DEPRECATE" />
     17     <PreprocessorDefinitions Include="OPENSSL_THREADS" />
     18     <!-- <PreprocessorDefinitions Include="OPENSSL_SYSNAME_WIN32" /> -->
     19     <PreprocessorDefinitions Include="OPENSSL_IA32_SSE2" />
     20     <PreprocessorDefinitions Include="SHA1_ASM" />
     21     <PreprocessorDefinitions Include="SHA256_ASM" />
     22     <PreprocessorDefinitions Include="SHA512_ASM" />
     23     <PreprocessorDefinitions Include="MD5_ASM" />
     24     <PreprocessorDefinitions Include="AES_ASM" />
     25     <PreprocessorDefinitions Include="VPAES_ASM" />
     26     <PreprocessorDefinitions Include="WHIRLPOOL_ASM" />
     27     <PreprocessorDefinitions Include="GHASH_ASM" />
     28     <PreprocessorDefinitions Include="OPENSSL_NO_IDEA" />
     29     <PreprocessorDefinitions Include="OPENSSL_NO_RC5" />
     30     <PreprocessorDefinitions Include="OPENSSL_NO_MD2" />
     31     <PreprocessorDefinitions Include="OPENSSL_NO_MDC2" />
     32     <PreprocessorDefinitions Include="OPENSSL_NO_KRB5" />
     33     <PreprocessorDefinitions Include="OPENSSL_NO_JPAKE" />
     34     <PreprocessorDefinitions Include="OPENSSL_NO_RDRAND" />
     35     <PreprocessorDefinitions Include="OPENSSL_NO_RSAX" />
     36     <PreprocessorDefinitions Include="OPENSSL_NO_DYNAMIC_ENGINE" />
     37   </ItemGroup>
     38   <ItemGroup Condition="'$(Platform)'=='Win32'">
     39     <PreprocessorDefinitions Include="OPENSSL_BN_ASM_GF2m" />
     40     <PreprocessorDefinitions Include="OPENSSL_BN_ASM_PART_WORDS" />
     41     <PreprocessorDefinitions Include="OPENSSL_BN_ASM_MONT" />
     42     <PreprocessorDefinitions Include="RMD160_ASM" />
     43   </ItemGroup>
     44 
     45   <PropertyGroup>
     46     <_PreprocessorDefinitionList>@(PreprocessorDefinitions)</_PreprocessorDefinitionList>
     47   </PropertyGroup>
     48 
     49   <ItemDefinitionGroup>
     50     <ClCompile>
     51       <!-- Suppress 64-bit truncation warnings - they aren't ours to worry about -->
     52       <DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
     53       <AdditionalIncludeDirectories>$(opensslDir);$(opensslIncludeDir);$(opensslDir)crypto;$(opensslDir)crypto\asn1;$(opensslDir)crypto\evp;$(opensslDir)crypto\modes</AdditionalIncludeDirectories>
     54       <PreprocessorDefinitions>$(_PreprocessorDefinitionList);%(PreprocessorDefinitions)</PreprocessorDefinitions>
     55     </ClCompile>
     56   </ItemDefinitionGroup>
     57 
     58   <Target Name="FindNasm">
     59     <PropertyGroup>
     60       <nasm Condition="$(Platform) == 'Win32'">nasm.exe -f win32</nasm>
     61       <nasm Condition="$(Platform) == 'x64'">nasm.exe -f win64 -DNEAR -Ox -g</nasm>
     62     </PropertyGroup>
     63   </Target>
     64 
     65   <Target Name="BuildNasmFiles" BeforeTargets="PreBuildEvent" DependsOnTargets="PrepareForBuild;FindNasm" Inputs="@(NasmCompile)" Outputs="@(NasmCompile->'$(IntDir)%(Filename).obj')">
     66     <Exec Command='setlocal
     67 set PATH=$(nasmDir);%PATH%
     68 $(nasm) -o "$(IntDir)%(NasmCompile.Filename).obj" "%(NasmCompile.FullPath)"' />
     69     <ItemGroup>
     70       <Link Include="$(IntDir)%(NasmCompile.Filename).obj" />
     71       <Lib Include="$(IntDir)%(NasmCompile.Filename).obj" />
     72     </ItemGroup>
     73   </Target>
     74 </Project>
     75