118 lines
5.6 KiB
XML
118 lines
5.6 KiB
XML
<Project DefaultTarget="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<Import Project="..\..\Paths.targets"/>
|
|
|
|
<PropertyGroup>
|
|
<AS16>"$(BUILDDIR)\x86_x86\ml.exe"</AS16>
|
|
<LINK16>for %%f in ("$(BUILDDIR)\x86_x86\link16.exe") do %%~sf</LINK16>
|
|
<AS64>"$(SINGULARITY_ROOT)\build\x86_x64\ml64.exe"</AS64>
|
|
<CC64>"$(SINGULARITY_ROOT)\build\x86_x64\cl.exe"</CC64>
|
|
<LINK64>"$(SINGULARITY_ROOT)\build\x86_x64\link.exe"</LINK64>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Machine)'=='x86'">
|
|
<AS>"$(SINGULARITY_ROOT)\build\x86_x86\ml.exe"</AS>
|
|
<CC>"$(SINGULARITY_ROOT)\build\x86_x86\cl.exe"</CC>
|
|
<LINK>"$(SINGULARITY_ROOT)\build\x86_x86\link.exe"</LINK>
|
|
<BLGEN>"$(SINGULARITY_ROOT)\build\x86_x86\blgen.exe"</BLGEN>
|
|
<BOOTDEF>/DBOOT_X86</BOOTDEF>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Machine)'=='x64'">
|
|
<AS>$(AS64)</AS>
|
|
<CC>$(CC64)</CC>
|
|
<LINK>$(LINK64)</LINK>
|
|
<BLGEN>"$(SINGULARITY_ROOT)\build\x86_x64\blgen.exe"</BLGEN>
|
|
<BOOTDEF>/DBOOT_X64</BOOTDEF>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="BuildHalclass">
|
|
<MSBuild Projects="$(SINGULARITY_ROOT)\Kernel\Kernel.proj" Targets="BuildNativeIncludes"/>
|
|
</Target>
|
|
|
|
<Target Name="Build"
|
|
DependsOnTargets="BuildBootLoader"/>
|
|
|
|
<Target Name="CreateDirs">
|
|
<MakeDir Directories="$(BOOTDIR)"/>
|
|
</Target>
|
|
|
|
<Target Name="BuildEntry16"
|
|
Inputs="blentry16.asm;bl.inc"
|
|
Outputs="$(BOOTDIR)\blentry16.com"
|
|
DependsOnTargets="CreateDirs">
|
|
|
|
<Exec Command="$(AS16) /nologo $(BOOTDEF) /AT /omf /c /I. "/Fl$(BOOTDIR)\blentry16.lst" "/Fo$(BOOTDIR)\blentry16.obj" blentry16.asm"/>
|
|
<Exec WorkingDirectory="$(BOOTDIR)"
|
|
Command="$(LINK16) /nologo /TINY blentry16.obj,blentry16.com,blentry16.map,,,/ONERROR:NOEXE /NOLOGO"/>
|
|
</Target>
|
|
|
|
<ItemGroup>
|
|
<BootLoaderSource Include="blacpi.cpp"/>
|
|
<BootLoaderSource Include="blcdrom.cpp"/>
|
|
<BootLoaderSource Include="blcom.cpp"/>
|
|
<BootLoaderSource Condition="'$(Machine)'=='x86'" Include="$(Machine)\blcrtasm.asm"/>
|
|
<BootLoaderSource Include="blentry.cpp"/>
|
|
<BootLoaderSource Include="blfat.cpp"/>
|
|
<BootLoaderSource Include="blflash.cpp"/>
|
|
<BootLoaderSource Include="$(Machine)\blidt.asm"/>
|
|
<BootLoaderSource Include="$(Machine)\blioport.asm"/>
|
|
<BootLoaderSource Include="blkd.cpp"/>
|
|
<BootLoaderSource Include="blkd1394.cpp"/>
|
|
<BootLoaderSource Include="blkdcom.cpp"/>
|
|
<BootLoaderSource Include="$(Machine)\bllegacy.asm"/>
|
|
<BootLoaderSource Include="blmm.cpp"/>
|
|
<BootLoaderSource Include="blmps.cpp"/>
|
|
<BootLoaderSource Include="blpci.cpp"/>
|
|
<BootLoaderSource Include="blpecoff.cpp"/>
|
|
<BootLoaderSource Include="blpnp.cpp"/>
|
|
<BootLoaderSource Include="blpool.cpp"/>
|
|
<BootLoaderSource Include="blpxe.cpp"/>
|
|
<BootLoaderSource Include="blsingularity.cpp"/>
|
|
<BootLoaderSource Include="blsmap.cpp"/>
|
|
<BootLoaderSource Include="blstring.cpp"/>
|
|
<BootLoaderSource Include="bltrap.cpp"/>
|
|
<BootLoaderSource Include="blutil.cpp"/>
|
|
<BootLoaderSource Include="$(Machine)\blutilasm.asm"/>
|
|
<BootLoaderSource Include="blvesa.cpp"/>
|
|
<BootLoaderSource Include="blvideo.cpp"/>
|
|
</ItemGroup>
|
|
|
|
<Target Name="BuildEntryFull"
|
|
Inputs="@(BootLoaderSource);bl.h;blkd1394.h;bl.inc;$(KERNEL_NATIVE_DIR)\halclass.h"
|
|
Outputs="$(BOOTDIR)\bl.exe"
|
|
DependsOnTargets="BuildEntry16;BuildHalclass">
|
|
|
|
<Exec Condition="'%(BootLoaderSource.Extension)' == '.asm'"
|
|
Command="$(AS) /nologo /c $(BOOTDEF) /I. "/Fl$(BOOTDIR)\%(BootLoaderSource.FileName).lst" "/Fo$(BOOTDIR)\%(BootLoaderSource.FileName).obj" %(BootLoaderSource.Identity)"/>
|
|
|
|
<Exec Condition="'%(BootLoaderSource.Extension)' == '.cpp'"
|
|
Command="$(CC) /nologo /c $(BOOTDEF) /GF /Gy /Gr /Zi /Os /Oy- /GS- /Gs65536 /FAsc "/Fa$(BOOTDIR)\%(BootLoaderSource.FileName).cod" "/Fo$(BOOTDIR)\%(BootLoaderSource.FileName).obj" "/Fd$(BOOTDIR)\%(BootLoaderSource.FileName).pdb" "/I$(KERNEL_NATIVE_DIR)" %(BootLoaderSource.Identity)"/>
|
|
|
|
<Exec Command="$(LINK) /nologo /debug "/out:$(BOOTDIR)\bl.exe" "/pdb:$(BOOTDIR)\bl.pdb" "/map:$(BOOTDIR)\bl.map" @(BootLoaderSource->'"$(BOOTDIR)\%(FileName).obj"',' ') /nodefaultlib /entry:BlEntry /subsystem:native /base:0x40000 /fixed /ignore:4078 /ignore:4254 /merge:.rdata=.data /merge:.data=.text"/>
|
|
</Target>
|
|
|
|
<Target Name="BuildBootLoader"
|
|
Inputs="$(BOOTDIR)\bl.exe;$(BOOTDIR)\blentry16.com"
|
|
Outputs="$(BOOTDIR)\Singldr"
|
|
DependsOnTargets="BuildEntry16;BuildEntryFull">
|
|
<Message Text="Building $(BOOTDIR)\Singldr"/>
|
|
<Exec Command="$(BLGEN) "$(BOOTDIR)\blentry16.com" "$(BOOTDIR)\bl.exe" "$(BOOTDIR)\Singldr""/>
|
|
</Target>
|
|
|
|
<Target Name="Clean">
|
|
<Delete Files="$(BOOTDIR)\blentry16.com"/>
|
|
<Delete Files="$(BOOTDIR)\blentry16.lst"/>
|
|
<Delete Files="$(BOOTDIR)\blentry16.map"/>
|
|
<Delete Files="$(BOOTDIR)\blentry16.obj"/>
|
|
<Delete Files="$(BOOTDIR)\%(BootLoaderSource.FileName).cod"/>
|
|
<Delete Files="$(BOOTDIR)\%(BootLoaderSource.FileName).lst"/>
|
|
<Delete Files="$(BOOTDIR)\%(BootLoaderSource.FileName).obj"/>
|
|
<Delete Files="$(BOOTDIR)\%(BootLoaderSource.FileName).pdb"/>
|
|
<Delete Files="$(BOOTDIR)\bl.exe"/>
|
|
<Delete Files="$(BOOTDIR)\bl.pdb"/>
|
|
<Delete Files="$(BOOTDIR)\Singldr"/>
|
|
</Target>
|
|
|
|
</Project>
|