summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2017-08-16 10:32:47 +0200
committerDamien George <damien.p.george@gmail.com>2019-09-18 22:15:10 +1000
commit6957939604336aecfa20c63ee68fc2fc61e446c0 (patch)
tree1538c162657dcd1004540b89aa899473c150b52b
parent146c32a14196356fbf3c3b5f2a7c6e41e3b59389 (diff)
windows/msvc: Change the way sources are listed.
Reserve sources.props for listing just the MicroPython core and extmod files, similar to how py.mk lists port-independent source files. This allows reusing the source list, for instance for building mpy-cross. The sources for building the executable itself are listed in the corresponding project file, similar to how the other ports specify the source files in their Makefile.
-rw-r--r--ports/windows/micropython.vcxproj20
-rw-r--r--ports/windows/msvc/sources.props48
2 files changed, 37 insertions, 31 deletions
diff --git a/ports/windows/micropython.vcxproj b/ports/windows/micropython.vcxproj
index e468cfdae..3a72a58fd 100644
--- a/ports/windows/micropython.vcxproj
+++ b/ports/windows/micropython.vcxproj
@@ -81,9 +81,27 @@
<ClCompile />
<Link />
</ItemDefinitionGroup>
+ <Import Project="msvc/sources.props" />
<ItemGroup>
+ <ClCompile Include="@(PyCoreSource)" />
+ <ClCompile Include="@(PyExtModSource)" />
+ <ClCompile Include="$(PyBaseDir)lib\mp-readline\*.c" />
+ <ClCompile Include="$(PyBaseDir)ports\windows\*.c" />
+ <ClCompile Include="$(PyBaseDir)ports\windows\msvc\*.c" />
+ <ClCompile Include="$(PyBaseDir)ports\unix\file.c"/>
+ <ClCompile Include="$(PyBaseDir)ports\unix\gccollect.c"/>
+ <ClCompile Include="$(PyBaseDir)ports\unix\input.c"/>
+ <ClCompile Include="$(PyBaseDir)ports\unix\main.c"/>
+ <ClCompile Include="$(PyBaseDir)ports\unix\modos.c"/>
+ <ClCompile Include="$(PyBaseDir)ports\unix\modtime.c"/>
+ <ClCompile Include="$(PyBaseDir)ports\unix\modmachine.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="@(PyCoreInclude)" />
+ <ClInclude Include="@(PyExtModInclude)" />
+ <ClInclude Include="$(PyBaseDir)ports\windows\*.h" />
+ <ClInclude Include="$(PyBaseDir)ports\windows\msvc\*.h" />
</ItemGroup>
- <Import Project="msvc/sources.props" />
<Import Project="msvc/genhdr.targets" />
<Import Project="$(CustomPropsFile)" Condition="exists('$(CustomPropsFile)')" />
<Target Name="GenHeaders" BeforeTargets="BuildGenerateSources" DependsOnTargets="GenerateHeaders">
diff --git a/ports/windows/msvc/sources.props b/ports/windows/msvc/sources.props
index 5c2076f1e..32a4cb18d 100644
--- a/ports/windows/msvc/sources.props
+++ b/ports/windows/msvc/sources.props
@@ -2,37 +2,25 @@
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="paths.props" Condition="'$(PyPathsIncluded)' != 'True'"/>
<ItemGroup>
- <ClCompile Include="$(PyBaseDir)py\*.c" />
- <ClCompile Include="$(PyBaseDir)ports\windows\*.c" />
- <ClCompile Include="$(PyBaseDir)ports\windows\msvc\*.c" />
- <ClCompile Include="$(PyBaseDir)lib\mp-readline\*.c" />
- <ClCompile Include="$(PyBaseDir)lib\utils\printf.c" />
- <ClCompile Include="$(PyBaseDir)ports\unix\file.c"/>
- <ClCompile Include="$(PyBaseDir)ports\unix\gccollect.c"/>
- <ClCompile Include="$(PyBaseDir)ports\unix\input.c"/>
- <ClCompile Include="$(PyBaseDir)ports\unix\main.c"/>
- <ClCompile Include="$(PyBaseDir)ports\unix\modos.c"/>
- <ClCompile Include="$(PyBaseDir)ports\unix\modtime.c"/>
- <ClCompile Include="$(PyBaseDir)ports\unix\modmachine.c" />
- <ClCompile Include="$(PyBaseDir)extmod\machine_mem.c" />
- <ClCompile Include="$(PyBaseDir)extmod\machine_pinbase.c" />
- <ClCompile Include="$(PyBaseDir)extmod\machine_pulse.c" />
- <ClCompile Include="$(PyBaseDir)extmod\machine_signal.c" />
- <ClCompile Include="$(PyBaseDir)extmod\modubinascii.c" />
- <ClCompile Include="$(PyBaseDir)extmod\moductypes.c" />
- <ClCompile Include="$(PyBaseDir)extmod\moduhashlib.c" />
- <ClCompile Include="$(PyBaseDir)extmod\moduheapq.c" />
- <ClCompile Include="$(PyBaseDir)extmod\modujson.c" />
- <ClCompile Include="$(PyBaseDir)extmod\modurandom.c" />
- <ClCompile Include="$(PyBaseDir)extmod\modure.c" />
- <ClCompile Include="$(PyBaseDir)extmod\modutimeq.c" />
- <ClCompile Include="$(PyBaseDir)extmod\moduzlib.c" />
- <ClCompile Include="$(PyBaseDir)extmod\utime_mphal.c" />
- <ClCompile Include="$(PyBaseDir)extmod\virtpin.c" />
+ <PyCoreSource Include="$(PyBaseDir)py\*.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\machine_mem.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\machine_pinbase.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\machine_pulse.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\machine_signal.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\modubinascii.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\moductypes.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\moduhashlib.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\moduheapq.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\modujson.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\modurandom.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\modure.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\modutimeq.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\moduzlib.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\utime_mphal.c" />
+ <PyExtModSource Include="$(PyBaseDir)extmod\virtpin.c" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="$(PyBaseDir)py\*.h" />
- <ClInclude Include="$(PyBaseDir)ports\windows\*.h" />
- <ClInclude Include="$(PyBaseDir)ports\windows\msvc\*.h" />
+ <PyCoreInclude Include="$(PyBaseDir)py\*.h" />
+ <PyExtModInclude Include="$(PyBaseDir)extmod\*.h" />
</ItemGroup>
</Project>