Commit graph

58 commits

Author SHA1 Message Date
Nirbheek Chauhan
907a52315d
Replace WIN32 with _WIN32 everywhere
_WIN32 is defined on all Windows platforms by every compiler that
targets Windows. We do not need WIN32 at all.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Resolves https://github.com/xiph/opus/pull/104
2020-08-21 23:35:29 -07:00
Joshua Bowman
bc4ecf1917
win32: Add ambisonics sources to VS project
[mark.hsj: Add other missing files and update filter file]
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Fixes https://github.com/xiph/libopusenc/issues/9
Fixes https://github.com/xiph/opus-tools/issues/32
2018-07-26 19:07:26 -07:00
Ralph Giles
6db968e9ad
Rename SSE 4.1 files to match their targets.
Distinguish source files for the SSE 4.1 instruction
set extension consistently by their filename. This makes
it easier to check the correct flags are being set at
build time.

Signed-off-by: Jonathan Lennox <jonathan@vidyo.com>
2017-09-11 09:11:13 -07:00
Ricardo Constantino
c293dede4a
VS2015: remove previously ignored C4146 in kiss_fft.c
C4146: unary minus operator applied to unsigned type, result still unsigned

Fixed in a previous commit.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-03-02 18:39:34 -08:00
Ricardo Constantino
b95c5e784f
VS2015: Ignore LNK4221 and properly force SSE off for Win32
This warning complains of files that don't define any new symbols
not being included in linking.
GCC doesn't seem to complain about those, so neither should VS.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Closes https://github.com/xiph/opus/pull/34
2017-03-02 18:39:15 -08:00
Ricardo Constantino
4d883288de
VS2015: ignore C4244 warning in opus_compare.c
opus_compare.c defines the bitstream so we avoid changing it by
ignoring the non-breaking warning instead of changing the file.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Resolves https://github.com/xiph/opus/issues/21
2017-03-02 18:38:27 -08:00
Ricardo Constantino
61168921d9
VS2015: only compile fixed silk for appropriate configs
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Closes https://github.com/xiph/opus/pull/26
2017-02-20 17:18:58 -08:00
Ricardo Constantino
9c2736dc0d
VS2015: Move back PreprocessorDefinitions to opus
They're only needed in that project, no need to be in common.props.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-02-20 17:18:45 -08:00
Ricardo Constantino
daf1d12c86
VS2015: join common options in a properties file
Should make the projects a bit easier to digest and the differences
between the different configurations and platforms be more obvious.

A (happy?) side effect of this is the static libraries are now about
the same size as the ones produced by GCC and seem to build fine with
opus-tools.

Needs testing with other third party applications to make sure nothing
is missing that shouldn't.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-02-20 17:18:28 -08:00
Ricardo Constantino
0335534fe6
VS2015: remove dead options for linker in static configurations
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-02-20 17:18:03 -08:00
Ricardo Constantino
8fe210f14b
genversion.bat: generate same version as update_version
Remove version.mk and references to it in the repo.

genversion.bat will now generate the same version strings as
update_version script, i.e. without 'v' prefix and without a
fallback if git archive is used.

If run from a release tarball it'll use package_version,
like configure. If run from a git repo, it will use the same
'git describe' with '-dirty' as update_version.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2016-11-17 13:28:58 -08:00
Ricardo Constantino
ab148485da
vs2015: reenable DebugDLL versions of opus_demo
Signed-off-by: Ralph Giles <giles@thaumas.net>
2016-11-10 19:53:20 -08:00
Ricardo Constantino
e619ea76bf
vs2015: Add missing file to test_opus_encode.
Signed-off-by: Ralph Giles <giles@thaumas.net>
2016-11-03 14:16:41 -07:00
Ricardo Constantino (:RiCON)
08eb1b8b27
vs2015: include files added in 76674fea
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2016-09-01 14:24:02 -04:00
Ricardo Constantino (:RiCON)
eca752f100 VS2015: Ignore warning 4146 in celt/kiss_fft.c.
Warning 4146 is "unary minus operator applied to unsigned type,
result still unsigned"

Signed-off-by: Ralph Giles <giles@mozilla.com>
2016-07-27 11:48:46 -07:00
Ricardo Constantino (:RiCON)
899348f766 win32/.gitignore: Add DebugDLL_fixed.
Signed-off-by: Ralph Giles <giles@mozilla.com>
2016-07-27 11:48:39 -07:00
Ricardo Constantino (:RiCON)
07a51ebb89 VS2015: Disable building DebugDLL opus_demo.
This works around the issue with using private symbols.

Signed-off-by: Ralph Giles <giles@mozilla.com>
2016-07-27 11:48:18 -07:00
Ricardo Constantino (:RiCON)
385d49e55c vs2015: Merge opus dependencies into its project.
Since DLL builds can't include both fixed and float, separate DLL_fixed
configurations added that include fixed silk code and also set FIXED_POINT.

Signed-off-by: Ralph Giles <giles@mozilla.com>
2016-07-27 11:47:45 -07:00
Ricardo Constantino (:RiCON)
1aa851445b VS2015: Mirror changes in *.mk files from exp_lbr_tune merge.
Signed-off-by: Ralph Giles <giles@mozilla.com>
2016-07-26 09:53:00 -07:00
Ricardo Constantino (:RiCON)
b6ac6ce6b1 VS2015: Suppress a few warnings.
SDLCheck is a superset of BufferSecurityCheck and is off by default.
If it's set, it complains that it's overriden by BufferSecurityCheck.

Warning 4996 is already ignored in other binaries (fopen being deprecated and
suggesting fopen_s).

NoExtensions isn't a valid value for EnableEnhancedInstructionSet in x64 builds.
2016-07-26 09:51:07 -07:00
Ricardo Constantino (:RiCON)
a79bf19a5e Create a simple project to create version.h.
Run before any other project.

Avoids trying to create and replace version.h more than once which
led to file-locking errors with multicore builds.

Signed-off-by: Ralph Giles <giles@mozilla.com>
2016-07-26 09:50:13 -07:00
Ricardo Constantino (:RiCON)
97e4176efd
Move .exe back to root .gitignore for mingw builds 2016-05-18 21:20:35 +01:00
Ralph Giles
a01b0ab22b Remove VS2010 project files.
Visual Studio 2015 has been out for a while, and has a gratis
version. It doesn't make sense to maintain parallel support
for older releases.
2016-05-18 11:53:58 -07:00
Orestes Zoupanos
67fe2adc1c Move Visual Studio GitIgnores to own file 2016-05-17 23:08:40 +01:00
Orestes Zoupanos
d274f57a70 Fix DLL errors and Additional Library Directories 2016-05-17 23:06:54 +01:00
Ricardo Constantino (:RiCON)
5ff11c02da Fix VS2015 dynamic builds by adding DLL_EXPORT to CFLAGS
Needed after 6e96173.
2016-05-11 17:54:30 -07:00
uraymeiviar
ae8fec4cb4 fix build settings for DLL project, runtime library must be linked to DLL too to prevent heap deallocation error 2016-05-11 15:50:55 -07:00
uraymeiviar
3aaddaf5fb Added Visual Studio 2015 solution and added ReleaseDLL and DebugDLL Project settings to produce .dll file instead of .lib 2016-05-11 15:50:55 -07:00
Jonathan Lennox
a7c1ebf6bc Use ProjectReference rather than AdditionalDependencies for test programs, so build dependencies are right.
Actually add source code to opus_demo project, and fix its include paths.
2015-09-01 17:21:31 -04:00
Jonathan Lennox
fee0ed0754 Add intrinsics support to Visual Studio build. 2015-09-01 17:21:31 -04:00
Joshua Milas
bb4b6885a1 Add ~ to the arguments of genversion.bat
genversion.bat would fail if an argument was passed with quotations.
This is because the quotations were not being stripped before using
them as variables, causing the _temp files not being created.

Adding ~ to the arguments causes windows to strip the quotations,
enabling it to be used with path names containing spaces and the
MSVS pre-build event.

Signed-off-by: Ralph Giles <giles@mozilla.com>
2014-07-03 11:23:37 -07:00
Ron
a1740d9ad1 Drop the use of --always to git-describe
This is a partial revert of c435f06b30,
since it didn't actually fix the original problem with shallow clones.
It returns just a hash, not something we (currently) can extract as a
version string in the form things are expecting.
2013-11-28 04:18:45 +10:30
Gregory Maxwell
7830cf1bd2 Replace "inline" with OPUS_INLINE.
Newer versions of MSVC are unhappy with the strategy of the build
 environment redefining "inline" (even though they don't support the
 actual keyword). Instead we define OPUS_INLINE to the right thing
 in opus_defines.h.

This is the same approach we use for restrict.
2013-10-28 10:18:54 -07:00
Ralph Giles
c9e2014f4b Don't use --dirty in genversion.bat.
This script updates version.mk, which is under version control,
so the tree is always dirty. Until the script is updated to write
package_version instead, incorporating version.mk as a fallback
the way update_version does, it's better not to use --dirty.
2013-10-01 14:09:07 -07:00
Ralph Giles
c435f06b30 Pass --always to git describe.
This generates a useful version string even for --depth=1 checkouts.
The option was added in git v1.6.6.
2013-10-01 13:05:33 -07:00
Ralph Giles
568de0a17b Fix more VS2010 header paths. 2013-08-21 16:15:57 -07:00
Ralph Giles
2af12f3c8a Fix relative paths the header file in the VS2010 projects.
This prevented opening the files from the 'Solution Explorer'
interface where the source listing is displayed. Thanks to
Koen Vos for reporting the issue.
2013-08-21 16:06:30 -07:00
Ralph Giles
ecc81ee629 Disable MSVC posix security warnings in the project file.
By default Visual Studio warns about various C stdlib calls,
recommending non-portable replacements instead. We disable
this warning in a number of places in the source.

Since they're specific to the Visual Studio build, it's better
to disable them just in the project files where they always
apply to the correct toolchain.

I have only added the disable setting to project files which
need it currently: opus, test_opus_encode, and test_opus_decode.
2013-07-15 16:30:45 -07:00
Jean-Marc Valin
1975eeadd2 Big squashed commit of Garf's MSVC reorg:
commit 77880655f652c54415e4b5f03b5984b951f5267b
Author: Timothy B. Terriberry <tterribe@xiph.org>
Date:   Wed Jun 26 12:23:53 2013 +0200

    Fix version.mk parsing in genversion.bat.

    This was broken by the changes in 0482c82f to make it work with spaces.

    CMD interprets the quotes to mean the argument to FOR is a string,
    not a file name. Instead, we expand the path to a short file name.

    Signed-off-by: Gian-Carlo Pascutto <gcp@sjeng.org>

commit 8e97847ecac3a04956747b117fefef14939cbcbe
Merge: 0482c82 3c0aa8f
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Wed Jun 26 12:19:41 2013 +0200

    Merge branch 'master' into msvc_reorg

commit 0482c82fea6dd397a7d2ab50dc6cda4965278fc2
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Tue May 21 17:59:30 2013 +0200

    Make genversion.bat work in paths with spaces.

commit 3648ec55b7511119735280fc49bc57c7a3b55d6a
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Tue May 21 17:42:14 2013 +0200

    Rework output & intermediate dirs for parallel build support.

commit c367a0fcfcbf5551fb65d61365d9b832d7af2b38
Merge: bafb1dd b518b56
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Tue May 21 14:17:11 2013 +0200

    Merge branch 'master' into msvc_reorg

    Conflicts:
    	win32/VS2010/celt.vcxproj
    	win32/VS2010/opus.vcxproj
    	win32/VS2010/silk_common.vcxproj
    	win32/VS2010/silk_float.vcxproj

commit bafb1dda3fcf6785decdfb42a1f934c7fab0c567
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Mon Mar 11 21:25:28 2013 +0100

    Fix two more files to not have the Platform Toolset explicitly set.

commit c69c870201fec7461862fe79731a37866a1810f1
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Mon Mar 11 21:08:00 2013 +0100

    Add missing SILK MSVC project files.

commit a0d41fb7f97558c8f812d500b9027c77907c37c0
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Fri Mar 8 15:00:51 2013 +0100

    Use the default toolset in the MSVC project files.

commit 34aac5b2637ed38c5620f0d876e08db232849933
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Fri Mar 8 14:54:41 2013 +0100

    Move the MSVC project files outside the source tree.

    Bring the project structure more in line with the one in libogg.
2013-06-27 03:12:38 -04:00
MuldeR
ff31b79016 Enable SSE for MSVC
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-06-17 14:11:15 -04:00
Timothy B. Terriberry
80ad38370c Convert quotes in license headers to ASCII.
Since the last patch originally had them mangled (presumably by
 mailer, http server, or something else), let's just get rid of
 them.
2013-05-19 19:16:11 -07:00
Jean-Marc Valin
3593bbf481 missing comment in win32/config.h 2012-12-21 14:11:10 -05:00
Ralph Giles
22d8dcf398 Remove the obsolete CELT_BUILD define from win32/config.h. 2012-12-07 09:16:34 -08:00
Jean-Marc Valin
00898f2091 Adds missing license headers on some scripts and test files 2012-10-30 01:26:36 -04:00
Ralph Giles
662ae9bb18 Include process.h for _getpid on windows.
Previously the test programmes happened to link because _getpid
returns an int, which is the default prototype. Instead, include
the appropriate header to supply a real declaration, fixing the
associated warning.

I moved the getpid->_getpid define to the site of the header
inclusion to make clear what's going on, rather than have it
floating in win32/config.h.
2012-10-23 13:04:36 -07:00
Chris Moeller
2b14ac23f1 genversion now adds the header comment to version.mk 2012-08-16 19:19:07 -04:00
Chris Moeller
9322362b1b Updated Win32 genversion.bat to generate version.mk if Git is found, use it if it isn't, and produce unknown version and leave it untouched if it isn't already found 2012-08-16 12:23:20 -04:00
Gregory Maxwell
417679c3e5 Disable stack-protector for mingw32 and remove win32 restrict define. 2012-08-09 08:39:15 -04:00
Chris Moeller
b768c9b0fd Fixes MSVC projects and adds git version generator tool 2012-07-20 08:48:50 -04:00
Gian-Carlo Pascutto
eeb7bd3d9d Make MSVC build work in parallel.
The (non-default) temporary & output dirs configured in the projects could
cause issues when doing compilation on a multiprocessor machine. Cleaned
this up a little to use the defaults, which makes that work again and
doesn't make the output structure any worse. Also removed debug output for
release binaries & a tiny whitespace fix.
2012-07-16 16:45:04 -04:00