Skip to content

Commit

Permalink
- Set default for solution builds to Release
Browse files Browse the repository at this point in the history
- Fixed build so manually setting FLAVOR_WIN isn't needed anymore
- set default MEMORY type to FLASH as that's more common with smaller micro nowadays
- fixed syntax errors in Microsoft.SPOT.Support.Settings (which seems to be unused...)
- Silenced message about not finding lib and manifest files (the conditions for detecting the existence of files to delete were wrong; This is a minor tweak to the pull request NETMF#23 from @cw2)
  • Loading branch information
smaillet-ms committed Mar 20, 2015
1 parent 087560f commit ab03f51
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 30 deletions.
1 change: 0 additions & 1 deletion BuildEnv.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<BHL_EXE Condition="'$(BHL_EXE)'==''">$(BUILD_TREE_SERVER)\dll\BuildHelper.exe</BHL_EXE>
<MDP_EXE Condition="'$(MDP_EXE)'==''">$(BUILD_TREE_SERVER)\dll\MetadataProcessor.exe</MDP_EXE>
<NetMfTargetsBaseDir Condition="'$(NetMfTargetsBaseDir)'==''">$(SPOCLIENT)\Framework\IDE\Targets\</NetMfTargetsBaseDir>
<FLAVOR_ARM Condition="'$(FLAVOR_ARM)'==''">$(Configuration)</FLAVOR_ARM>
<FLAVOR_DAT Condition="'$(FLAVOR_DAT)'==''">$(Configuration)</FLAVOR_DAT>
<FLAVOR_WIN Condition="'$(FLAVOR_WIN)'==''">$(Configuration)</FLAVOR_WIN>
<FLAVOR_MEMORY Condition="'$(FLAVOR_MEMORY)'==''">FLASH</FLAVOR_MEMORY>
Expand Down
2 changes: 1 addition & 1 deletion PK.proj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Import Project="$(SPOCLIENT)\tools\targets\Microsoft.SPOT.System.Settings" />

<ItemGroup>
<RequiredProjects Include="$(SPOCLIENT)\Framework\Tools\BuildTasks.dirproj" Condition="!EXISTS('$(BUILD_ROOT)\$(FLAVOR)\Server\DLL\Microsoft.SPOT.Tasks')"/>
<RequiredProjects Include="$(SPOCLIENT)\Framework\Tools\BuildTasks.dirproj" Condition="!EXISTS('$(BUILD_ROOT)\$(FLAVOR)\Server\DLL\Microsoft.SPOT.Tasks.dll')"/>
<RequiredProjects Include="$(SPOCLIENT)\Framework\Tools\CreateCLRDefines.proj" Condition="!EXISTS('$(PLATFORM_INDEPENDENT_LIB_DIR)\TinyCLR_Defines.h')"/>
<RequiredProjects Include="$(SPOCLIENT)\clr\tools\dotnetmf.proj" Condition="!EXISTS('$(BUILD_ROOT)\$(FLAVOR)\Server\DLL\MetaDataProcessor.exe')"/>
<RequiredManagedProjects Include="$(SPOCLIENT)\clr\tools\EmulatorInterface\EmulatorInterface.csproj" Condition="!EXISTS('$(BUILD_ROOT)\$(FLAVOR)\Server\DLL\Microsoft.SPOT.Emulator.Interface.dll')"/>
Expand Down
2 changes: 1 addition & 1 deletion Solutions/Windows2/Windows2.settings
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<IsSolutionWizardVisible>True</IsSolutionWizardVisible>
<ENDIANNESS>le</ENDIANNESS>
<MEMORY>RAM</MEMORY>
<FLAVOR Condition="'$(FLAVOR)'==''">Debug</FLAVOR>
<FLAVOR Condition="'$(FLAVOR)'==''">Release</FLAVOR>
</PropertyGroup>
<ItemGroup>
<IncludePaths Include="Solutions\Windows2" />
Expand Down
4 changes: 2 additions & 2 deletions tools/Targets/Microsoft.SPOT.Build.Configuration.Settings
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<PropertyGroup>
<Platform Condition="'$(Platform)'==''" >AnyCPU</Platform>
<FLAVOR Condition="'$(FLAVOR)'=='' And '$(Configuration)'!=''">$(Configuration)</FLAVOR>
<FLAVOR Condition="'$(FLAVOR)'=='' And '$(Configuration)'==''">Debug</FLAVOR>
<MEMORY Condition="'$(MEMORY)'==''" >RAM</MEMORY>
<FLAVOR Condition="'$(FLAVOR)'=='' And '$(Configuration)'==''">Release</FLAVOR>
<MEMORY Condition="'$(MEMORY)'==''" >FLASH</MEMORY>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == '' ">
Expand Down
4 changes: 2 additions & 2 deletions tools/Targets/Microsoft.SPOT.Support.Settings
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@

<BUILD_FLAVOR_RTM Condition="'$(rtm)'=='true'">1</BUILD_FLAVOR_RTM>

<FLAVOR_TMP Condition="'$(FLAVOR)'=='Debug' OR '$(FLAVOR)'=='Instrumented'>Debug</FLAVOR_TMP>
<FLAVOR_TMP Condition="'$(FLAVOR)'=='Debug' OR '$(FLAVOR)'=='Instrumented'">Debug</FLAVOR_TMP>

<FLAVOR_DAT Condition="'$(FLAVOR_TMP)'=='Debug'" >Debug</FLAVOR_DAT>
<FLAVOR_DAT Condition="'$(FLAVOR_TMP)'!='Debug'" >Release</FLAVOR_WIN>
<FLAVOR_DAT Condition="'$(FLAVOR_TMP)'!='Debug'" >Release</FLAVOR_DAT>
<FLAVOR_WIN Condition="'$(FLAVOR_TMP)'=='Debug'" >Debug</FLAVOR_WIN>
<FLAVOR_WIN Condition="'$(FLAVOR_TMP)'!='Debug'" >Release</FLAVOR_WIN>

Expand Down
2 changes: 1 addition & 1 deletion tools/Targets/Microsoft.SPOT.System.Settings
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<profile Condition="'$(profile)'==''" >false</profile>
<sampleprof Condition="'$(sampleprof)'==''" >false</sampleprof>
<latencyprof Condition="'$(latencyprof)'==''" >false</latencyprof>
<FLAVOR Condition="'$(FLAVOR)'==''" >Debug</FLAVOR>
<FLAVOR Condition="'$(FLAVOR)'==''" >Release</FLAVOR>
<MEMORY Condition="'$(MEMORY)'==''" >FLASH</MEMORY>
<ENABLE_FASTCOMPILE Condition="'$(ENABLE_FASTCOMPILE)'==''" >true</ENABLE_FASTCOMPILE>
<FourByteCrytoLib>false</FourByteCrytoLib>
Expand Down
2 changes: 1 addition & 1 deletion tools/Targets/Microsoft.SPOT.System.Targets
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@

<Exec Command="IF EXIST @(TargetLib->'%(FullPath)','') del /q @(TargetLib->'%(FullPath)', ' ')" Condition ="@(TargetLib)!=''" ContinueOnError="true"/>
<Exec Command="IF EXIST @(TargetLib->'%(FullPath).manifest','') del /q @(TargetLib->'%(FullPath).manifest', ' ')" Condition ="@(TargetLib)!=''" ContinueOnError="true"/>
<Exec Command="IF EXIST @(FileExist->'$(OBJ_DIR)\%(Filename).*','') del /q @(FilesExist->'$(OBJ_DIR)\%(Filename).*', ' ')" ContinueOnError="true"/>
<Exec Command="IF EXIST @(FilesExist->'$(OBJ_DIR)\%(Filename).*','') del /q @(FilesExist->'$(OBJ_DIR)\%(Filename).*', ' ')" ContinueOnError="true"/>
</Target>


Expand Down
6 changes: 3 additions & 3 deletions tools/Targets/Microsoft.Spot.system.gcc.targets
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,13 @@
</Target>

<Target Name="ArmAssemble" Condition="'@(AssemblyFiles)'!=''" Inputs="@(AssemblyFiles)" Outputs="@(AssemblyFiles->'$(OBJ_DIR)\%(FileName).$(OBJ_EXT)')">
<Exec Condition="Exists('%(AssemblyFiles.FullPath)')" Command="del /q $(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)" ContinueOnError="true" />
<Delete Condition="Exists('$(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)')" Files="$(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)" ContinueOnError="true" />
<Exec Condition="Exists('%(AssemblyFiles.FullPath)')" Command="$(AS) $(AS_FLAGS) -a=$(OBJ_DIR)\%(AssemblyFiles.Filename).txt -o $(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT) %(AssemblyFiles.FullPath)"/>
</Target>

<Target Name="DelBuildLib" Condition="'$(OutputType)'=='Library'" Inputs="@(FastCompileCPPFile);@(CPPFiles);@(FastCompileCFile);@(CFiles);@(AssemblyFiles);@(HFiles)" Outputs="@(TargetLib)">
<Exec Condition="'@(FilesExist)'!='' " Command="del /q @(TargetLib)" ContinueOnError="true" />
<Exec Condition="'@(FilesExist)'!='' " Command="del /q @(TargetLib->'%(FullPath).manifest', ' ')" ContinueOnError="true" />
<Delete Condition="EXISTS(@(TargetLib->'%(FullPath)', ' '))" Files="@(TargetLib->'%(FullPath)', ' ')" ContinueOnError="true" />
<Delete Condition="EXISTS(@(TargetLib->'%(FullPath).manifest', ' '))" Files="@(TargetLib->'%(FullPath).manifest', ' ')" ContinueOnError="true" />
</Target>

<Target Name="ArmBuildLib" Condition="'$(OutputType)'=='Library'" DependsOnTargets="FindCompileFilesExistence;FindFastCompileFilesExistence;DelBuildLib;ArmCompileC;ArmCompileCPP;ArmAssemble;CreateLibManifest;$(ExtraTargets);" Inputs="@(ObjFiles)" Outputs="@(TargetLib);@(TargetLib->'%(FullPath).manifest')">
Expand Down
6 changes: 3 additions & 3 deletions tools/Targets/Microsoft.Spot.system.mdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@

<Target Name="ArmAssemble" Condition="'@(AssemblyFiles)'!=''" Inputs="@(AssemblyFiles);@(HFiles)" Outputs="@(AssemblyFiles->'$(OBJ_DIR)\%(FileName).$(OBJ_EXT)')">
<!-- has to delete the obj manually, as the armas won't delete the old one -->
<Exec Condition="Exists('%(AssemblyFiles.FullPath)')" Command="del /q $(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)" ContinueOnError="true" />
<Delete Condition="Exists('$(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)')" Files="$(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)" ContinueOnError="true" />
<Exec Condition="Exists('%(AssemblyFiles.FullPath)')" Command="$(AS) $(AS_PLATFORM_FLAGS) $(AS_FLAGS) $(SWTC)LIST $(OBJ_DIR)\%(AssemblyFiles.Filename).txt $(SWTC)xref -o $(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT) %(AssemblyFiles.FullPath)"/>
</Target>

<Target Name="DelBuildLib" Condition="'$(OutputType)'=='Library'" Inputs="@(FastCompileCPPFile);@(CPPFiles);@(FastCompileCFile);@(CFiles);@(AssemblyFiles);@(HFiles)" Outputs="@(TargetLib)">
<Exec Condition="'@(FilesExist)'!='' " Command="del /q @(TargetLib->'%(FullPath)', ' ')" ContinueOnError="true" />
<Exec Condition="'@(FilesExist)'!='' " Command="del /q @(TargetLib->'%(FullPath).manifest', ' ')" ContinueOnError="true" />
<Delete Condition="EXISTS(@(TargetLib->'%(FullPath)', ' '))" Files="@(TargetLib->'%(FullPath)', ' ')" ContinueOnError="true" />
<Delete Condition="EXISTS(@(TargetLib->'%(FullPath).manifest', ' '))" Files="@(TargetLib->'%(FullPath).manifest', ' ')" ContinueOnError="true" />
</Target>

<Target Name="ArmBuildLib" Condition="'$(OutputType)'=='Library'" DependsOnTargets="FindCompileFilesExistence;FindFastCompileFilesExistence;DelBuildLib;ArmCompileC;ArmCompileCPP;ArmAssemble;CreateLibManifest;$(ExtraTargets);" Inputs="@(ObjFiles);@(LIB_FIRSTENTRY_OBJ);@(OEM_TARGETS);@(OEM_TARGETS_OBJ);@(PlatformIndependentLibs->'$(PLATFORM_INDEPENDENT_LIB_DIR)\%(FileName)%(Extension)')" Outputs="@(TargetLib);@(TargetLib->'%(FullPath).manifest')">
Expand Down
6 changes: 3 additions & 3 deletions tools/Targets/Microsoft.Spot.system.rvds.Targets
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,13 @@

<Target Name="ArmAssemble" Condition="'@(AssemblyFiles)'!=''" Inputs="@(AssemblyFiles);@(HFiles)" Outputs="@(AssemblyFiles->'$(OBJ_DIR)\%(FileName).$(OBJ_EXT)')">
<!-- has to delete the obj manually, as the armas won't delete the old one -->
<Exec Condition="Exists('%(AssemblyFiles.FullPath)')" Command="del /q $(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)" ContinueOnError="true" />
<Delete Condition="Exists('$(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)')" Files="$(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT)" ContinueOnError="true" />
<Exec Condition="Exists('%(AssemblyFiles.FullPath)')" Command="$(AS) $(AS_PLATFORM_FLAGS) $(AS_FLAGS) $(SWTC)LIST $(OBJ_DIR)\%(AssemblyFiles.Filename).txt $(SWTC)xref -o $(OBJ_DIR)\%(AssemblyFiles.Filename).$(OBJ_EXT) %(AssemblyFiles.FullPath)"/>
</Target>

<Target Name="DelBuildLib" Condition="'$(OutputType)'=='Library'" Inputs="@(FastCompileCPPFile);@(CPPFiles);@(FastCompileCFile);@(CFiles);@(AssemblyFiles);@(HFiles)" Outputs="@(TargetLib)">
<Exec Condition="'@(FilesExist)'!='' " Command="del /q @(TargetLib->'%(FullPath)', ' ')" ContinueOnError="true" />
<Exec Condition="'@(FilesExist)'!='' " Command="del /q @(TargetLib->'%(FullPath).manifest', ' ')" ContinueOnError="true" />
<Delete Condition="EXISTS(@(TargetLib->'%(FullPath)', ' '))" Files="@(TargetLib->'%(FullPath)', ' ')" ContinueOnError="true" />
<Delete Condition="EXISTS(@(TargetLib->'%(FullPath).manifest', ' '))" Files="@(TargetLib->'%(FullPath).manifest', ' ')" ContinueOnError="true" />
</Target>

<Target Name="ArmBuildLib" Condition="'$(OutputType)'=='Library'" DependsOnTargets="FindCompileFilesExistence;FindFastCompileFilesExistence;DelBuildLib;ArmCompileC;ArmCompileCPP;ArmAssemble;CreateLibManifest;$(ExtraTargets);" Inputs="@(ObjFiles);@(LIB_FIRSTENTRY_OBJ);@(OEM_TARGETS);@(OEM_TARGETS_OBJ);@(DriverLibs->'$(LIB_DIR)\%(FileName)%(Extension)',' ');@(PlatformIndependentLibs->'$(PLATFORM_INDEPENDENT_LIB_DIR)\%(FileName)%(Extension)')" Outputs="@(TargetLib);@(TargetLib->'%(FullPath).manifest')">
Expand Down
12 changes: 0 additions & 12 deletions tools/scripts/init.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ cd %PREVCD%

@rem - CONFIGURATION OF DEBUG vs RELEASE FOR FIRMWARE, TOOLS, AND ASSEMBLIES

if /I "%FLAVOR_WIN%" == "Debug" set FLAVOR_WIN=Debug
if /I "%FLAVOR_WIN%" == "Release" set FLAVOR_WIN=Release
if "%FLAVOR_WIN%" == "" set FLAVOR_WIN=Release

if /I "%FLAVOR_DAT%" == "Debug" set FLAVOR_DAT=Debug
if /I "%FLAVOR_DAT%" == "Release" set FLAVOR_DAT=Release
if "%FLAVOR_DAT%" == "" set FLAVOR_DAT=Release

if "%FLAVOR_ARM%" == "" set FLAVOR_ARM=release
if "%FLAVOR_PLATFORM%" == "" set FLAVOR_PLATFORM=iMXS
if "%FLAVOR_MEMORY%" == "" set FLAVOR_MEMORY=Flash

if "%OEM_NAME%" == "" set OEM_NAME=Microsoft
Expand Down Expand Up @@ -62,12 +56,6 @@ set BUILD_TEST_TREE_SERVER=%BUILD_TEST_ROOT%\server
set OEM_PATH=%OEM_ROOT%\%OEM_NAME%
set CLRLIB=%CLRROOT%\Tools\Libraries

@rem ################################################################################

set TARGETCURRENT=%CLRROOT%_BUILD\arm\%FLAVOR_MEMORY%\%FLAVOR_ARM%\%FLAVOR_PLATFORM%\bin

@rem ################################################################################

set PREVCD=
set TEMPTOOLPATH=

Expand Down

0 comments on commit ab03f51

Please sign in to comment.