blob: 65afcd38c1d788ff3b319e0708be85f2d7f14939 [file] [log] [blame]
Brian Curtin401f9f32012-05-13 11:19:23 -05001<?xml version="1.0" encoding="utf-8"?>
2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup Label="ProjectConfigurations">
Paul Monson8a1657b2019-02-14 08:31:30 -08004 <ProjectConfiguration Include="Debug|ARM">
5 <Configuration>Debug</Configuration>
6 <Platform>ARM</Platform>
7 </ProjectConfiguration>
Steve Dower65e4cb12014-11-22 12:54:57 -08008 <ProjectConfiguration Include="Debug|Win32">
9 <Configuration>Debug</Configuration>
10 <Platform>Win32</Platform>
11 </ProjectConfiguration>
12 <ProjectConfiguration Include="Debug|x64">
13 <Configuration>Debug</Configuration>
14 <Platform>x64</Platform>
15 </ProjectConfiguration>
Paul Monson8a1657b2019-02-14 08:31:30 -080016 <ProjectConfiguration Include="PGInstrument|ARM">
17 <Configuration>PGInstrument</Configuration>
18 <Platform>ARM</Platform>
19 </ProjectConfiguration>
Brian Curtin401f9f32012-05-13 11:19:23 -050020 <ProjectConfiguration Include="PGInstrument|Win32">
21 <Configuration>PGInstrument</Configuration>
22 <Platform>Win32</Platform>
23 </ProjectConfiguration>
24 <ProjectConfiguration Include="PGInstrument|x64">
25 <Configuration>PGInstrument</Configuration>
26 <Platform>x64</Platform>
27 </ProjectConfiguration>
Paul Monson8a1657b2019-02-14 08:31:30 -080028 <ProjectConfiguration Include="PGUpdate|ARM">
29 <Configuration>PGUpdate</Configuration>
30 <Platform>ARM</Platform>
31 </ProjectConfiguration>
Brian Curtin401f9f32012-05-13 11:19:23 -050032 <ProjectConfiguration Include="PGUpdate|Win32">
33 <Configuration>PGUpdate</Configuration>
34 <Platform>Win32</Platform>
35 </ProjectConfiguration>
36 <ProjectConfiguration Include="PGUpdate|x64">
37 <Configuration>PGUpdate</Configuration>
38 <Platform>x64</Platform>
39 </ProjectConfiguration>
Paul Monson8a1657b2019-02-14 08:31:30 -080040 <ProjectConfiguration Include="Release|ARM">
41 <Configuration>Release</Configuration>
42 <Platform>ARM</Platform>
43 </ProjectConfiguration>
Brian Curtin401f9f32012-05-13 11:19:23 -050044 <ProjectConfiguration Include="Release|Win32">
45 <Configuration>Release</Configuration>
46 <Platform>Win32</Platform>
47 </ProjectConfiguration>
48 <ProjectConfiguration Include="Release|x64">
49 <Configuration>Release</Configuration>
50 <Platform>x64</Platform>
51 </ProjectConfiguration>
52 </ItemGroup>
53 <PropertyGroup Label="Globals">
54 <ProjectGuid>{885D4898-D08D-4091-9C40-C700CFE3FC5A}</ProjectGuid>
55 <RootNamespace>python3dll</RootNamespace>
56 <Keyword>Win32Proj</Keyword>
Steve Dower65e4cb12014-11-22 12:54:57 -080057 <TargetName>python3</TargetName>
Steve Dower65e4cb12014-11-22 12:54:57 -080058 <SupportPGO>false</SupportPGO>
Brian Curtin401f9f32012-05-13 11:19:23 -050059 </PropertyGroup>
Steve Dower65e4cb12014-11-22 12:54:57 -080060 <Import Project="python.props" />
Brian Curtin401f9f32012-05-13 11:19:23 -050061 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Steve Dower65e4cb12014-11-22 12:54:57 -080062 <PropertyGroup Label="Configuration">
63 <ConfigurationType>DynamicLibrary</ConfigurationType>
Brian Curtin401f9f32012-05-13 11:19:23 -050064 </PropertyGroup>
65 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
66 <ImportGroup Label="ExtensionSettings">
67 </ImportGroup>
Steve Dower65e4cb12014-11-22 12:54:57 -080068 <ImportGroup Label="PropertySheets">
Brian Curtin401f9f32012-05-13 11:19:23 -050069 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70 <Import Project="pyproject.props" />
Brian Curtin401f9f32012-05-13 11:19:23 -050071 </ImportGroup>
72 <PropertyGroup Label="UserMacros" />
73 <PropertyGroup>
74 <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
Steve Dower65e4cb12014-11-22 12:54:57 -080075 <_Machine>X86</_Machine>
76 <_Machine Condition="$(Platform) == 'x64'">X64</_Machine>
Paul Monson8a1657b2019-02-14 08:31:30 -080077 <_Machine Condition="$(Platform) == 'ARM'">ARM</_Machine>
Steve Dower945863a2016-07-13 19:58:21 -070078 <ExtensionsToDeleteOnClean>$(ExtensionsToDeleteOnClean);$(IntDir)python3_d.def;$(IntDir)python3stub.def</ExtensionsToDeleteOnClean>
Brian Curtin401f9f32012-05-13 11:19:23 -050079 </PropertyGroup>
80 <ItemDefinitionGroup>
Steve Dower65e4cb12014-11-22 12:54:57 -080081 <ClCompile>
82 <BufferSecurityCheck>false</BufferSecurityCheck>
83 </ClCompile>
84 <Link>
85 <AdditionalDependencies>$(OutDir)$(TargetName)stub.lib</AdditionalDependencies>
Steve Dowere5a6c4e2015-01-31 11:17:07 -080086 <ModuleDefinitionFile Condition="$(Configuration) != 'Debug'">$(PySourcePath)PC\python3.def</ModuleDefinitionFile>
87 <ModuleDefinitionFile Condition="$(Configuration) == 'Debug'">$(IntDir)python3_d.def</ModuleDefinitionFile>
Steve Dower65e4cb12014-11-22 12:54:57 -080088 <EntryPointSymbol>DllMain</EntryPointSymbol>
89 </Link>
90 <PreLinkEvent>
91 <Command>lib /nologo /def:"$(IntDir)python3stub.def" /out:"$(OutDir)$(TargetName)stub.lib" /MACHINE:$(_Machine)</Command>
92 <Message>Rebuilding $(TargetName)stub.lib</Message>
93 <Outputs>$(OutDir)$(TargetName)stub.lib</Outputs>
94 </PreLinkEvent>
Brian Curtin401f9f32012-05-13 11:19:23 -050095 </ItemDefinitionGroup>
96 <ItemGroup>
97 <None Include="..\PC\python3.def" />
98 </ItemGroup>
99 <ItemGroup>
100 <ClCompile Include="..\PC\python3dll.c" />
101 </ItemGroup>
102 <ItemGroup>
103 <ResourceCompile Include="..\PC\python_nt.rc" />
104 </ItemGroup>
105 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
106 <ImportGroup Label="ExtensionTargets">
107 </ImportGroup>
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800108
Steve Dowere97ba4c2018-05-28 12:32:05 -0700109 <Target Name="BuildPython3_dDef" BeforeTargets="BuildStubDef" Condition="$(Configuration) == 'Debug'">
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800110 <ItemGroup>
111 <_DefLines Remove="@(_DefLines)" />
112 <_Lines Remove="@(_Lines)" />
Steve Dowere97ba4c2018-05-28 12:32:05 -0700113 <_OriginalLines Remove="@(_OriginalLines)" />
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800114 </ItemGroup>
Steve Dower65e4cb12014-11-22 12:54:57 -0800115 <ReadLinesFromFile File="..\PC\python3.def">
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800116 <Output TaskParameter="Lines" ItemName="_DefLines" />
117 </ReadLinesFromFile>
Steve Dowere97ba4c2018-05-28 12:32:05 -0700118 <ReadLinesFromFile File="$(IntDir)python3_d.def" Condition="Exists('$(IntDir)python3_d.def')">
119 <Output TaskParameter="Lines" ItemName="_OriginalLines" />
120 </ReadLinesFromFile>
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800121 <PropertyGroup>
122 <_Pattern1>(=python$(MajorVersionNumber)$(MinorVersionNumber))\.</_Pattern1>
123 <_Sub1>$1_d.</_Sub1>
124 <_Pattern2>"python3"</_Pattern2>
125 <_Sub2>"python3_d"</_Sub2>
126 </PropertyGroup>
127 <ItemGroup>
128 <_Lines Include="@(_DefLines)">
129 <New>$([System.Text.RegularExpressions.Regex]::Replace($([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern1)`, `$(_Sub1)`)), `$(_Pattern2)`, `$(_Sub2)`))</New>
130 </_Lines>
131 </ItemGroup>
132 <MakeDir Directories="$(IntDir)" />
Steve Dowere97ba4c2018-05-28 12:32:05 -0700133 <Message Text="Updating python3_d.def" Condition="@(_Lines->'%(New)') != @(_OriginalLines)" Importance="high" />
134 <WriteLinesToFile File="$(IntDir)python3_d.def" Lines="@(_Lines->'%(New)')" Overwrite="true"
135 Condition="@(_Lines->'%(New)') != @(_OriginalLines)" />
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800136 </Target>
137
Steve Dowere97ba4c2018-05-28 12:32:05 -0700138 <Target Name="BuildStubDef" BeforeTargets="PreLinkEvent">
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800139 <ItemGroup>
140 <_DefLines Remove="@(_DefLines)" />
141 <_Lines Remove="@(_Lines)" />
Steve Dowere97ba4c2018-05-28 12:32:05 -0700142 <_OriginalLines Remove="@(_OriginalLines)" />
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800143 </ItemGroup>
144 <ReadLinesFromFile File="..\PC\python3.def">
145 <Output TaskParameter="Lines" ItemName="_DefLines" />
Steve Dower65e4cb12014-11-22 12:54:57 -0800146 </ReadLinesFromFile>
Steve Dowere97ba4c2018-05-28 12:32:05 -0700147 <ReadLinesFromFile File="$(IntDir)python3stub.def" Condition="Exists('$(IntDir)python3stub.def')">
148 <Output TaskParameter="Lines" ItemName="_OriginalLines" />
149 </ReadLinesFromFile>
Steve Dower65e4cb12014-11-22 12:54:57 -0800150 <PropertyGroup>
151 <_Pattern>^[\w.]+=.+?\.([^ ]+).*$</_Pattern>
152 <_Sub>$1</_Sub>
153 </PropertyGroup>
154 <ItemGroup>
155 <_Lines Include="EXPORTS" />
Steve Dowere5a6c4e2015-01-31 11:17:07 -0800156 <_Symbols Include="@(_DefLines)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(`%(Identity)`, `$(_Pattern)`))">
Steve Dower65e4cb12014-11-22 12:54:57 -0800157 <Symbol>$([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern)`, `$(_Sub)`))</Symbol>
158 </_Symbols>
159 <_Lines Include="@(_Symbols->'%(Symbol)')" />
160 </ItemGroup>
161 <MakeDir Directories="$(IntDir)" />
Steve Dowerf9b364f2018-05-28 14:05:05 -0700162 <Message Text="Updating python3stub.def" Condition="@(_Lines) != @(_OriginalLines)" Importance="high" />
Steve Dowere97ba4c2018-05-28 12:32:05 -0700163 <WriteLinesToFile File="$(IntDir)python3stub.def" Lines="@(_Lines)" Overwrite="true"
Steve Dowerf9b364f2018-05-28 14:05:05 -0700164 Condition="@(_Lines) != @(_OriginalLines)" />
Steve Dower65e4cb12014-11-22 12:54:57 -0800165 </Target>
Brian Curtin401f9f32012-05-13 11:19:23 -0500166</Project>