Skip to content

Commit

Permalink
First pass. Making SpanDSP library compile on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
andywolk authored and mjerris committed Feb 3, 2025
1 parent 933d40d commit 31eba7c
Show file tree
Hide file tree
Showing 17 changed files with 658 additions and 270 deletions.
4 changes: 4 additions & 0 deletions src/make_modem_godard_descriptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
#if defined(__sunos) || defined(__solaris) || defined(__sun)
#include <getopt.h>
#endif
#if _MSC_VER
#include <config.h>
#include <getopt.c>
#endif

#include "spandsp/telephony.h"
#include "spandsp/complex.h"
Expand Down
5 changes: 5 additions & 0 deletions src/msvc/spandsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@
#endif
#include <spandsp/telephony.h>
#include <spandsp/alloc.h>
#include <spandsp/unaligned.h>
#include <spandsp/fast_convert.h>
#include <spandsp/logging.h>
#include <spandsp/complex.h>
#include <spandsp/bit_operations.h>
#include <spandsp/bitstream.h>
#include <spandsp/queue.h>
#include <spandsp/agc_float.h>
#include <spandsp/schedule.h>
#include <spandsp/g711.h>
#include <spandsp/timing.h>
Expand Down Expand Up @@ -97,6 +99,8 @@
#include <spandsp/modem_connect_tones.h>
#include <spandsp/silence_gen.h>
#include <spandsp/v8.h>
#include <spandsp/v80.h>
#include <spandsp/godard.h>
#include <spandsp/v29rx.h>
#include <spandsp/v29tx.h>
#include <spandsp/v17rx.h>
Expand All @@ -114,6 +118,7 @@
#include <spandsp/v42bis.h>
#include <spandsp/v18.h>
#include <spandsp/timezone.h>
#include <spandsp/ssl_fax.h>
#include <spandsp/t4_rx.h>
#include <spandsp/t4_tx.h>
#include <spandsp/image_translate.h>
Expand Down
2 changes: 1 addition & 1 deletion src/v150_1_sse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ SPAN_DECLARE(int) v150_1_tx_sse_packet(v150_1_state_t *s, int event, int ric, in
}
/*- End of function --------------------------------------------------------*/

SPAN_DECLARE(int) v150_1_sse_timer_expired(v150_1_state_t *s, span_timestamp_t now)
int v150_1_sse_timer_expired(v150_1_state_t *s, span_timestamp_t now)
{
v150_1_sse_state_t *sse;

Expand Down
2 changes: 1 addition & 1 deletion tests/v22bis_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ static void qam_report(void *user_data, const complexf_t *constel, const complex
#else
printf("%3d (%15.5f, %15.5f) -> %15.5f\n", i, coeffs[i].re, coeffs[i].im, powerf(&coeffs[i]));
#endif
#if defined(ENABLE_GUI)
}
/*endfor*/
#if defined(ENABLE_GUI)
if (use_gui)
{
#if defined(SPANDSP_USE_FIXED_POINT)
Expand Down
209 changes: 166 additions & 43 deletions win/SpanDSP.sln

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions win/libs/win32/libjpeg/libjpeg.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-static|Win32">
<Configuration>Release-static</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-static|x64">
<Configuration>Release-static</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
Expand Down Expand Up @@ -89,14 +97,18 @@
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'">Disabled</Optimization>
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</BufferSecurityCheck>
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</BufferSecurityCheck>
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</BufferSecurityCheck>
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'">false</BufferSecurityCheck>
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'">false</BufferSecurityCheck>
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</BufferSecurityCheck>
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'">false</BufferSecurityCheck>
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'">false</BufferSecurityCheck>
</ClCompile>
</ItemGroup>
<PropertyGroup Label="Globals">
Expand Down Expand Up @@ -134,6 +146,13 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
Expand All @@ -148,6 +167,13 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand All @@ -167,6 +193,10 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\w32\extlib.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\w32\extlib.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\w32\extlib.props" />
Expand All @@ -175,6 +205,10 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\w32\extlib.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\w32\extlib.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand Down Expand Up @@ -273,6 +307,31 @@
<Command>if not exist "$(ProjectDir)..\..\jpeg-8d\jconfig.h" type "$(ProjectDir)..\..\jpeg-8d\jconfig.vc" &gt; "$(ProjectDir)..\..\jpeg-8d\jconfig.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>false</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<AdditionalIncludeDirectories>..\..\jpeg-8d;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WholeProgramOptimization>false</WholeProgramOptimization>
<Optimization>Disabled</Optimization>
<DisableSpecificWarnings>4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>if not exist "$(ProjectDir)..\..\jpeg-8d\jconfig.h" type "$(ProjectDir)..\..\jpeg-8d\jconfig.vc" &gt; "$(ProjectDir)..\..\jpeg-8d\jconfig.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand Down Expand Up @@ -325,6 +384,31 @@
<Command>if not exist "$(ProjectDir)..\..\jpeg-8d\jconfig.h" type "$(ProjectDir)..\..\jpeg-8d\jconfig.vc" &gt; "$(ProjectDir)..\..\jpeg-8d\jconfig.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>false</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<OmitFramePointers>true</OmitFramePointers>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<AdditionalIncludeDirectories>..\..\jpeg-8d;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WholeProgramOptimization>true</WholeProgramOptimization>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<DisableSpecificWarnings>4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
<Command>if not exist "$(ProjectDir)..\..\jpeg-8d\jconfig.h" type "$(ProjectDir)..\..\jpeg-8d\jconfig.vc" &gt; "$(ProjectDir)..\..\jpeg-8d\jconfig.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
26 changes: 26 additions & 0 deletions win/libs/win32/spandsp/libspandsp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
<ClCompile Include="$(SolutionDir)\..\src\g711.c" />
<ClCompile Include="$(SolutionDir)\..\src\g722.c" />
<ClCompile Include="$(SolutionDir)\..\src\g726.c" />
<ClCompile Include="$(SolutionDir)\..\src\godard.c" />
<ClCompile Include="$(SolutionDir)\..\src\gsm0610_decode.c" />
<ClCompile Include="$(SolutionDir)\..\src\gsm0610_encode.c" />
<ClCompile Include="$(SolutionDir)\..\src\gsm0610_long_term.c" />
Expand Down Expand Up @@ -400,11 +401,16 @@
<ClCompile Include="$(SolutionDir)\..\src\v42.c" />
<ClCompile Include="$(SolutionDir)\..\src\v42bis.c" />
<ClCompile Include="$(SolutionDir)\..\src\v8.c" />
<ClCompile Include="$(SolutionDir)\..\src\v80.c" />
<ClCompile Include="$(SolutionDir)\..\src\vector_float.c" />
<ClCompile Include="$(SolutionDir)\..\src\vector_int.c" />
<ClCompile Include="$(SolutionDir)\..\src\msvc\gettimeofday.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v34_local.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v34_tables.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v34_superconstellation_map.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v150_1_local.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\ademco_contactid.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\adsi.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\alloc.h" />
Expand Down Expand Up @@ -436,6 +442,7 @@
<ClInclude Include="$(SolutionDir)\..\src\spandsp\g711.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\g722.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\g726.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\godard.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\gsm0610.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\hdlc.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\ima_adpcm.h" />
Expand All @@ -456,6 +463,7 @@
<ClInclude Include="$(SolutionDir)\..\src\spandsp\sig_tone.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\silence_gen.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\sprt.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\stdbool.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\super_tone_rx.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\super_tone_tx.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\swept_tone.h" />
Expand All @@ -482,6 +490,7 @@
<ClInclude Include="$(SolutionDir)\..\src\spandsp\timing.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\tone_detect.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\tone_generate.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\unaligned.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v150_1.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v150_1_sse.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v17rx.h" />
Expand All @@ -495,6 +504,7 @@
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v42.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v42bis.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v8.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\v80.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\vector_float.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\vector_int.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\version.h" />
Expand Down Expand Up @@ -568,6 +578,7 @@
<ClInclude Include="$(SolutionDir)\..\src\spandsp\private\v42.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\private\v42bis.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\private\v8.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\private\v80.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp\expose.h" />
<ClInclude Include="$(SolutionDir)\..\src\spandsp.h" />
<CustomBuild Include="$(SolutionDir)\..\src\msvc\spandsp.h">
Expand Down Expand Up @@ -612,10 +623,25 @@
<Project>{329a6fa0-0fcc-4435-a950-e670aefa9838}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="make_modem_godard_descriptor.vcxproj">
<Project>{c8ea4ad3-3edd-4dd1-9d63-4be22585aa14}</Project>
</ProjectReference>
<ProjectReference Include="make_t43_gray_code_tables.vcxproj">
<Project>{eddb8ab9-c53e-44c0-a620-0e86c2cbd5d5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="make_v34_convolutional_coders.vcxproj">
<Project>{368924d6-ac75-42ae-9d64-7e3eb3fd109c}</Project>
</ProjectReference>
<ProjectReference Include="make_v34_probe_signals.vcxproj">
<Project>{d33e088b-0a1a-498e-b825-9e49040e28df}</Project>
</ProjectReference>
<ProjectReference Include="make_v34_shell_map.vcxproj">
<Project>{4a1ca87f-32ef-428e-8d55-7f0d6d91516b}</Project>
</ProjectReference>
<ProjectReference Include="make_v34_tx_pre_emphasis_filters.vcxproj">
<Project>{97035e2a-392e-40d1-b27d-da700a1fdb49}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
Loading

0 comments on commit 31eba7c

Please sign in to comment.