MSVC files
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Fri, 18 Mar 2011 10:40:03 +0000 (06:40 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Fri, 18 Mar 2011 10:40:03 +0000 (06:40 -0400)
Makefile.am
libcelt/libcelt.vcxproj
libcelt/libcelt.vcxproj.filters
msvc/config.h [new file with mode: 0644]

index bb8e844..3221818 100644 (file)
@@ -12,7 +12,7 @@ DIST_SUBDIRS = libcelt tests tools
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = celt.pc 
 
-EXTRA_DIST = celt.pc.in Doxyfile Doxyfile.devel
+EXTRA_DIST = celt.pc.in Doxyfile Doxyfile.devel msvc/config.h
 
 rpm: dist
        rpmbuild -ta ${PACKAGE}-${VERSION}.tar.gz
index 61f0349..34da085 100644 (file)
@@ -45,6 +45,7 @@
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>C:\Data\Work\Codecs_silk_celt_experiments\opus_test\celt\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
@@ -60,6 +61,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
       <PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <AdditionalIncludeDirectories>C:\Data\Work\Codecs_silk_celt_experiments\opus_test\celt\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
     <None Include="ReadMe.txt" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <ClInclude Include="..\msvc\config.h" />\r
     <ClInclude Include="arch.h" />\r
     <ClInclude Include="bands.h" />\r
     <ClInclude Include="celt.h" />\r
     <ClInclude Include="celt_header.h" />\r
     <ClInclude Include="celt_types.h" />\r
-    <ClInclude Include="config.h" />\r
     <ClInclude Include="cwrs.h" />\r
     <ClInclude Include="ecintrin.h" />\r
     <ClInclude Include="entcode.h" />\r
index 6e04596..2967ebf 100644 (file)
@@ -33,9 +33,6 @@
     <ClInclude Include="celt_types.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="config.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="cwrs.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
@@ -96,6 +93,9 @@
     <ClInclude Include="vq.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\msvc\config.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClCompile Include="bands.c">\r
diff --git a/msvc/config.h b/msvc/config.h
new file mode 100644 (file)
index 0000000..fa9f6b5
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef CONFIG_H\r
+#define CONFIG_H\r
+\r
+#define CELT_BUILD            1\r
+\r
+#define restrict \r
+#define inline __inline\r
+\r
+#define USE_ALLOCA            1\r
+\r
+/* Comment out the next line for floating-point code */\r
+//#define FIXED_POINT           1\r
+\r
+#define OPUS_BUILD            1\r
+\r
+/* Get rid of the CELT VS compile warnings */\r
+#if 1\r
+#pragma warning(disable : 4018)// signed/unsigned mismatch\r
+#pragma warning(disable : 4244)// conversion from 'double' to 'celt_word16', possible loss of data\r
+#pragma warning(disable : 4267)// conversion from 'size_t' to 'int', possible loss of data\r
+#pragma warning(disable : 4305)// truncation from 'double' to 'const float'\r
+#pragma warning(disable : 4311)// pointer truncation from 'char *' to 'long'\r
+#pragma warning(disable : 4554)// check operator precedence for possible error; use parentheses to clarify precedence\r
+#pragma warning(disable : 4996)// This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.\r
+#endif\r
+\r
+#endif CONFIG_H\r