You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <PropertyGroup>
  4. <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(opensslDir)tmp\</Py_IntDir>
  5. </PropertyGroup>
  6. <Import Project="pyproject.props" />
  7. <PropertyGroup Label="Configuration">
  8. <ConfigurationType>StaticLibrary</ConfigurationType>
  9. </PropertyGroup>
  10. <ItemGroup>
  11. <PreprocessorDefinitions Include="DSO_WIN32" />
  12. <PreprocessorDefinitions Include="WIN32_LEAN_AND_MEAN" />
  13. <PreprocessorDefinitions Include="L_ENDIAN" />
  14. <PreprocessorDefinitions Include="_CRT_SECURE_NO_WARNINGS" />
  15. <PreprocessorDefinitions Include="_CRT_SECURE_NO_DEPRECATE" />
  16. <PreprocessorDefinitions Include="OPENSSL_THREADS" />
  17. <!-- <PreprocessorDefinitions Include="OPENSSL_SYSNAME_WIN32" /> -->
  18. <PreprocessorDefinitions Include="OPENSSL_IA32_SSE2" />
  19. <PreprocessorDefinitions Include="OPENSSL_BN_ASM_GF2m" />
  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_PART_WORDS" />
  40. <PreprocessorDefinitions Include="OPENSSL_BN_ASM_MONT" />
  41. <PreprocessorDefinitions Include="RMD160_ASM" />
  42. </ItemGroup>
  43. <PropertyGroup>
  44. <_PreprocessorDefinitionList>@(PreprocessorDefinitions)</_PreprocessorDefinitionList>
  45. </PropertyGroup>
  46. <ItemDefinitionGroup>
  47. <ClCompile>
  48. <!-- Suppress 64-bit truncation warnings - they aren't ours to worry about -->
  49. <DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
  50. <AdditionalIncludeDirectories>$(opensslDir);$(opensslIncludeDir);$(opensslDir)crypto;$(opensslDir)crypto\asn1;$(opensslDir)crypto\evp;$(opensslDir)crypto\modes</AdditionalIncludeDirectories>
  51. <PreprocessorDefinitions>$(_PreprocessorDefinitionList);%(PreprocessorDefinitions)</PreprocessorDefinitions>
  52. </ClCompile>
  53. </ItemDefinitionGroup>
  54. <Target Name="FindNasm">
  55. <PropertyGroup>
  56. <nasm Condition="$(Platform) == 'Win32'">nasm.exe -f win32</nasm>
  57. <nasm Condition="$(Platform) == 'x64'">nasm.exe -f win64 -DNEAR -Ox -g</nasm>
  58. </PropertyGroup>
  59. </Target>
  60. <Target Name="BuildNasmFiles" BeforeTargets="PreBuildEvent" DependsOnTargets="PrepareForBuild;FindNasm" Inputs="@(NasmCompile)" Outputs="@(NasmCompile->'$(IntDir)%(Filename).obj')">
  61. <Exec Command='setlocal
  62. set PATH=$(nasmDir);%PATH%
  63. $(nasm) -o "$(IntDir)%(NasmCompile.Filename).obj" "%(NasmCompile.FullPath)"' />
  64. <ItemGroup>
  65. <Link Include="$(IntDir)%(NasmCompile.Filename).obj" />
  66. <Lib Include="$(IntDir)%(NasmCompile.Filename).obj" />
  67. </ItemGroup>
  68. </Target>
  69. </Project>