Compile c-ares into libuv
This commit is contained in:
parent
a9838a1cbb
commit
dae2c09796
@ -24,7 +24,7 @@ CC = $(PREFIX)gcc
|
||||
AR = $(PREFIX)ar
|
||||
E=.exe
|
||||
|
||||
CFLAGS=-g --std=gnu89 -Wno-variadic-macros
|
||||
CFLAGS=-g --std=gnu89 -Wno-variadic-macros -D_WIN32_WINNT=0x0501
|
||||
LINKFLAGS=-lm
|
||||
|
||||
RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE # Need _GNU_SOURCE for strdup?
|
||||
@ -32,8 +32,9 @@ RUNNER_LINKFLAGS=$(LINKFLAGS)
|
||||
RUNNER_LIBS=-lws2_32
|
||||
RUNNER_SRC=test/runner-win.c
|
||||
|
||||
uv.a: uv-win.o uv-common.o
|
||||
uv.a: uv-win.o uv-common.o c-ares/libcares.a
|
||||
$(AR) rcs uv.a uv-win.o uv-common.o
|
||||
$(AR) rs uv.a $(shell $(AR) -t c-ares/libcares.a | awk '{print "c-ares/" $$1}')
|
||||
|
||||
uv-win.o: uv-win.c uv.h uv-win.h
|
||||
$(CC) $(CFLAGS) -c uv-win.c -o uv-win.o
|
||||
@ -41,5 +42,11 @@ uv-win.o: uv-win.c uv.h uv-win.h
|
||||
uv-common.o: uv-common.c uv.h uv-win.h
|
||||
$(CC) $(CFLAGS) -c uv-common.c -o uv-common.o
|
||||
|
||||
distclean-platform:
|
||||
c-ares/libcares.a:
|
||||
$(MAKE) -C c-ares -f Makefile.m32 libcares.a
|
||||
|
||||
clean-platform:
|
||||
$(MAKE) -C c-ares -f Makefile.m32 clean
|
||||
|
||||
distclean-platform:
|
||||
$(MAKE) -C c-ares -f Makefile.m32 distclean
|
||||
|
||||
@ -35,8 +35,9 @@ RUNNER_LINKFLAGS=$(LINKFLAGS) -pthread
|
||||
RUNNER_LIBS=
|
||||
RUNNER_SRC=test/runner-unix.c
|
||||
|
||||
uv.a: uv-unix.o uv-common.o ev/ev.o
|
||||
uv.a: uv-unix.o uv-common.o ev/ev.o c-ares/libcares.a
|
||||
$(AR) rcs uv.a uv-unix.o uv-common.o ev/ev.o
|
||||
$(AR) rs uv.a $(shell $(AR) -t c-ares/libcares.a | awk '{print "c-ares/" $$1}')
|
||||
|
||||
uv-unix.o: uv-unix.c uv.h uv-unix.h
|
||||
$(CC) $(CFLAGS) -c uv-unix.c -o uv-unix.o
|
||||
@ -50,6 +51,9 @@ ev/ev.o: ev/config.h ev/ev.c
|
||||
ev/config.h:
|
||||
cd ev && ./configure
|
||||
|
||||
c-ares/libcares.a:
|
||||
# TODO!
|
||||
|
||||
clean-platform:
|
||||
$(MAKE) -C ev clean
|
||||
|
||||
|
||||
183
msvs/c-ares.vcxproj
Normal file
183
msvs/c-ares.vcxproj
Normal file
@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</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" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)..\build\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\build\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)..\build\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\build\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)..\build\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\build\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)..\build\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)..\build\$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;CARES_BUILDING_LIBRARY;CARES_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\c-ares</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;CARES_BUILDING_LIBRARY;CARES_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\c-ares</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>..\c-ares</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_LIB;CARES_BUILDING_LIBRARY;CARES_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>..\c-ares</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_LIB;CARES_BUILDING_LIBRARY;CARES_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\c-ares\ares__close_sockets.c" />
|
||||
<ClCompile Include="..\c-ares\ares__get_hostent.c" />
|
||||
<ClCompile Include="..\c-ares\ares__read_line.c" />
|
||||
<ClCompile Include="..\c-ares\ares__timeval.c" />
|
||||
<ClCompile Include="..\c-ares\ares_cancel.c" />
|
||||
<ClCompile Include="..\c-ares\ares_data.c" />
|
||||
<ClCompile Include="..\c-ares\ares_destroy.c" />
|
||||
<ClCompile Include="..\c-ares\ares_expand_name.c" />
|
||||
<ClCompile Include="..\c-ares\ares_expand_string.c" />
|
||||
<ClCompile Include="..\c-ares\ares_fds.c" />
|
||||
<ClCompile Include="..\c-ares\ares_free_hostent.c" />
|
||||
<ClCompile Include="..\c-ares\ares_free_string.c" />
|
||||
<ClCompile Include="..\c-ares\ares_getenv.c" />
|
||||
<ClCompile Include="..\c-ares\ares_gethostbyaddr.c" />
|
||||
<ClCompile Include="..\c-ares\ares_gethostbyname.c" />
|
||||
<ClCompile Include="..\c-ares\ares_getnameinfo.c" />
|
||||
<ClCompile Include="..\c-ares\ares_getsock.c" />
|
||||
<ClCompile Include="..\c-ares\ares_init.c" />
|
||||
<ClCompile Include="..\c-ares\ares_library_init.c" />
|
||||
<ClCompile Include="..\c-ares\ares_llist.c" />
|
||||
<ClCompile Include="..\c-ares\ares_mkquery.c" />
|
||||
<ClCompile Include="..\c-ares\ares_nowarn.c" />
|
||||
<ClCompile Include="..\c-ares\ares_options.c" />
|
||||
<ClCompile Include="..\c-ares\ares_parse_a_reply.c" />
|
||||
<ClCompile Include="..\c-ares\ares_parse_aaaa_reply.c" />
|
||||
<ClCompile Include="..\c-ares\ares_parse_mx_reply.c" />
|
||||
<ClCompile Include="..\c-ares\ares_parse_ns_reply.c" />
|
||||
<ClCompile Include="..\c-ares\ares_parse_ptr_reply.c" />
|
||||
<ClCompile Include="..\c-ares\ares_parse_srv_reply.c" />
|
||||
<ClCompile Include="..\c-ares\ares_parse_txt_reply.c" />
|
||||
<ClCompile Include="..\c-ares\ares_platform.c" />
|
||||
<ClCompile Include="..\c-ares\ares_process.c" />
|
||||
<ClCompile Include="..\c-ares\ares_query.c" />
|
||||
<ClCompile Include="..\c-ares\ares_search.c" />
|
||||
<ClCompile Include="..\c-ares\ares_send.c" />
|
||||
<ClCompile Include="..\c-ares\ares_strcasecmp.c" />
|
||||
<ClCompile Include="..\c-ares\ares_strdup.c" />
|
||||
<ClCompile Include="..\c-ares\ares_strerror.c" />
|
||||
<ClCompile Include="..\c-ares\ares_timeout.c" />
|
||||
<ClCompile Include="..\c-ares\ares_version.c" />
|
||||
<ClCompile Include="..\c-ares\ares_writev.c" />
|
||||
<ClCompile Include="..\c-ares\bitncmp.c" />
|
||||
<ClCompile Include="..\c-ares\inet_net_pton.c" />
|
||||
<ClCompile Include="..\c-ares\inet_ntop.c" />
|
||||
<ClCompile Include="..\c-ares\windows_port.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\c-ares\ares.h" />
|
||||
<ClInclude Include="..\c-ares\ares_build.h" />
|
||||
<ClInclude Include="..\c-ares\ares_data.h" />
|
||||
<ClInclude Include="..\c-ares\ares_dns.h" />
|
||||
<ClInclude Include="..\c-ares\ares_getenv.h" />
|
||||
<ClInclude Include="..\c-ares\ares_iphlpapi.h" />
|
||||
<ClInclude Include="..\c-ares\ares_ipv6.h" />
|
||||
<ClInclude Include="..\c-ares\ares_library_init.h" />
|
||||
<ClInclude Include="..\c-ares\ares_llist.h" />
|
||||
<ClInclude Include="..\c-ares\ares_nowarn.h" />
|
||||
<ClInclude Include="..\c-ares\ares_platform.h" />
|
||||
<ClInclude Include="..\c-ares\ares_private.h" />
|
||||
<ClInclude Include="..\c-ares\ares_rules.h" />
|
||||
<ClInclude Include="..\c-ares\ares_setup.h" />
|
||||
<ClInclude Include="..\c-ares\ares_strcasecmp.h" />
|
||||
<ClInclude Include="..\c-ares\ares_strdup.h" />
|
||||
<ClInclude Include="..\c-ares\ares_version.h" />
|
||||
<ClInclude Include="..\c-ares\ares_writev.h" />
|
||||
<ClInclude Include="..\c-ares\bitncmp.h" />
|
||||
<ClInclude Include="..\c-ares\config-win32.h" />
|
||||
<ClInclude Include="..\c-ares\inet_net_pton.h" />
|
||||
<ClInclude Include="..\c-ares\inet_ntop.h" />
|
||||
<ClInclude Include="..\c-ares\nameser.h" />
|
||||
<ClInclude Include="..\c-ares\setup_once.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@ -7,6 +7,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libuv-test", "libuv-test.vc
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libuv-benchmark", "libuv-benchmark.vcxproj", "{6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c-ares", "c-ares.vcxproj", "{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -39,6 +41,14 @@ Global
|
||||
{6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Release|Win32.Build.0 = Release|Win32
|
||||
{6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Release|x64.ActiveCfg = Release|x64
|
||||
{6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Release|x64.Build.0 = Release|x64
|
||||
{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Debug|x64.Build.0 = Debug|x64
|
||||
{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Release|Win32.Build.0 = Release|Win32
|
||||
{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Release|x64.ActiveCfg = Release|x64
|
||||
{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -130,6 +130,16 @@
|
||||
<None Include="..\Makefile" />
|
||||
<None Include="..\README" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="c-ares.vcxproj">
|
||||
<Project>{2b6a4644-eba9-dfb5-af35-6c56edf05c7f}</Project>
|
||||
<Private>true</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user