2008-11-17 18:29:00 -05:00
|
|
|
<!--
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
#
|
|
|
|
###############################################################################
|
|
|
|
-->
|
|
|
|
|
|
|
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2008-03-05 09:52:00 -05:00
|
|
|
<Import Project="..\Paths.targets" />
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<Import Project="$(SINGULARITY_ROOT)\Targets\RuntimePaths.target"/>
|
|
|
|
|
2008-03-05 09:52:00 -05:00
|
|
|
<PropertyGroup>
|
2008-11-17 18:29:00 -05:00
|
|
|
<UNDRPL>undrpl</UNDRPL>
|
2008-03-05 09:52:00 -05:00
|
|
|
<SDIZEPDB>sdizepdb</SDIZEPDB>
|
|
|
|
<AFLAGS>$(AFLAGS)</AFLAGS>
|
2008-11-17 18:29:00 -05:00
|
|
|
<CFLAGS>$(CFLAGS) /Oi /I"$(KERNEL_NATIVE_DIR)" /I"$(SINGULARITY_ROOT)\boot\include"</CFLAGS>
|
|
|
|
<ACFLAGS>$(ACFLAGS) /DSINGULARITY=1 /DSINGULARITY_KERNEL=1 /I"$(KERNEL_NATIVE_DIR)"</ACFLAGS>
|
2008-03-05 09:52:00 -05:00
|
|
|
<ACFLAGS Condition="'$(SINGULARITY_MP)'=='true'">$(ACFLAGS) /DSINGULARITY_MP=1</ACFLAGS>
|
|
|
|
<ACFLAGS Condition="'$(PAGING)'=='On'">$(ACFLAGS) /DPAGING</ACFLAGS>
|
|
|
|
<LFLAGS>$(LINKFLAGS) /nodefaultlib /subsystem:native /OPT:REF /RELEASE /DLL </LFLAGS>
|
2008-11-17 18:29:00 -05:00
|
|
|
<LENTRYFLAGS>/entry:HalEntryPoint</LENTRYFLAGS>
|
|
|
|
<KERNEL_BARTOK_LOG>>"$(KERNEL_NATIVE_DIR)\kernel.log"</KERNEL_BARTOK_LOG>
|
|
|
|
<LBASEFLAGS>/fixed:no /map</LBASEFLAGS>
|
2008-03-05 09:52:00 -05:00
|
|
|
<Collector>$(COLLECTOR_KERNEL)</Collector>
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<DEFAULT_SYSCALL_BUILDER>"$(BUILDDIR)\SyscallBuilder.exe"</DEFAULT_SYSCALL_BUILDER>
|
2008-03-05 09:52:00 -05:00
|
|
|
<SYSCALL_BUILDER Condition="'$(SYSCALL_BUILDER)'==''">$(DEFAULT_SYSCALL_BUILDER)</SYSCALL_BUILDER>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<PropertyGroup>
|
|
|
|
<KernelManifest>kernel.$(Machine).manifest</KernelManifest>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="('$(Machine)'=='x86' or '$(Machine)'=='x64')">
|
|
|
|
<CFLAGS>$(CFLAGS) /Gr</CFLAGS>
|
|
|
|
<LBASEFLAGS>$(LBASEFLAGS) /base:0xC10000</LBASEFLAGS>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Machine)'=='arm'">
|
|
|
|
<BartokFlags>$(BartokFlags) /PhoenixMirOpts=false</BartokFlags>
|
|
|
|
<!-- MinOpt is needed for current Bartok (@6763) otherwise Bartok croaks
|
|
|
|
with a null reference exception -->
|
|
|
|
<BartokFlags>$(BartokFlags) /MinOpt</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /nohiropt</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /PhoenixMirOpts=false</BartokFlags>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Machine)'=='arm' and '$(Platform)'=='Omap3430'">
|
|
|
|
<CFLAGS>$(CFLAGS) /QRarch5 /QRimplicit-import-</CFLAGS>
|
|
|
|
<LBASEFLAGS>$(LBASEFLAGS) /base:0x80100000 /driver</LBASEFLAGS>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<HalClassHFile>$(KERNEL_NATIVE_DIR)\halclass.h</HalClassHFile>
|
|
|
|
<HalClassIncFile>$(KERNEL_NATIVE_DIR)\halclass.inc</HalClassIncFile>
|
|
|
|
<HalClassTmpHFile>$(KERNEL_NATIVE_DIR)\_halclass.h</HalClassTmpHFile>
|
|
|
|
<HalClassTmpIncFile>$(KERNEL_NATIVE_DIR)\_halclass.inc</HalClassTmpIncFile>
|
|
|
|
</PropertyGroup>
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
<!-- Importing GC.targets gets us GC_ML_DEFS, and BARTOK_COLLECTOR. -->
|
|
|
|
<Import Project="GC.targets"/>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<BartokFlags>$(BartokFlags) /Singularity</BartokFlags>
|
2008-11-17 18:29:00 -05:00
|
|
|
<BartokFlags>$(BartokFlags) /verbosity:perphase</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /GCInlineArrayAllocations=false</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /GCInlineFixedAllocations=false</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /GCIntrinsicFixedAllocations=false</BartokFlags>
|
2008-03-05 09:52:00 -05:00
|
|
|
<BartokFlags>$(BartokFlags) /GCInlineWriteBarrier=false</BartokFlags>
|
2008-11-17 18:29:00 -05:00
|
|
|
<BartokFlags>$(BartokFlags) /GenAsmHeader="$(HalClassTmpIncFile)"</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /GenCppHeader="$(HalClassTmpHFile)"</BartokFlags>
|
2008-03-05 09:52:00 -05:00
|
|
|
<BartokFlags>$(BartokFlags) /OmitFramePointer=false</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /DebugInline=true</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /UnnameTracedPtrs=true</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /Warnings=true</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /WholeProgram=true</BartokFlags>
|
2008-11-17 18:29:00 -05:00
|
|
|
<BartokFlags>$(BartokFlags) /UseSegmentRegister=false</BartokFlags>
|
|
|
|
</PropertyGroup>
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Prototype'">
|
|
|
|
<BartokFlags>$(BartokFlags) /IrSimpleInliner=false</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /CoalesceExceptionThrow=false</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /OptimizeLocals=false</BartokFlags>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Prototype'">
|
|
|
|
<!-- <BartokFlags>$(BartokFlags) /minopt</BartokFlags> -->
|
2008-03-05 09:52:00 -05:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<Collector>$(COLLECTOR_KERNEL)</Collector>
|
|
|
|
<NativeImageName>kernel</NativeImageName>
|
|
|
|
<EnableOutputLog>false</EnableOutputLog>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<AbiCandidatesFile>$(KERNEL_NATIVE_DIR)\Singularity.V1.candidates</AbiCandidatesFile>
|
|
|
|
<KernelObjPath>$(KERNEL_NATIVE_DIR)\kernel.obj</KernelObjPath>
|
|
|
|
|
|
|
|
<NativeLibPath>$(KERNEL_NATIVE_DIR)\native.lib</NativeLibPath>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- HAL -->
|
|
|
|
<Choose>
|
|
|
|
<When Condition="'$(Platform)'=='ApicPC'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<HalProject>$(SINGULARITY_ROOT)\Kernel\Singularity.Hal.ApicPC.csproj</HalProject>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<When Condition="'$(Platform)'=='ApicMP'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<HalProject>$(SINGULARITY_ROOT)\Kernel\Singularity.Hal.ApicMP.csproj</HalProject>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
2008-11-17 18:29:00 -05:00
|
|
|
<When Condition="'$(Platform)'=='Apic64'">
|
|
|
|
<PropertyGroup>
|
|
|
|
<HalProject>$(SINGULARITY_ROOT)\Kernel\Singularity.Hal.Apic64.csproj</HalProject>
|
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<When Condition="'$(Platform)'=='Omap3430'">
|
2008-03-05 09:52:00 -05:00
|
|
|
<PropertyGroup>
|
2008-11-17 18:29:00 -05:00
|
|
|
<HalProject>$(SINGULARITY_ROOT)\Kernel\Singularity.Hal.Omap3430.csproj</HalProject>
|
2008-03-05 09:52:00 -05:00
|
|
|
</PropertyGroup>
|
|
|
|
</When>
|
|
|
|
<Otherwise>
|
|
|
|
<PropertyGroup>
|
|
|
|
<ERROR>The value '$(Platform)' is not a valid choice for the Platform property.</ERROR>
|
|
|
|
</PropertyGroup>
|
|
|
|
</Otherwise>
|
|
|
|
</Choose>
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<!-- -->
|
|
|
|
<PropertyGroup Condition="'$(Machine)'=='x86'">
|
|
|
|
<BartokFlags>$(BartokFlags) /SymbolicDebug=true</BartokFlags>
|
|
|
|
<BartokFlags Condition="'$(SINGULARITY_STACK_CHECKS)'=='true'">$(BartokFlags) /StackOverflowChecks=true</BartokFlags>
|
|
|
|
<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacks=true</BartokFlags>
|
|
|
|
<!-- REVIEW: HACK: Need to investigate enabling this.
|
|
|
|
<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacksRequireExternalBound=true</BartokFlags>
|
|
|
|
-->
|
|
|
|
<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacksDumpBounds=true</BartokFlags>
|
|
|
|
<ACFLAGS>$(ACFLAGS) /DISA_IX=1 /DISA_IX86=1 /DPTR_SIZE_32=1</ACFLAGS>
|
|
|
|
<AFLAGS>$(AFLAGS) /I"$(SINGULARITY_ROOT)\kernel\native\ix"</AFLAGS>
|
|
|
|
<AFLAGS>$(AFLAGS) /I"$(SINGULARITY_ROOT)\kernel\native\ix86"</AFLAGS>
|
|
|
|
<UFLAGS>$(UFLAGS)</UFLAGS>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Machine)'=='x64'">
|
|
|
|
<BartokFlags>$(BartokFlags) /SymbolicDebug=true</BartokFlags>
|
|
|
|
<BartokFlags Condition="'$(SINGULARITY_STACK_CHECKS)'=='true'">$(BartokFlags) /StackOverflowChecks=true</BartokFlags>
|
|
|
|
<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacks=true</BartokFlags>
|
|
|
|
<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacksRequireExternalBound=true</BartokFlags>
|
|
|
|
<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacksDumpBounds=true</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /x64</BartokFlags>
|
|
|
|
<ACFLAGS>$(ACFLAGS) /DISA_IX=1 /DISA_IX64=1 /DPTR_SIZE_64=1</ACFLAGS>
|
|
|
|
<AFLAGS>$(AFLAGS) /I"$(SINGULARITY_ROOT)\kernel\native\ix"</AFLAGS>
|
|
|
|
<AFLAGS>$(AFLAGS) /I"$(SINGULARITY_ROOT)\kernel\native\ix64"</AFLAGS>
|
|
|
|
<UFLAGS>$(UFLAGS) -r:SI:SA -r:PA:PEA</UFLAGS>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(Machine)'=='arm'">
|
|
|
|
<BartokFlags>$(BartokFlags) /SymbolicDebug=true</BartokFlags>
|
|
|
|
<!--<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacks=true</BartokFlags>-->
|
|
|
|
<!--<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacksRequireExternalBound=true</BartokFlags>-->
|
|
|
|
<!--<BartokFlags Condition="'$(SINGULARITY_LINKED_STACKS)'=='true'">$(BartokFlags) /LinkedStacksDumpBounds=true</BartokFlags>-->
|
|
|
|
<!--<BartokFlags Condition="'$(SINGULARITY_STACK_CHECKS)'=='true'">$(BartokFlags) /StackOverflowChecks=true</BartokFlags>-->
|
|
|
|
<BartokFlags>$(BartokFlags) /TargetArch=ARM</BartokFlags>
|
|
|
|
<BartokFlags>$(BartokFlags) /EnableIrExposeAllocationCall=true</BartokFlags>
|
|
|
|
<ACFLAGS>$(ACFLAGS) /DISA_ARM=1 /DPTR_SIZE_32=1</ACFLAGS>
|
|
|
|
<AFLAGS>$(AFLAGS) /I"$(SINGULARITY_ROOT)\kernel\native\ARM"</AFLAGS>
|
|
|
|
<UFLAGS>$(UFLAGS) -r:SI:SA</UFLAGS>
|
|
|
|
</PropertyGroup>
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
<ItemGroup Condition="'$(PAGING)'=='On'">
|
|
|
|
<KernelObj Include="$(KERNEL_NATIVE_DIR)\sysentry.obj"/>
|
|
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup Condition="'$(PAGING)'=='On'">
|
|
|
|
<LinkKernelDependsOn>$(LinkKernelDependsOn);sysentry_obj</LinkKernelDependsOn>
|
|
|
|
<BuildDependsOn>$(BuildDependsOn);LinkSyscallsDll</BuildDependsOn>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##################################### TARGETS ############################################ -->
|
|
|
|
|
|
|
|
<Target Name="Build" DependsOnTargets="
|
|
|
|
BuildDependentProjects;
|
|
|
|
BuildKernelManifest;
|
|
|
|
LinkKernel;
|
|
|
|
LinkTestApp;
|
|
|
|
BuildTestPeManifest;
|
|
|
|
$(BuildDependsOn);
|
|
|
|
">
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!-- These items are the IL assemblies that form the managed part of the kernel. -->
|
|
|
|
<ItemGroup>
|
|
|
|
<ProjectReference Include="Kernel.Corlib.csproj" />
|
|
|
|
<ProjectReference Include="System.Compiler.Runtime\System.Compiler.Runtime.Kernel.csproj" />
|
|
|
|
<ProjectReference Include="SingSharp.Runtime\Microsoft.SingSharp.Runtime.Kernel.csproj" />
|
|
|
|
<ProjectReference Include="Singularity.Diagnostics\Diagnostics.csproj" />
|
2008-11-17 18:29:00 -05:00
|
|
|
<ProjectReference Include="Singularity.Channels\Channels.csproj" />
|
2008-03-05 09:52:00 -05:00
|
|
|
<ProjectReference Include="Singularity.Loader\Loader.csproj" />
|
|
|
|
<ProjectReference Include="Singularity.Directory\Directory.csproj" />
|
|
|
|
<ProjectReference Include="Singularity.Stress\Stress.csproj" />
|
|
|
|
<ProjectReference Include="Singularity.Io\IoSystem.csproj" />
|
|
|
|
<ProjectReference Include="Singularity.Drivers\KernelDrivers.csproj" />
|
|
|
|
<ProjectReference Include="Singularity.Security\Security.csproj" />
|
|
|
|
<ProjectReference Include="Singularity.Security\Service\SecurityService.csproj" />
|
|
|
|
<ProjectReference Include="$(HalProject)" />
|
2008-11-17 18:29:00 -05:00
|
|
|
<ProjectReference Include="Singularity.KdFiles\Singularity.KdFiles.csproj" />
|
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Applications\Benchmarks\Singbench\Contracts\Singbench.Contracts.Kernel.csproj" />
|
2008-03-05 09:52:00 -05:00
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\Diagnostics.Contracts\Diagnostics.Contracts.Kernel.csproj" />
|
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\Directory.Contracts\Directory.Contracts.Kernel.csproj" />
|
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\Io.Contracts\Io.Contracts.Kernel.csproj" />
|
2008-11-17 18:29:00 -05:00
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\Io.Net.Contracts\Io.Net.Contracts.Kernel.csproj" />
|
2008-03-05 09:52:00 -05:00
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\Stress.Contracts\Stress.Contracts.Kernel.csproj" />
|
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\Security.Contracts\Security.Contracts.Kernel.csproj" />
|
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\NetStack.Contracts\NetStack.Contracts.Kernel.csproj" />
|
2008-11-17 18:29:00 -05:00
|
|
|
<ProjectReference Include="$(SINGULARITY_ROOT)\Contracts\WebApps.Contracts\WebApps.Contracts.Kernel.csproj" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<Target Name="BuildDependentProjects">
|
2008-11-17 18:29:00 -05:00
|
|
|
<MSBuild Projects="@(ProjectReference)" StopOnFirstFailure="$(StopOnFirstFailure)" Condition="'$(BuildInParallel)'!='true'">
|
|
|
|
<Output ItemName="Reference" TaskParameter="TargetOutputs"/>
|
|
|
|
</MSBuild>
|
|
|
|
<MSBuild Projects="@(ProjectReference)" StopOnFirstFailure="$(StopOnFirstFailure)" Condition="'$(BuildInParallel)'=='true'" BuildInParallel="true">
|
2008-03-05 09:52:00 -05:00
|
|
|
<Output ItemName="Reference" TaskParameter="TargetOutputs"/>
|
|
|
|
</MSBuild>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="BuildKernelManifest"
|
|
|
|
Inputs="@(Reference)"
|
2008-11-17 18:29:00 -05:00
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\$(KernelManifest)"
|
2008-03-05 09:52:00 -05:00
|
|
|
DependsOnTargets="BuildDependentProjects">
|
2008-11-17 18:29:00 -05:00
|
|
|
<Message Text="Building $(KernelManifest)" />
|
2008-03-05 09:52:00 -05:00
|
|
|
<MakeDir Directories="$(KERNEL_NATIVE_DIR)"/>
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command=""$(BUILDDIR)\mkmani" /out:"$(KERNEL_NATIVE_DIR)\$(KernelManifest)" /app:kernel /cache:"$(BASEDIR)" @(Reference->'"%(Identity)"',' ') /runtime:Full" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="BuildAbiCandidates"
|
|
|
|
Inputs="$(KernelObjPath);$(NativeLibPath)"
|
|
|
|
Outputs="$(AbiCandidatesFile)"
|
2008-11-17 18:29:00 -05:00
|
|
|
DependsOnTargets="CompileKernelObj;BuildNativeIncludes;BuildNativeLib">
|
2008-03-05 09:52:00 -05:00
|
|
|
<Message Text="Building Singularity.V1.candidates" />
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="abi2def.cmd /dumpbin $(DUMPBIN) /version 1 /def "$(AbiCandidatesFile)" "$(KernelObjPath)" "$(NativeLibPath)"" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- This target links a dummy version of the PE/COFF kernel. -->
|
|
|
|
<Target Name="LinkDummyKernel"
|
2008-11-17 18:29:00 -05:00
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\dummykernel.$(Machine)"
|
2008-03-05 09:52:00 -05:00
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\kernel.obj;$(NativeLibPath);linkdate.cpp;$(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE);dummysysentry.cpp"
|
2008-11-17 18:29:00 -05:00
|
|
|
DependsOnTargets="CompileKernelObj;BuildNativeIncludes;BuildNativeLib;BuildAbiLib">
|
2008-03-05 09:52:00 -05:00
|
|
|
<Message Text="Building dummy kernel native .obj"/>
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(CC) $(CFLAGS) $(ACFLAGS) /Fo"$(KERNEL_NATIVE_DIR)\dummysysentry.obj" /Fd"$(KERNEL_NATIVE_DIR)\dummysysentry.pdb" /c dummysysentry.cpp" />
|
|
|
|
<Exec Command="$(CC) $(CFLAGS) $(ACFLAGS) /Fo"$(KERNEL_NATIVE_DIR)\linkdate.obj" /Fd"$(KERNEL_NATIVE_DIR)\linkdate.pdb" /c linkdate.cpp" />
|
|
|
|
<Exec Command="$(LINK) /debug /out:"$(KERNEL_NATIVE_DIR)\dummykernel.$(Machine)" /def:"$(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)" /pdb:"$(KERNEL_NATIVE_DIR)\dummykernel.$(Machine).pdb" $(LFLAGS) /fixed /map /base:0x310000 $(LENTRYFLAGS) "$(NativeLibPath)" "$(KERNEL_NATIVE_DIR)\linkdate.obj" "$(KERNEL_NATIVE_DIR)\kernel.obj" "$(KERNEL_NATIVE_DIR)\dummysysentry.obj" "$(KERNEL_NATIVE_DIR)\kernel_superObj.obj"" />
|
2008-03-05 09:52:00 -05:00
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(SDIZEPDB) /t:"$(KERNEL_NATIVE_DIR)\kernel.txt" "$(KERNEL_NATIVE_DIR)\dummykernel.$(Machine).pdb""
|
2008-03-05 09:52:00 -05:00
|
|
|
IgnoreExitCode="true"
|
|
|
|
Condition="'$(EnableSdize)'=='true'"/>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!-- This target dumps the export symbols of the dummy kernel. -->
|
|
|
|
<Target Name="CreateSyscallsSources"
|
2008-11-17 18:29:00 -05:00
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\dummykernel.$(Machine)"
|
2008-03-05 09:52:00 -05:00
|
|
|
Outputs="
|
|
|
|
$(KERNEL_NATIVE_DIR)\dummykernel.dumpbin;
|
|
|
|
$(KERNEL_NATIVE_DIR)\syscalls.h;
|
|
|
|
$(KERNEL_NATIVE_DIR)\syscalls.cpp;
|
|
|
|
$(KERNEL_NATIVE_DIR)\sysentry.cpp;
|
|
|
|
"
|
|
|
|
DependsOnTargets="LinkDummyKernel">
|
|
|
|
<Message Text="Dumping export symbols of dummy kernel"/>
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(DUMPBIN) $(DUMPFLAGS) /exports "$(KERNEL_NATIVE_DIR)\dummykernel.$(Machine)" > "$(KERNEL_NATIVE_DIR)\dummykernel.dumpbin"" />
|
|
|
|
<Exec Command="$(SYSCALL_BUILDER) /genhdr < "$(KERNEL_NATIVE_DIR)\dummykernel.dumpbin" > "$(KERNEL_NATIVE_DIR)\syscalls.h"" />
|
|
|
|
<Exec Command="$(SYSCALL_BUILDER) /genlib < "$(KERNEL_NATIVE_DIR)\dummykernel.dumpbin" > "$(KERNEL_NATIVE_DIR)\syscalls.cpp"" />
|
|
|
|
<Exec Command="$(SYSCALL_BUILDER) /genentry < "$(KERNEL_NATIVE_DIR)\dummykernel.dumpbin" > "$(KERNEL_NATIVE_DIR)\sysentry.cpp""/>
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
|
|
<Target Name="sysentry_obj"
|
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\sysentry.cpp;$(KERNEL_NATIVE_DIR)\syscalls.h"
|
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\sysentry.obj"
|
|
|
|
DependsOnTargets="CreateSyscallsSources">
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(CC) $(CFLAGS) $(ACFLAGS) /Fo"$(KERNEL_NATIVE_DIR)\sysentry.obj" /Fd"$(KERNEL_NATIVE_DIR)\sysentry.pdb" /c "$(KERNEL_NATIVE_DIR)\sysentry.cpp"" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="CompileSyscallsObj"
|
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\syscalls.cpp;$(KERNEL_NATIVE_DIR)\syscalls.h"
|
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\syscalls.obj"
|
|
|
|
DependsOnTargets="CreateSyscallsSources">
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(CC) /c $(CFLAGS) $(ACFLAGS) /Fd"$(KERNEL_NATIVE_DIR)\syscalls.pdb" /Fo"$(KERNEL_NATIVE_DIR)\syscalls.obj" "$(KERNEL_NATIVE_DIR)\syscalls.cpp"" />
|
|
|
|
<!-- <Exec Command="$(CC) $(CFLAGS) $(ACFLAGS) /LD /Fd"$(KERNEL_NATIVE_DIR)\syscalls.pdb" "$(KERNEL_NATIVE_DIR)\syscalls.cpp" /link /out:"$(KERNEL_NATIVE_DIR)\syscalls.dll" /NODEFAULTLIB /NOENTRY "$(KERNEL_NATIVE_DIR)\kernel.lib"" /> -->
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<SyscallsObj Include="$(KERNEL_NATIVE_DIR)\syscalls.obj"/>
|
|
|
|
<SyscallsObj Include="$(KERNEL_NATIVE_DIR)\kernel.lib"/>
|
2008-11-17 18:29:00 -05:00
|
|
|
|
2008-03-05 09:52:00 -05:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<Target Name="LinkSyscallsDll"
|
2008-11-17 18:29:00 -05:00
|
|
|
Inputs="@(SyscallsObj)
|
|
|
|
"
|
2008-03-05 09:52:00 -05:00
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\syscalls.dll"
|
2008-11-17 18:29:00 -05:00
|
|
|
DependsOnTargets="CompileSyscallsObj;LinkKernel"
|
2008-03-05 09:52:00 -05:00
|
|
|
>
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(LINK) $(LFLAGS) /DLL /NOENTRY /MAP /out:"$(KERNEL_NATIVE_DIR)\syscalls.dll" /NODEFAULTLIB /pdb:"$(KERNEL_NATIVE_DIR)\syscalls.dll.pdb" @(SyscallsObj->'"%(Identity)"',' ')"/>
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="genabistub"
|
2008-11-17 18:29:00 -05:00
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\SingularityStub.V1.dumpbin;Singularity\BspAbiStub.cs;$(KERNEL_NATIVE_DIR)\MpSyscalls.$(Machine)"
|
|
|
|
Outputs="">
|
|
|
|
<!-- DependsOnTargets="BuildKernelDmp"> -->
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
|
|
<Target Name="MakeDirs">
|
2008-11-17 18:29:00 -05:00
|
|
|
<MakeDir Directories="$(KERNEL_NATIVE_DIR)" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="BuildAbiDumpBin"
|
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\SingularityStub.V1.lib"
|
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\SingularityStub.V1.dumpbin;$(KERNEL_NATIVE_DIR)\genApAbiStub.out;Singularity\BspAbiStub.cs"
|
|
|
|
DependsOnTargets="BuildAbStubLib">
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(DUMPBIN) $(DUMPFLAGS) /exports "$(KERNEL_NATIVE_DIR)\SingularityStub.V1.lib" > "$(KERNEL_NATIVE_DIR)\SingularityStub.V1.dumpbin"" />
|
|
|
|
<Exec Command="$(ASMP_SYSCALL_BUILDER) /genApAbiStub < "$(KERNEL_NATIVE_DIR)\SingularityStub.V1.dumpbin" > "$(KERNEL_NATIVE_DIR)\genApAbiStub.out"" />
|
|
|
|
<Exec Command="$(ASMP_SYSCALL_BUILDER) /genBspAbiStub < "$(KERNEL_NATIVE_DIR)\SingularityStub.V1.dumpbin" > Singularity\BspAbiStub.cs" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- busted -->
|
|
|
|
<Target Name="BuildMpSyscallsObj"
|
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\SingularityStub.V1.dumpbin"
|
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\MpSyscalls.h;$(KERNEL_NATIVE_DIR)\MpSyscalls.cpp;$(KERNEL_NATIVE_DIR)\MpSyscalls.obj"
|
|
|
|
DependsOnTargets="BuildAbiDumpBin">
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(ASMP_SYSCALL_BUILDER) /genMpSyscallsHeader < "$(KERNEL_NATIVE_DIR)\SingularityStub.V1.dumpbin" > "$(KERNEL_NATIVE_DIR)\MpSyscalls.h"" />
|
|
|
|
<Exec Command="$(ASMP_SYSCALL_BUILDER) /genMpSyscallsImpl < "$(KERNEL_NATIVE_DIR)\SingularityStub.V1.dumpbin" > "$(KERNEL_NATIVE_DIR)\MpSyscalls.cpp"" />
|
|
|
|
<Exec Command="$(CC) $(CFLAGS) $(ACFLAGS) /Fo"$(KERNEL_NATIVE_DIR)\MpSyscalls.obj" /Fd"$(KERNEL_NATIVE_DIR)\MpSyscalls.pdb" /c "$(KERNEL_NATIVE_DIR)\MpSyscalls.cpp"" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
# pass5 depends on this .. which depends on MpSyscalls.obj
|
2008-11-17 18:29:00 -05:00
|
|
|
$(KERNEL_NATIVE_DIR)\MpSyscalls.$(Machine): $(KERNEL_NATIVE_DIR)\MpSyscalls.obj $(KERNEL_NATIVE_DIR)\SingularityStub.V1.lib
|
2008-03-05 09:52:00 -05:00
|
|
|
$(LINK) $(LFLAGS) /fixed /MAP /out:$@ \
|
2008-11-17 18:29:00 -05:00
|
|
|
/pdb:$(KERNEL_NATIVE_DIR)\MpSyscalls.$(Machine).pdb /base:0x00600000 /entry:entry \
|
2008-03-05 09:52:00 -05:00
|
|
|
$(KERNEL_NATIVE_DIR)\MpSyscalls.obj \
|
|
|
|
$(KERNEL_NATIVE_DIR)\SingularityStub.V1.lib
|
|
|
|
-->
|
|
|
|
<Target Name="BuildMpSyscallsNative"
|
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\MpSyscalls.obj;$(KERNEL_NATIVE_DIR)\SingularityStub.V1.lib"
|
2008-11-17 18:29:00 -05:00
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\MpSyscalls.$(Machine)"
|
2008-03-05 09:52:00 -05:00
|
|
|
DependsOnTargets="">
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(LINK) $(LFLAGS) /fixed /MAP /out:"$(KERNEL_NATIVE_DIR)\MpSyscalls.$(Machine)" /pdb:"$(KERNEL_NATIVE_DIR)\MpSyscalls.$(Machine).pdb" /base:0x00600000 /entry:entry "$(KERNEL_NATIVE_DIR)\MpSyscalls.obj" "$(KERNEL_NATIVE_DIR)\SingularityStub.V1.lib"" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<KernelObj Include="$(KERNEL_NATIVE_DIR)\kernel.obj"/>
|
|
|
|
<KernelObj Include="$(KERNEL_NATIVE_DIR)\kernel_superObj.obj"/>
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Target Name="PreprocessAbiDef"
|
|
|
|
Inputs="$(SING_DEF_FILE)"
|
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)"
|
|
|
|
>
|
|
|
|
<MakeDir Directories="$(KERNEL_NATIVE_DIR)" />
|
|
|
|
<Message Text="Preprocessing ABI names - $(SING_DEF_FILE) to $(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)" />
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(CC) $(CFLAGS) $(ACFLAGS) /EP /TP "$(SING_DEF_FILE)" | $(UNDRPL) $(UFLAGS) > "$(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)"" />
|
|
|
|
<Message Text="Validating ABI" />
|
|
|
|
<Exec Command="validabi.cmd $(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="LinkKernel"
|
2008-11-17 18:29:00 -05:00
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\kernel.$(Machine);$(KERNEL_NATIVE_DIR)\kernel.lib"
|
2008-03-05 09:52:00 -05:00
|
|
|
Inputs="@(KernelObj);linkdate.cpp;$(NativeLibPath);$(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)"
|
2008-11-17 18:29:00 -05:00
|
|
|
DependsOnTargets="CompileKernelObj;BuildNativeIncludes;PreprocessAbiDef;BuildNativeLib;$(LinkKernelDependsOn)">
|
2008-03-05 09:52:00 -05:00
|
|
|
<Message Text="Linking kernel native PE image" />
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(CC) $(CFLAGS) $(ACFLAGS) /Fo"$(KERNEL_NATIVE_DIR)\linkdate.obj" /Fd"$(KERNEL_NATIVE_DIR)\linkdate.pdb" /c linkdate.cpp" />
|
|
|
|
<Exec Command="$(LINK) /out:"$(KERNEL_NATIVE_DIR)\kernel.$(Machine)" /def:"$(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)" /debug /map:"$(KERNEL_NATIVE_DIR)\kernel.$(Machine).map" /pdb:"$(KERNEL_NATIVE_DIR)\kernel.$(Machine).pdb" $(LFLAGS) /ignore:4216 $(LBASEFLAGS) $(LENTRYFLAGS) "$(NativeLibPath)" "$(KERNEL_NATIVE_DIR)\linkdate.obj" @(KernelObj->'"%(Identity)"',' ')" />
|
|
|
|
<Exec Command="$(SDIZEPDB) /t:"$(KERNEL_NATIVE_DIR)\kernel.txt" "$(KERNEL_NATIVE_DIR)\kernel.$(Machine).pdb""
|
2008-03-05 09:52:00 -05:00
|
|
|
IgnoreExitCode="true"
|
|
|
|
Condition="'$(EnableSdize)'=='true'"/>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!-- ############################################################# C++ Hello World. -->
|
|
|
|
<Target Name="BuildTestPeObj"
|
|
|
|
Inputs="testpe.cpp"
|
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\testpe.obj"
|
|
|
|
DependsOnTargets="">
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(CC) $(CFLAGS) $(ACFLAGS) /FAsc /Fa"$(KERNEL_NATIVE_DIR)\testpe.lst" /Fo"$(KERNEL_NATIVE_DIR)\testpe.obj" /Fd"$(KERNEL_NATIVE_DIR)\testpe.pdb" /c testpe.cpp" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="LinkTestApp"
|
2008-11-17 18:29:00 -05:00
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\testpe.$(Machine)"
|
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\testpe.obj;$(KERNEL_NATIVE_DIR)\Singularity.V1.$(Runtime).lib"
|
2008-03-05 09:52:00 -05:00
|
|
|
DependsOnTargets="BuildTestPeObj;BuildAbiLib">
|
|
|
|
<Message Text="Linking native PE image of test app" />
|
2008-11-17 18:29:00 -05:00
|
|
|
<Exec Command="$(LINK) $(LFLAGS) /fixed:no /out:"$(KERNEL_NATIVE_DIR)\testpe.$(Machine)" /pdb:"$(KERNEL_NATIVE_DIR)\testpe.$(Machine).pdb" /base:0x2000000 /entry:entry "$(KERNEL_NATIVE_DIR)\testpe.obj" "$(KERNEL_NATIVE_DIR)\Singularity.V1.$(Runtime).lib"" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="BuildAbiLib"
|
2008-11-17 18:29:00 -05:00
|
|
|
Inputs="$(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)"
|
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\Singularity.V1.$(Runtime).lib"
|
|
|
|
DependsOnTargets="PreprocessAbiDef">
|
|
|
|
<Exec Command="$(LIB) $(LIBFLAGS) /def:"$(KERNEL_NATIVE_DIR)\$(SING_DEF_FILE)" /out:"$(KERNEL_NATIVE_DIR)\Singularity.V1.$(Runtime).lib"" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<PropertyGroup>
|
|
|
|
<TestPeManifest>testpe.manifest</TestPeManifest>
|
|
|
|
<TestPeInstalledManifest>$(KERNEL_NATIVE_DIR)\testpe.$(Machine).manifest</TestPeInstalledManifest>
|
|
|
|
</PropertyGroup>
|
2008-03-05 09:52:00 -05:00
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<Target Name="BuildTestPeManifest" Inputs="$(TestPeManifest)" Outputs="$(TestPeInstalledManifest)">
|
|
|
|
<Copy SourceFiles="$(TestPeManifest)" DestinationFiles="$(TestPeInstalledManifest)" />
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
==============================================================================================
|
|
|
|
|
|
|
|
Native runtime sources
|
|
|
|
|
|
|
|
==============================================================================================
|
|
|
|
-->
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<ItemGroup>
|
2008-03-05 09:52:00 -05:00
|
|
|
<NativeIncludes Include="Native\hal.h"/>
|
|
|
|
<NativeIncludes Include="Native\halkd.h"/>
|
|
|
|
<NativeIncludes Include="Native\halkd1394.h"/>
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<NativeSource Include="Native\Buffer.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\CInit.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Decimal.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\EventController.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\EventDescriptor.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\EventingKernel.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\GCTracing.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Hal.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Halkd.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Halkd1394.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Halkdserial.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\IoPort.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\MemoryStorage.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Monitoring.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Number.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\PEImage.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Platform.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Tracing.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ZoneAllocation.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix64\halexn.cpp"> <!-- MOVE TO Native --><OutputRelativeDir>Native\ix64\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\Processor.cpp"> <!-- MOVE TO Native --><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Singularity\Isal\isac.cpp"><OutputRelativeDir>Singularity\Isal\</OutputRelativeDir></NativeSource>
|
|
|
|
|
|
|
|
<NativeIncludes Include="$(BartokSrcDir)\runtime\singularity\native\arch\$(BARTOK_MACHINE)\core.inc"/>
|
|
|
|
|
|
|
|
<NativeSource Include="$(BartokSrcDir)\runtime\shared\native\arch\$(BARTOK_MACHINE)\lib.asm"><OutputRelativeDir>BartokSharedArch\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="$(BartokSrcDir)\runtime\singularity\native\arch\$(BARTOK_MACHINE)\lib.asm"><OutputRelativeDir>BartokSingularityArch\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="$(BartokSrcDir)\runtime\singularity\native\arch\$(BARTOK_MACHINE)\gc.asm"><OutputRelativeDir>BartokSingularityArch\</OutputRelativeDir></NativeSource>
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<ItemGroup Condition="'$(Machine)'=='x86' or '$(Machine)'=='x64'">
|
|
|
|
|
|
|
|
<NativeIncludes Include="Native\ix\hal.inc"/>
|
|
|
|
|
|
|
|
<NativeSource Include="Native\Halkdcom.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
|
|
|
|
<NativeSource Include="Native\ix\Thread.cpp"><OutputRelativeDir>Native\ix\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix\halstack.asm"><OutputRelativeDir>Native\ix\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix\kdnotify.asm"><OutputRelativeDir>Native\ix\</OutputRelativeDir></NativeSource>
|
|
|
|
|
|
|
|
<NativeSource Include="Singularity\Isal\ix\interrupt.asm"><OutputRelativeDir>Singularity\Isal\ix\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Singularity\Isal\ix\context.asm"><OutputRelativeDir>Singularity\Isal\ix\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Singularity\Isal\ix\isa.asm"><OutputRelativeDir>Singularity\Isal\ix\</OutputRelativeDir></NativeSource>
|
|
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<ItemGroup Condition="'$(Machine)'=='x64'">
|
|
|
|
|
|
|
|
<NativeSource Include="Native\ix64\Math.cpp"><OutputRelativeDir>Native\ix64\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix64\_memcpy.asm"><OutputRelativeDir>Native\ix64\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix64\_memset.asm"><OutputRelativeDir>Native\ix64\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix64\halkdx.cpp"><OutputRelativeDir>Native\ix64\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix64\halmath.asm"><OutputRelativeDir>Native\ix64\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix64\halprocessor.asm"><OutputRelativeDir>Native\ix64\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix64\kdasm.asm"><OutputRelativeDir>Native\ix64\</OutputRelativeDir></NativeSource>
|
|
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<ItemGroup Condition="'$(Machine)'=='x86'">
|
|
|
|
|
|
|
|
<NativeSource Include="Native\ix86\Math.cpp"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_lldiv.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_llmul.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_llshl.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_llshr.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_llrem.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_memcpy.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_memset.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_ulldiv.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_ulldvrm.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_ullrem.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\_ullshr.asm"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\ix86\halkdx.cpp"><OutputRelativeDir>Native\ix86\</OutputRelativeDir></NativeSource>
|
|
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<ItemGroup Condition="'$(Machine)'=='arm'">
|
|
|
|
<NativeIncludes Include="Native\arm\hal.inc"/>
|
|
|
|
|
|
|
|
<NativeSource Include="Native\arm\Math.cpp"><OutputRelativeDir>Native\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\arm\Thread.cpp"><OutputRelativeDir>Native\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\arm\halkdarm.cpp"><OutputRelativeDir>Native\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\arm\lies.asm"><OutputRelativeDir>Native\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\arm\kdasm.asm"><OutputRelativeDir>Native\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\arm\interlocked_v5.asm"><OutputRelativeDir>Native\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Singularity\Isal\arm\context.asm"><OutputRelativeDir>Singularity\Isal\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Singularity\Isal\arm\interrupt.asm"><OutputRelativeDir>Singularity\Isal\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Singularity\Isal\arm\isa.asm"><OutputRelativeDir>Singularity\Isal\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Singularity\Isal\arm\isatodo.asm"><OutputRelativeDir>Singularity\Isal\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Singularity\Isal\arm\XscaleMmu.asm"><OutputRelativeDir>Singularity\Isal\arm\</OutputRelativeDir></NativeSource>
|
|
|
|
|
|
|
|
<!-- <NativeSource Include="Native\arm\halstack.asm"/> -->
|
|
|
|
|
|
|
|
<!-- Compiler intrinsics and runtime. -->
|
|
|
|
<NativeSource Include="Native\Arm\Crt\__div.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\__div0.cpp"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\__udiv.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\add.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\check.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\div.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\e2d.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\error.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\fnorm2.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\fpdata.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\fpraise.cpp"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\mdsdiv64.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\memcpy.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\memmove.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\memset.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\mul.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\nans.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\normal.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\normop1.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\normop2.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_addd.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_adds.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_divd.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_divs.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_dtoi.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_dtoi64.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_dtos.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_dtou.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_dtou64.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_eqd.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_eqs.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_ged.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_ges.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_gtd.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_gts.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_i64tod.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_i64tos.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_itod.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_itos.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_led.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_les.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_ltd.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_lts.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_muld.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_muls.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_ned.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_negd.cpp"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_nes.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_stod.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_stoi.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_stoi64.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_stou.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\Arm\Crt\r_stou64.asm"><OutputRelativeDir>Native\Arm\Crt\</OutputRelativeDir></NativeSource>
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<ItemGroup Condition="'$(Machine)'=='arm' and '$(Platform)'=='Omap3430'">
|
|
|
|
<NativeSource Include="Native\Halkduart.cpp"><OutputRelativeDir>Native\</OutputRelativeDir></NativeSource>
|
|
|
|
<NativeSource Include="Native\arm\cyclecounter.asm"><OutputRelativeDir>Native\arm\</OutputRelativeDir></NativeSource>
|
2008-03-05 09:52:00 -05:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<!-- This target creates __native_objs items from NativeSource items. -->
|
|
|
|
<Target Name="CreateNativeItems">
|
2008-11-17 18:29:00 -05:00
|
|
|
<CreateItem Include="$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).obj">
|
2008-03-05 09:52:00 -05:00
|
|
|
<Output ItemName="__native_objs" TaskParameter="Include"/>
|
|
|
|
</CreateItem>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Note: This target uses batching. All tasks within the target will be executed, once for each distinct
|
2008-11-17 18:29:00 -05:00
|
|
|
value of %(NativeSource.identity).
|
|
|
|
|
2008-03-05 09:52:00 -05:00
|
|
|
Notes about dependency checking: In general, we do not attempt to do fine-grained dependency checking
|
|
|
|
on #include dependencies, because:
|
|
|
|
* doing so is error-prone (the dependencies are in the code, not in the project)
|
|
|
|
* we don't have much C++ code, so it compiles fast
|
|
|
|
* nearly all of the C++ files depend on halclass.h, which is generated when any IL changes
|
2008-11-17 18:29:00 -05:00
|
|
|
|
2008-03-05 09:52:00 -05:00
|
|
|
So we just punt, and declare that all native sources depend on halclass.h (and halclass.inc),
|
|
|
|
and the handful of native header files that we have, which are declared as NativeIncludes items.
|
|
|
|
This means that we are conservative about dependencies; we may rebuild code when it is not strictly
|
|
|
|
necessary, but this is better than not building code that really has changed.
|
2008-11-17 18:29:00 -05:00
|
|
|
|
2008-03-05 09:52:00 -05:00
|
|
|
This target depends on CompileKernelObj because Bartok generates halclass.h / halclass.inc.
|
|
|
|
-->
|
|
|
|
<Target Name="CompileNativeSources"
|
|
|
|
Inputs="
|
|
|
|
%(NativeSource.identity);
|
|
|
|
%(NativeSource.Dependencies);
|
|
|
|
@(NativeIncludes);
|
|
|
|
$(KERNEL_NATIVE_DIR)\halclass.h;
|
|
|
|
$(KERNEL_NATIVE_DIR)\halclass.inc;
|
|
|
|
"
|
2008-11-17 18:29:00 -05:00
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).obj"
|
|
|
|
DependsOnTargets="CompileKernelObj;BuildNativeIncludes;CreateNativeItems;MakeDirs">
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
<MakeDir Directories="$(KERNEL_NATIVE_DIR)"/>
|
2008-11-17 18:29:00 -05:00
|
|
|
<MakeDir Directories="$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)"/>
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
<!-- Compile C++ sources -->
|
|
|
|
<Exec Condition="'%(NativeSource.extension)'=='.c' or '%(NativeSource.extension)'=='.cpp'"
|
2008-11-17 18:29:00 -05:00
|
|
|
Command="$(CC) $(CFLAGS) %(NativeSource.CFlags) $(ACFLAGS) $(GC_ML_DEFS) /I"$(KERNEL_NATIVE_DIR)" /INative /INative/$(Machine) /FAsc /Fa"$(KERNEL_NATIVE_DIR)\%(NativeSource.filename).lst" /Fd"$(KERNEL_NATIVE_DIR)\native.pdb" /Fo"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).obj" /c "%(NativeSource.identity)""/>
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
<!-- Compile assembly sources -->
|
|
|
|
<Exec Condition="'%(NativeSource.extension)'=='.asm'"
|
2008-11-17 18:29:00 -05:00
|
|
|
Command="$(AS) $(AFLAGS) $(ACFLAGS) $(GC_ML_DEFS) /I"$(KERNEL_NATIVE_DIR)" /INative /INative/$(Machine) /I"$(BartokSrcDir)\runtime\Singularity\native\arch\$(BARTOK_MACHINE)" /Fl"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).lst" /Fo"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).obj" /c "%(NativeSource.identity)""/>
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="BuildNativeLib"
|
|
|
|
DependsOnTargets="CompileNativeSources"
|
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\native.lib"
|
|
|
|
Inputs="@(__native_objs)">
|
|
|
|
<Message Text="Linking native lib - $(KERNEL_NATIVE_DIR)\native.lib"/>
|
|
|
|
<Delete Files="$(KERNEL_NATIVE_DIR)\native.lib"/>
|
2008-11-17 18:29:00 -05:00
|
|
|
<!-- NOTE: ARM lib seems to have a bug with long command lines, so use a temp file -->
|
|
|
|
<WriteLinesToFile File="$(TEMP)\nativelib.txt" Lines="@(__native_objs->'"%(Identity)"',' ')" Overwrite="true"/>
|
|
|
|
<Exec Command="$(LIB) $(LIBFLAGS) /nod /out:"$(KERNEL_NATIVE_DIR)\native.lib" @"$(TEMP)\nativelib.txt""/>
|
|
|
|
<Delete Files="$(TEMP)\nativelib.txt"/>
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!-- This target is useful for debugging build problems. -->
|
|
|
|
<Target Name="PreprocessNativeSources"
|
|
|
|
Inputs="%(NativeSource.identity)"
|
2008-11-17 18:29:00 -05:00
|
|
|
Outputs="$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).i"
|
|
|
|
DependsOnTargets="CompileKernelObj;BuildNativeIncludes;CreateNativeItems;MakeDirs">
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
<!-- Compile C++ sources -->
|
|
|
|
<Exec Condition="'%(NativeSource.extension)'=='.c' or '%(NativeSource.extension)'=='.cpp'"
|
2008-11-17 18:29:00 -05:00
|
|
|
Command="$(CC) /EP >"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).i" $(CFLAGS) $(ACFLAGS) $(GC_ML_DEFS) /I"$(KERNEL_NATIVE_DIR)" /INative /FAsc /Fa"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).lst" /Fd"$(KERNEL_NATIVE_DIR)\native.pdb" /Fo"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).obj" /c "%(NativeSource.identity)""/>
|
2008-03-05 09:52:00 -05:00
|
|
|
|
|
|
|
<!-- Compile assembly sources -->
|
|
|
|
<Exec Condition="'%(NativeSource.extension)'=='.asm'"
|
2008-11-17 18:29:00 -05:00
|
|
|
Command="$(AS) /EP >"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).i" $(AFLAGS) $(ACFLAGS) $(GC_ML_DEFS) /I"$(KERNEL_NATIVE_DIR)" /INative /Fl"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).lst" /Fo"$(KERNEL_NATIVE_DIR)\%(NativeSource.OutputRelativeDir)\%(NativeSource.filename).obj" /c "%(NativeSource.identity)""/>
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="ShowDebugInfo">
|
|
|
|
<Message Text="KERNEL_NATIVE_DIR: $(KERNEL_NATIVE_DIR)"/>
|
|
|
|
<Message Text="KERNEL_IL_DIR: $(KERNEL_IL_DIR)"/>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<ItemGroup>
|
|
|
|
<NativeIncludes Include="$(HalClassHFile)" />
|
|
|
|
<NativeIncludes Include="$(HalClassIncFile)" />
|
|
|
|
<NativeIncludes Include="$(KERNEL_NATIVE_DIR)\halclasswin.h" />
|
|
|
|
<NativeIncludes Include="$(KERNEL_NATIVE_DIR)\halclass.armfix.inc" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<Target Name="BuildNativeIncludes"
|
|
|
|
Inputs="$(HalClassTmpHFile);
|
|
|
|
$(HalClassTmpIncFile)"
|
|
|
|
Outputs="@(NativeIncludes)"
|
|
|
|
DependsOnTargets="CompileKernelObj">
|
|
|
|
<Exec Command=""$(SINGULARITY_ROOT)\Build\CheckedCopy.cmd" "$(HalClassTmpHFile)" "$(HalClassHFile)""/>
|
|
|
|
<Exec Command=""$(SINGULARITY_ROOT)\Build\CheckedCopy.cmd" "$(HalClassTmpIncFile)" "$(HalClassIncFile)""/>
|
|
|
|
|
|
|
|
<Exec Command=""$(SINGULARITY_ROOT)\Kernel\bar2win.cmd" "$(KERNEL_NATIVE_DIR)\halclass.h" "$(KERNEL_NATIVE_DIR)\_halclasswin.h""/>
|
|
|
|
<Exec Command=""$(SINGULARITY_ROOT)\Build\CheckedCopy.cmd" "$(KERNEL_NATIVE_DIR)\_halclasswin.h" "$(KERNEL_NATIVE_DIR)\halclasswin.h""/>
|
|
|
|
|
|
|
|
<Exec Command=""$(SINGULARITY_ROOT)\Kernel\bararmfix.cmd" "$(KERNEL_NATIVE_DIR)\halclass.inc" "$(KERNEL_NATIVE_DIR)\_halclass.armfix.inc""/>
|
|
|
|
<Exec Command=""$(SINGULARITY_ROOT)\Build\CheckedCopy.cmd" "$(KERNEL_NATIVE_DIR)\_halclass.armfix.inc" "$(KERNEL_NATIVE_DIR)\halclass.armfix.inc""/>
|
|
|
|
</Target>
|
|
|
|
|
2008-03-05 09:52:00 -05:00
|
|
|
<Target Name="CompileKernelObj"
|
|
|
|
Inputs="@(Reference)"
|
2008-11-17 18:29:00 -05:00
|
|
|
Outputs="
|
|
|
|
$(KERNEL_NATIVE_DIR)\kernel.obj;
|
|
|
|
$(KERNEL_NATIVE_DIR)\kernel_superObj.obj;
|
|
|
|
$(HalClassTmpHFile);
|
|
|
|
$(HalClassTmpIncFile);
|
|
|
|
"
|
2008-03-05 09:52:00 -05:00
|
|
|
DependsOnTargets="BuildDependentProjects;MakeDirs"
|
|
|
|
>
|
2008-11-17 18:29:00 -05:00
|
|
|
<Message Importance="High" Text="Compiling Kernel.obj native image"/>
|
2008-03-05 09:52:00 -05:00
|
|
|
<Message Text="IL assemblies:"/>
|
|
|
|
<Message Text=" %(Reference.identity)"/>
|
|
|
|
|
2008-11-17 18:29:00 -05:00
|
|
|
<!-- PATH $(SINGULARITY_PATH) -->
|
|
|
|
|
2008-03-05 09:52:00 -05:00
|
|
|
<Exec WorkingDirectory="$(SINGULARITY_ROOT)\build"
|
2008-11-17 18:29:00 -05:00
|
|
|
Command="$(BARTOK) $(BARTOK_COLLECTOR) $(BartokFlags) /out: "$(KernelObjPath)" @(Reference->'"%(identity)"',' ') $(KERNEL_BARTOK_LOG)"/>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="Clean">
|
|
|
|
<Delete Files="
|
|
|
|
$(KERNEL_NATIVE_DIR)\kernel.obj;
|
|
|
|
$(KERNEL_NATIVE_DIR)\kernel_superObj.obj;
|
|
|
|
$(KERNEL_NATIVE_DIR)\halclass.h;
|
|
|
|
$(KERNEL_NATIVE_DIR)\halclass.inc;
|
|
|
|
$(KERNEL_NATIVE_DIR)\halclasswin.h;
|
|
|
|
$(KERNEL_NATIVE_DIR)\halclass.armfix.inc;
|
|
|
|
$(KERNEL_NATIVE_DIR)\native.lib;
|
|
|
|
$(KERNEL_NATIVE_DIR)\Singularity.V1.candidates;
|
|
|
|
"/>
|
2008-03-05 09:52:00 -05:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
</Project>
|