5a4920c48f
It seems that gmake can livelock in parallel make mode on Windows in some cases. This provides an escape hatch for those cases.
122 lines
3.8 KiB
XML
122 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<PropertyGroup Label="Globals">
|
|
<ProjectGuid>{F934AB7B-186B-4E96-B20C-A58C38C1B819}</ProjectGuid>
|
|
<Keyword>MakeFileProj</Keyword>
|
|
<ConfigurationType>Makefile</ConfigurationType>
|
|
</PropertyGroup>
|
|
|
|
<!-- Aegisub project configuration -->
|
|
<ImportGroup Label="PropertySheets">
|
|
<Import Project="$(MSBuildThisFileDirectory)..\aegisub.props" />
|
|
</ImportGroup>
|
|
|
|
<PropertyGroup Label="ConfigArgs">
|
|
<CfgDebug Condition="'$(Configuration)' == 'Debug'">--enable-debug --disable-stripping --extra-cflags=-MDd</CfgDebug>
|
|
<CfgDebug Condition="'$(Configuration)' == 'Release'">--disable-debug --extra-cflags=-MD</CfgDebug>
|
|
<CfgArgs>
|
|
--disable-avfilter
|
|
--disable-avresample
|
|
--disable-bzlib
|
|
--disable-devices
|
|
--disable-doc
|
|
--disable-encoders
|
|
--disable-ffmpeg
|
|
--disable-ffplay
|
|
--disable-ffprobe
|
|
--disable-ffserver
|
|
--disable-filters
|
|
--disable-hwaccels
|
|
--disable-muxers
|
|
--disable-network
|
|
--disable-postproc
|
|
--disable-pthreads
|
|
--disable-shared
|
|
--disable-swresample
|
|
--enable-avresample
|
|
--enable-gpl
|
|
--enable-runtime-cpudetect
|
|
--enable-static
|
|
--enable-zlib
|
|
--extra-cflags=-D_SYSCRT
|
|
--extra-cflags=-wd4005
|
|
--extra-cflags=-wd4189
|
|
--toolchain=msvc
|
|
$(CfgDebug)
|
|
</CfgArgs>
|
|
<AbsSrcDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)$(FfmpegSrcDir)'))</AbsSrcDir>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ConfigureInput Include="$(AbsSrcDir)\configure" />
|
|
|
|
<ConfigureOutput Include="$(AegisubObjectDir)config.*" />
|
|
<ConfigureOutput Include="$(AegisubObjectDir)Makefile" />
|
|
<ConfigureOutput Include="$(AegisubObjectDir)libavutil\avconfig.h" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="Configure"
|
|
Inputs="@(ConfigureInput)"
|
|
Outputs="@(ConfigureOutput)"
|
|
>
|
|
<MsysPath Path="$(AegisubObjectDir)\temp">
|
|
<Output TaskParameter="Result" PropertyName="CfgPrefix" />
|
|
</MsysPath>
|
|
|
|
<MsysPath Path="$(MSBuildThisFileDirectory)../../include">
|
|
<Output TaskParameter="Result" PropertyName="CfgIncludePrefix" />
|
|
</MsysPath>
|
|
|
|
<MsysPath Path="$(AegisubLibraryDir)">
|
|
<Output TaskParameter="Result" PropertyName="CfgLibPrefix" />
|
|
</MsysPath>
|
|
|
|
<Delete Files="$(AegisubObjectDir)build.timestamp" />
|
|
|
|
<ExecShellScript
|
|
Command="$(AbsSrcDir)\configure"
|
|
Arguments="$(CfgArgs) --prefix=$(CfgPrefix) --libdir=$(CfgLibPrefix) --incdir=$(CfgIncludePrefix)"
|
|
WorkingDirectory="$(AegisubObjectDir)"
|
|
Configuration="@(ExecShellScript)"
|
|
/>
|
|
|
|
<!-- Ensure that Makefile has a recent modified time to avoid
|
|
rerunning configure pointlessly -->
|
|
<Touch Files="@(ConfigureOutput)" />
|
|
</Target>
|
|
|
|
<Target Name="Compile"
|
|
Inputs="$(FfmpegSrcDir)"
|
|
Outputs="$(AegisubObjectDir)build.timestamp"
|
|
>
|
|
<ExecShellScript
|
|
Command="make"
|
|
Arguments="$(GmakeParallelBuild)"
|
|
WorkingDirectory="$(AegisubObjectDir)"
|
|
Configuration="@(ExecShellScript)"
|
|
/>
|
|
|
|
<ExecShellScript
|
|
Command="make install"
|
|
WorkingDirectory="$(AegisubObjectDir)"
|
|
Configuration="@(ExecShellScript)"
|
|
/>
|
|
|
|
<Touch Files="$(AegisubObjectDir)build.timestamp" AlwaysCreate="true" />
|
|
</Target>
|
|
|
|
<Target Name="Build">
|
|
<Error Condition="!Exists('$(AbsSrcDir)')" Text="FFmpeg source not found at '$(AbsSrcDir)'" />
|
|
|
|
<CallTarget Targets="Configure" />
|
|
<CallTarget Targets="Compile" />
|
|
</Target>
|
|
|
|
<Target Name="Clean">
|
|
<RemoveDir Directories="$(AegisubObjectDir)" ContinueOnError="WarnAndContinue" />
|
|
</Target>
|
|
|
|
<Target Name="Rebuild">
|
|
<CallTarget Targets="Clean;Build" />
|
|
</Target>
|
|
</Project>
|