diff options
Diffstat (limited to 'libcommon')
-rw-r--r-- | libcommon/Makefile.am | 7 | ||||
-rw-r--r-- | libcommon/common/Makefile.am | 12 | ||||
-rw-r--r-- | libcommon/common/common.cxx (renamed from libcommon/common.cxx) | 8 | ||||
-rw-r--r-- | libcommon/common/common.hxx (renamed from libcommon/common.hxx) | 10 | ||||
-rw-r--r-- | libcommon/common/config.h.in (renamed from libcommon/config.h.in) | 8 | ||||
-rw-r--r-- | libcommon/common/export.hxx (renamed from libcommon/export.hxx) | 10 | ||||
-rw-r--r-- | libcommon/common/libcommon-vc10.vcxproj | 174 | ||||
-rw-r--r-- | libcommon/common/libcommon-vc10.vcxproj.filters | 19 | ||||
-rw-r--r-- | libcommon/common/libcommon-vc9.vcproj | 359 | ||||
-rw-r--r-- | libcommon/common/makefile | 124 | ||||
-rw-r--r-- | libcommon/common/options.cli (renamed from libcommon/options.cli) | 2 | ||||
-rw-r--r-- | libcommon/common/options.cxx (renamed from libcommon/options.cxx) | 0 | ||||
-rw-r--r-- | libcommon/common/options.hxx (renamed from libcommon/options.hxx) | 6 | ||||
-rw-r--r-- | libcommon/common/options.ixx (renamed from libcommon/options.ixx) | 0 | ||||
-rw-r--r-- | libcommon/libcommon-vc10.sln | 26 | ||||
-rw-r--r-- | libcommon/libcommon-vc9.sln | 26 | ||||
-rw-r--r-- | libcommon/makefile | 121 |
17 files changed, 779 insertions, 133 deletions
diff --git a/libcommon/Makefile.am b/libcommon/Makefile.am index d42cff2..e498e3b 100644 --- a/libcommon/Makefile.am +++ b/libcommon/Makefile.am @@ -3,10 +3,5 @@ # copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file -noinst_LTLIBRARIES = libcommon.la -libcommon_la_SOURCES = __path__(sources) __path__(headers) - +SUBDIRS = __path__(dirs) EXTRA_DIST = __file__(extra_dist) - -libcommon_la_CPPFLAGS= -I'$(builddir)' -I'$(srcdir)' -DLIBCOMMON_DYNAMIC_LIB -libcommon_la_LDFLAGS = -no-undefined -rpath '$(libdir)' diff --git a/libcommon/common/Makefile.am b/libcommon/common/Makefile.am new file mode 100644 index 0000000..6712eaa --- /dev/null +++ b/libcommon/common/Makefile.am @@ -0,0 +1,12 @@ +# file : libcommon/common/Makefile.am +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +noinst_LTLIBRARIES = libcommon.la +libcommon_la_SOURCES = __path__(sources) __path__(headers) + +EXTRA_DIST = __file__(extra_dist) + +libcommon_la_CPPFLAGS= -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' -DLIBCOMMON_DYNAMIC_LIB +libcommon_la_LDFLAGS = -no-undefined -rpath '$(libdir)' diff --git a/libcommon/common.cxx b/libcommon/common/common.cxx index 0c88818..d68d579 100644 --- a/libcommon/common.cxx +++ b/libcommon/common/common.cxx @@ -1,4 +1,4 @@ -// file : libcommon/common.cxx +// file : libcommon/common/common.cxx // author : Boris Kolpackov <boris@codesynthesis.com> // copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file @@ -7,15 +7,15 @@ #include <iostream> #ifndef _MSC_VER -# include <config.h> +# include <common/config.h> #endif #ifdef DB_ID_MYSQL # include <odb/mysql/database.hxx> #endif -#include "common.hxx" -#include "options.hxx" +#include <common/common.hxx> +#include <common/options.hxx> using namespace std; using namespace odb; diff --git a/libcommon/common.hxx b/libcommon/common/common.hxx index 411ece5..87b08f0 100644 --- a/libcommon/common.hxx +++ b/libcommon/common/common.hxx @@ -1,18 +1,18 @@ -// file : libcommon/common.hxx +// file : libcommon/common/common.hxx // author : Boris Kolpackov <boris@codesynthesis.com> // copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#ifndef LIBCOMMON_COMMON_HXX -#define LIBCOMMON_COMMON_HXX +#ifndef LIBCOMMON_COMMON_COMMON_HXX +#define LIBCOMMON_COMMON_COMMON_HXX #include <memory> // std::auto_ptr #include <odb/database.hxx> -#include <export.hxx> +#include <common/export.hxx> LIBCOMMON_EXPORT std::auto_ptr<odb::database> create_database (int argc, char* argv[]); -#endif // LIBCOMMON_COMMON_HXX +#endif // LIBCOMMON_COMMON_COMMON_HXX diff --git a/libcommon/config.h.in b/libcommon/common/config.h.in index 9d18901..06318c4 100644 --- a/libcommon/config.h.in +++ b/libcommon/common/config.h.in @@ -1,4 +1,4 @@ -/* file : libcommon/config.h.in +/* file : libcommon/common/config.h.in * author : Boris Kolpackov <boris@codesynthesis.com> * copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC * license : GNU GPL v2; see accompanying LICENSE file @@ -6,10 +6,10 @@ /* This file is automatically processed by configure. */ -#ifndef LIBCOMMON_CONFIG_H -#define LIBCOMMON_CONFIG_H +#ifndef LIBCOMMON_COMMON_CONFIG_H +#define LIBCOMMON_COMMON_CONFIG_H #undef DB_ID_MYSQL #undef LIBCOMMON_STATIC_LIB -#endif /* LIBCOMMON_CONFIG_H */ +#endif /* LIBCOMMON_COMMON_CONFIG_H */ diff --git a/libcommon/export.hxx b/libcommon/common/export.hxx index 8bbb96c..4ea2d33 100644 --- a/libcommon/export.hxx +++ b/libcommon/common/export.hxx @@ -1,13 +1,13 @@ -// file : libcommon/export.hxx +// file : libcommon/common/export.hxx // author : Boris Kolpackov <boris@codesynthesis.com> // copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#ifndef LIBCOMMON_EXPORT_HXX -#define LIBCOMMON_EXPORT_HXX +#ifndef LIBCOMMON_COMMON_EXPORT_HXX +#define LIBCOMMON_COMMON_EXPORT_HXX #ifndef _MSC_VER -# include <config.h> +# include <common/config.h> #endif #ifdef LIBCOMMON_STATIC_LIB @@ -36,4 +36,4 @@ # endif #endif -#endif // LIBCOMMON_EXPORT_HXX +#endif // LIBCOMMON_COMMON_EXPORT_HXX diff --git a/libcommon/common/libcommon-vc10.vcxproj b/libcommon/common/libcommon-vc10.vcxproj new file mode 100644 index 0000000..74d704b --- /dev/null +++ b/libcommon/common/libcommon-vc10.vcxproj @@ -0,0 +1,174 @@ +<?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"> + <ProjectGuid>{019C2E51-BF41-4490-AB96-4156741B8CC9}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>libcommon</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </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'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>..\bin\</OutDir> + <TargetName>common-d</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>..\bin64\</OutDir> + <TargetName>common-d</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>..\bin\</OutDir> + <TargetName>common</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>..\bin64\</OutDir> + <TargetName>common</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories> + <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>odb-__value__(database)-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <OutputFile>$(TargetPath)</OutputFile> + <ImportLibrary>..\lib\common-d.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories> + <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>odb-__value__(database)-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <OutputFile>$(TargetPath)</OutputFile> + <ImportLibrary>..\lib64\common-d.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories> + <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>odb-__value__(database).lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <OutputFile>$(TargetPath)</OutputFile> + <ImportLibrary>..\lib\common.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..</AdditionalIncludeDirectories> + <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>odb-__value__(database).lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <OutputFile>$(TargetPath)</OutputFile> + <ImportLibrary>..\lib64\common.lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemGroup> +__header_entries__(headers) + </ItemGroup> + <ItemGroup> +__source_entries__(sources) + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> diff --git a/libcommon/common/libcommon-vc10.vcxproj.filters b/libcommon/common/libcommon-vc10.vcxproj.filters new file mode 100644 index 0000000..ecc3613 --- /dev/null +++ b/libcommon/common/libcommon-vc10.vcxproj.filters @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{6B7BDACA-0BDC-48B2-B5BD-BEFC5826ABC9}</UniqueIdentifier> + <Extensions>cxx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{F2B8743C-E39C-4FE0-AA8F-FF7FA2DA7191}</UniqueIdentifier> + <Extensions>h;hxx;ixx;txx</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> +__header_filter_entries__(headers) + </ItemGroup> + <ItemGroup> +__source_filter_entries__(sources) + </ItemGroup> +</Project> diff --git a/libcommon/common/libcommon-vc9.vcproj b/libcommon/common/libcommon-vc9.vcproj new file mode 100644 index 0000000..412480b --- /dev/null +++ b/libcommon/common/libcommon-vc9.vcproj @@ -0,0 +1,359 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="libcommon" + ProjectGUID="{8575F058-1BD6-4F97-8901-83D0110C2B6B}" + RootNamespace="libcommon" + Keyword="Win32Proj" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".." + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/wd4355 /wd4800 /wd4290" + Optimization="0" + AdditionalIncludeDirectories=".." + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + CommandLine="if not exist ..\lib mkdir ..\lib" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="odb-__value__(database)-d.lib;odb-d.lib" + OutputFile="$(OutDir)\bin\common-d.dll" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="2" + ImportLibrary="$(OutDir)\lib\common-d.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory=".." + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/wd4355 /wd4800 /wd4290" + Optimization="0" + AdditionalIncludeDirectories=".." + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));__upcase__(db_id_)__upcase__(__value__(database));__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + CommandLine="if not exist ..\lib64 mkdir ..\lib64" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="odb-__value__(database)-d.lib;odb-d.lib" + OutputFile="$(OutDir)\bin64\common-d.dll" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="2" + ImportLibrary="$(OutDir)\lib64\common-d.lib" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".." + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/wd4355 /wd4800 /wd4290" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories=".." + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + CommandLine="if not exist ..\lib mkdir ..\lib" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="odb-__value__(database).lib;odb.lib" + OutputFile="$(OutDir)\bin\common.dll" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + ImportLibrary="$(OutDir)\lib\common.lib" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory=".." + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/wd4355 /wd4800 /wd4290" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories=".." + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;__upcase__(db_id_)__upcase__(__value__(database));LIBCOMMON_DYNAMIC_LIB" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + CommandLine="if not exist ..\lib64 mkdir ..\lib64" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="odb-__value__(database)-d.lib;odb.lib" + OutputFile="$(OutDir)\bin64\common.dll" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + ImportLibrary="$(OutDir)\lib64\common.lib" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cxx" + UniqueIdentifier="{AC9C925E-DBC7-4706-85E4-BD38199359F7}" + > +__source_entries__(sources) + </Filter> + <Filter + Name="Header Files" + Filter="h;hxx;ixx;txx" + UniqueIdentifier="{D30085A2-1A37-43F8-9B2E-D82BD026A113}" + > +__file_entries__(headers) + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/libcommon/common/makefile b/libcommon/common/makefile new file mode 100644 index 0000000..2987959 --- /dev/null +++ b/libcommon/common/makefile @@ -0,0 +1,124 @@ +# file : libcommon/common/makefile +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make + +# Options file. +# +cli_tun := options.cli +cxx_tun := common.cxx + +cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(cli_tun:.cli=.o)) +cxx_od := $(cxx_obj:.o=.o.d) + +common.l := $(out_base)/common.l +common.l.cpp-options := $(out_base)/common.l.cpp-options + +default := $(out_base)/ +dist := $(out_base)/.dist +clean := $(out_base)/.clean + +# Import. +# +$(call import,\ + $(scf_root)/import/cli/stub.make,\ + cli: cli,cli-rules: cli_rules) + +$(call import,\ + $(scf_root)/import/libodb/stub.make,\ + l: odb.l,cpp-options: odb.l.cpp-options) + +ifdef db_id +$(call import,\ + $(scf_root)/import/libodb-$(db_id)/stub.make,\ + l: odb_db.l,cpp-options: odb_db.l.cpp-options) +endif + +ifeq ($(odb_db.l.cpp-options),) +odb_db.l.cpp-options := $(out_base)/.unbuildable +endif + +# Build. +# +$(common.l): $(cxx_obj) $(odb.l) $(odb_db.l) + +$(cxx_obj) $(cxx_od): $(common.l.cpp-options) $(out_base)/config.h +$(common.l.cpp-options): value := -I$(out_root)/libcommon -I$(src_root)/libcommon +$(common.l.cpp-options): $(odb_db.l.cpp-options) $(odb.l.cpp-options) + +genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx) +gen := $(addprefix $(out_base)/,$(genf)) + +$(gen): $(cli) +$(gen): cli := $(cli) +$(gen): cli_options += \ +--generate-specifier \ +--generate-file-scanner \ +--guard-prefix LIBCOMMON_COMMON + +$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) + +$(out_base)/config.h: $(dcf_root)/configuration-dynamic.make + @echo '// file : libcommon/config.h' >$@ + @echo '// author : automatically generated' >>$@ + @echo '' >>$@ + @echo '#ifndef LIBCOMMON_COMMON_CONFIG_H' >>$@ + @echo '#define LIBCOMMON_COMMON_CONFIG_H' >>$@ + @echo '' >>$@ +ifeq ($(db_id),mysql) + @echo '#define DB_ID_MYSQL 1' >>$@ +endif + @echo '' >>$@ + @echo '#endif // LIBCOMMON_COMMON_CONFIG_H' >>$@ + +# Convenience alias for default target. +# +$(out_base)/: $(common.l) + +# Dist. +# +$(dist): export sources := $(cxx_tun) $(cli_tun:.cli=.cxx) +$(dist): export headers = $(subst $(src_base)/,,$(shell find $(src_base) \ +-name '*.hxx' -o -name '*.ixx' -o -name '*.txx')) +$(dist): data_dist := $(cli_tun) +$(dist): export extra_dist := $(data_dist) $(call vc9projs,libcommon) \ +$(call vc10projs,libcommon) + +$(dist): $(gen) + $(call dist-data,$(sources) $(headers) $(data_dist) config.h.in) + $(call meta-automake) + $(call meta-vc9projs,libcommon) + $(call meta-vc10projs,libcommon) + +# Clean. +# +$(clean): $(common.l).o.clean \ + $(common.l.cpp-options).clean \ + $(addsuffix .cxx.clean,$(cxx_obj)) \ + $(addsuffix .cxx.clean,$(cxx_od)) + $(call message,rm $$1,rm -f $$1,$(out_base)/config.h) + +# Generated .gitignore. +# +ifeq ($(out_base),$(src_base)) +$(common.l): | $(out_base)/.gitignore + +$(out_base)/.gitignore: files := config.h +$(clean): $(out_base)/.gitignore.clean + +$(call include,$(bld_root)/git/gitignore.make) +endif + +# How to. +# +$(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9proj.make) +$(call include,$(bld_root)/meta/vc10proj.make) +$(call include,$(bld_root)/meta/automake.make) + +$(call include,$(cli_rules)) +$(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/cxx/cxx-o.make) +$(call include,$(bld_root)/cxx/o-l.make) diff --git a/libcommon/options.cli b/libcommon/common/options.cli index a16c5b0..5b87d70 100644 --- a/libcommon/options.cli +++ b/libcommon/common/options.cli @@ -1,4 +1,4 @@ -// file : libcommon/options.cli +// file : libcommon/common/options.cli // author : Boris Kolpackov <boris@codesynthesis.com> // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file diff --git a/libcommon/options.cxx b/libcommon/common/options.cxx index 9d15251..9d15251 100644 --- a/libcommon/options.cxx +++ b/libcommon/common/options.cxx diff --git a/libcommon/options.hxx b/libcommon/common/options.hxx index d9e3ab8..7d043a3 100644 --- a/libcommon/options.hxx +++ b/libcommon/common/options.hxx @@ -2,8 +2,8 @@ // compiler for C++. // -#ifndef LIBCOMMON_OPTIONS_HXX -#define LIBCOMMON_OPTIONS_HXX +#ifndef LIBCOMMON_COMMON_OPTIONS_HXX +#define LIBCOMMON_COMMON_OPTIONS_HXX #include <deque> #include <iosfwd> @@ -393,4 +393,4 @@ namespace cli #include "options.ixx" -#endif // LIBCOMMON_OPTIONS_HXX +#endif // LIBCOMMON_COMMON_OPTIONS_HXX diff --git a/libcommon/options.ixx b/libcommon/common/options.ixx index 0fa60e5..0fa60e5 100644 --- a/libcommon/options.ixx +++ b/libcommon/common/options.ixx diff --git a/libcommon/libcommon-vc10.sln b/libcommon/libcommon-vc10.sln new file mode 100644 index 0000000..9042eed --- /dev/null +++ b/libcommon/libcommon-vc10.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcommon", "common\libcommon-__value__(database)-vc10.vcxproj", "{019C2E51-BF41-4490-AB96-4156741B8CC9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {019C2E51-BF41-4490-AB96-4156741B8CC9}.Debug|Win32.ActiveCfg = Debug|Win32 + {019C2E51-BF41-4490-AB96-4156741B8CC9}.Debug|Win32.Build.0 = Debug|Win32 + {019C2E51-BF41-4490-AB96-4156741B8CC9}.Debug|x64.ActiveCfg = Debug|x64 + {019C2E51-BF41-4490-AB96-4156741B8CC9}.Debug|x64.Build.0 = Debug|x64 + {019C2E51-BF41-4490-AB96-4156741B8CC9}.Release|Win32.ActiveCfg = Release|Win32 + {019C2E51-BF41-4490-AB96-4156741B8CC9}.Release|Win32.Build.0 = Release|Win32 + {019C2E51-BF41-4490-AB96-4156741B8CC9}.Release|x64.ActiveCfg = Release|x64 + {019C2E51-BF41-4490-AB96-4156741B8CC9}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libcommon/libcommon-vc9.sln b/libcommon/libcommon-vc9.sln new file mode 100644 index 0000000..e12c11d --- /dev/null +++ b/libcommon/libcommon-vc9.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcommon", "common\libcommon-__value__(database)-vc9.vcproj", "{8575F058-1BD6-4F97-8901-83D0110C2B6B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Debug|Win32.ActiveCfg = Debug|Win32 + {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Debug|Win32.Build.0 = Debug|Win32 + {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Debug|x64.ActiveCfg = Debug|x64 + {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Debug|x64.Build.0 = Debug|x64 + {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Release|Win32.ActiveCfg = Release|Win32 + {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Release|Win32.Build.0 = Release|Win32 + {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Release|x64.ActiveCfg = Release|x64 + {8575F058-1BD6-4F97-8901-83D0110C2B6B}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libcommon/makefile b/libcommon/makefile index cdb57bc..8f72324 100644 --- a/libcommon/makefile +++ b/libcommon/makefile @@ -1,119 +1,30 @@ # file : libcommon/makefile # author : Boris Kolpackov <boris@codesynthesis.com> # copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file +# license : GNU GPL; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make -# Options file. -# -cli_tun := options.cli -cxx_tun := common.cxx +dirs := common -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(cli_tun:.cli=.o)) -cxx_od := $(cxx_obj:.o=.o.d) +default := $(out_base)/ +dist := $(out_base)/.dist +clean := $(out_base)/.clean -common.l := $(out_base)/common.l -common.l.cpp-options := $(out_base)/common.l.cpp-options +$(default): $(addprefix $(out_base)/,$(addsuffix /,$(dirs))) -default := $(out_base)/ -dist := $(out_base)/.dist -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/cli/stub.make,\ - cli: cli,cli-rules: cli_rules) - -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -ifdef db_id -$(call import,\ - $(scf_root)/import/libodb-$(db_id)/stub.make,\ - l: odb_db.l,cpp-options: odb_db.l.cpp-options) -endif - -ifeq ($(odb_db.l.cpp-options),) -odb_db.l.cpp-options := $(out_base)/.unbuildable -endif - -# Build. -# -$(common.l): $(cxx_obj) $(odb.l) $(odb_db.l) - -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) $(out_base)/config.h -$(common.l.cpp-options): value := -I$(out_base) -I$(src_base) -$(common.l.cpp-options): $(odb_db.l.cpp-options) $(odb.l.cpp-options) - -genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): $(cli) -$(gen): cli := $(cli) -$(gen): cli_options += \ ---generate-specifier \ ---generate-file-scanner \ ---guard-prefix LIBCOMMON - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -$(out_base)/config.h: $(dcf_root)/configuration-dynamic.make - @echo '// file : libcommon/config.h' >$@ - @echo '// author : automatically generated' >>$@ - @echo '' >>$@ - @echo '#ifndef LIBCOMMON_CONFIG_H' >>$@ - @echo '#define LIBCOMMON_CONFIG_H' >>$@ - @echo '' >>$@ -ifeq ($(db_id),mysql) - @echo '#define DB_ID_MYSQL 1' >>$@ -endif - @echo '' >>$@ - @echo '#endif // LIBCOMMON_CONFIG_H' >>$@ - -# Convenience alias for default target. -# -$(out_base)/: $(common.l) - -# Dist. -# -$(dist): export sources := $(cxx_tun) $(cli_tun:.cli=.cxx) -$(dist): export headers = $(subst $(src_base)/,,$(shell find $(src_base) \ --name '*.hxx' -o -name '*.ixx' -o -name '*.txx')) -$(dist): data_dist := $(cli_tun) -$(dist): export extra_dist := $(data_dist) - -$(dist): $(gen) - $(call dist-data,$(sources) $(headers) $(data_dist) config.h.in) +$(dist): export dirs := $(dirs) +$(dist): export extra_dist := $(call vc9slns,libcommon) \ +$(call vc10slns,libcommon) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(dirs))) $(call meta-automake) + $(call meta-vc9slns,libcommon) + $(call meta-vc10slns,libcommon) -# Clean. -# -$(clean): $(common.l).o.clean \ - $(common.l.cpp-options).clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - $(call message,rm $$1,rm -f $$1,$(out_base)/config.h) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(common.l): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := config.h -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif +$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(dirs))) -# How to. -# -$(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9sln.make) +$(call include,$(bld_root)/meta/vc10sln.make) $(call include,$(bld_root)/meta/automake.make) -$(call include,$(cli_rules)) -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-l.make) +$(foreach d,$(dirs),$(call import,$(src_base)/$d/makefile)) |