summaryrefslogtreecommitdiff
path: root/ffbuild
Commit message (Collapse)AuthorAge
* ffbuild/common: Fix CPPFLAGS applied for compiling C++ filesAndreas Rheinhardt2022-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, $(CPPFLAGS) and $(CFLAGS) are prepended to CXXFLAGS (the flags for compiling C++) like this: CXXFLAGS := $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) Using ":=" creates a simply expanded variable, i.e. the values of the variable at the time of assignment are used and later modifications to them are ignored (using a recursively expanding variable (i.e. "=" instead of ":=") is not really possible here, as there would be an infinite loop when evaluating CXXFLAGS). Yet we perform later additions to CPPFLAGS: HAVE_AV_CONFIG_H and BUILDING_libfoo are defined. These do not reach C++ compilations. To fix this a trick is employed to prepend to a recursively expanded variable while keeping it recursively expanded. There are two practical consequences of this: C++ files now no longer include the version.h header, but only the version_major.h header of their library, saving some recompilations. Furthermore, they now get some optimized math functions (namely the ones from lavu/intmath.h instead of the ones from lavu/common.h). (av_parity() is the only one for which it makes a difference.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lib*/version: Move library version functions into files of their ownAndreas Rheinhardt2022-05-10
| | | | | | | This avoids having to rebuild big files every time FFMPEG_VERSION changes (which it does with every commit). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Fix libversion.sh for split version headers, to unbreak shared library buildsMartin Storsjö2022-03-17
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Makefile: Redo duplicating object files in shared buildsAndreas Rheinhardt2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of shared builds, some object files containing tables are currently duplicated into other libraries: log2_tab.c, golomb.c, reverse.c. The check for whether this is duplicated is simply whether CONFIG_SHARED is true. Yet this is crude: E.g. libavdevice includes reverse.c for shared builds, but only needs it for the decklink input device, which given that decklink is not enabled by default will be unused in most libavdevice.so. This commit changes this by making it more explicit about what to duplicate from other libraries. To do this, two new Makefile variables were added: SHLIBOBJS and STLIBOBJS. SHLIBOBJS contains the objects that are duplicated from other libraries in case of shared builds; STLIBOBJS contains stuff that a library has to provide for other libraries in case of static builds. These new variables provide a way to enable/disable with a finer granularity than just whether shared builds are enabled or not. E.g. lavd's Makefile now contains: SHLIBOBJS-$(CONFIG_DECKLINK_INDEV) += reverse.o Another example is provided by the golomb tables. These are provided by lavc for static builds, even if one uses a build configuration that makes only lavf use them. Therefore lavc's Makefile contains STLIBOBJS-$(CONFIG_MXF_MUXER) += golomb.o, whereas lavf's Makefile has a corresponding SHLIBOBJS-$(CONFIG_MXF_MUXER) += golomb_tab.o. E.g. in case the MXF muxer is the only component needing these tables only libavformat.so will contain them for shared builds; currently libavcodec.so does so, too. (There is currently a CONFIG_EXTRA group for golomb. But actually one would need two groups (golomb_avcodec and golomb_avformat) in order to know when and where to include these tables. Therefore this commit uses a Makefile-based approach for this and stops using these groups for the users in libavformat.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* build: simplify rules for metalZhao Zhili2021-12-20
| | | | Signed-off-by: Aman Karmani <aman@tmm1.net>
* build: detect Metal.framework and build .metal filesAman Karmani2021-12-18
| | | | | Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Aman Karmani <aman@tmm1.net>
* avutil: [loongarch] Add support for loongarch SIMD.Shiyou Yin2021-12-15
| | | | | | | | | | | LSX and LASX is loongarch SIMD extention. They are enabled by default if compiler support it, and can be disabled with '--disable-lsx' '--disable-lasx'. Change-Id: Ie2608ea61dbd9b7fffadbf0ec2348bad6c124476 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter: compress CUDA PTX code if possibleTimo Rothenpieler2021-06-22
|
* ffbuild: Avoid using the --preprocessor argument to windresMartin Storsjö2021-06-18
| | | | | | | | | | | | | | | | | | | Instead use --preprocessor-arg; in binutils 2.36, the --preprocessor flag was changed so that it no longer accepts a string containing multiple arguments, but the whole --preprocessor argument is treated as the path to the preprocessor executable (where the path can contain spaces). It's currently unclear whether this behaviour will stay or if it is going to be reverted in the future, see discussion at [1]. Just to be safe, avoid using the --preprocessor argument. Don't redeclare the full preprocessing command, but just add the $(CC_DEPFLAGS) options. Based on a patch by Kyle Schwartz. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=27594 Signed-off-by: Martin Storsjö <martin@martin.st>
* libavresample: Remove deprecated libraryAndreas Rheinhardt2021-04-27
| | | | | | | | Deprecated in c29038f3041a4080342b2e333c1967d136749c0f. The resample filter based upon this library has been removed as well. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* ffbuild/common: Make deletion of templates possibleAndreas Rheinhardt2021-02-07
| | | | | | | | | | If a target to be built includes a template file, the target's .d file includes the template file as a prerequisite; if the code were changed so that the template file no longer exists, one would get an error from make that it has no rule for the template file target. Therefore add a dummy rule for template files to make deleting them possible. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* ffbuild: Refine MIPS handlingJiaxun Yang2020-07-23
| | | | | | | | | | | | | | | | To enable runtime detection for MIPS, we need to refine ffbuild part to support buildding these feature together. Firstly, we fixed configure, let it probe native ability of toolchain to decide wether a feature can to be enabled, also clearly marked the conflictions between loongson2 & loongson3 and Release 6 & rest. Secondly, we compile MMI and MSA C sources with their own flags to ensure their flags won't pollute the whole program and generate illegal code. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* common.mak: Also clean Windows debug files.Carl Eugen Hoyos2020-03-21
|
* build: add support for building CUDA files with clangRodger Combs2019-08-04
| | | | | | | | | | | | | | | | This avoids using the CUDA SDK at all; instead, we provide a minimal reimplementation of the basic functionality that lavfi actually uses. It generates very similar code to what NVCC produces. The header contains no implementation code derived from the SDK. The function and type declarations are derived from the SDK only to the extent required to build a compatible implementation. This is generally accepted to qualify as fair use. Because this option does not require the proprietary SDK, it does not require the "--enable-nonfree" flag in configure. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* Merge commit '7e5bde93a1e7641e1622814dafac0be3f413d79b'James Almer2019-03-10
| | | | | | | * commit '7e5bde93a1e7641e1622814dafac0be3f413d79b': build: Rename OBJDIRS variable to OUTDIRS Merged-by: James Almer <jamrial@gmail.com>
* Merge commit '17b6c7efb471e8ff1b8a7271f6531ba1d52bf69c'James Almer2017-11-12
| | | | | | | * commit '17b6c7efb471e8ff1b8a7271f6531ba1d52bf69c': build: Add missing config.sh dependency for pkg-config files Merged-by: James Almer <jamrial@gmail.com>
* Merge commit '7ebe7e8e7a76c0ce302f4f583ef0d14220031214'James Almer2017-11-12
| | | | | | | * commit '7ebe7e8e7a76c0ce302f4f583ef0d14220031214': build: Remove pkg-config files on clean instead of on distclean Merged-by: James Almer <jamrial@gmail.com>
* Merge commit 'fbf77b5ac37bf2a807d8336450801d7aecf2e359'James Almer2017-11-12
| | | | | | | * commit 'fbf77b5ac37bf2a807d8336450801d7aecf2e359': build: Add uninstall-pkgconfig target to match install-lib*-pkgconfig Merged-by: James Almer <jamrial@gmail.com>
* Merge commit 'abf1c058d1bd0ed1b820ea5e501a4484756f00b0'James Almer2017-11-11
| | | | | | | * commit 'abf1c058d1bd0ed1b820ea5e501a4484756f00b0': msvc: Properly specify dllexport for data symbols shared across dll boundaries Merged-by: James Almer <jamrial@gmail.com>
* Merge commit '857e26b655a769e5a56bada1a0d9adb44cc176b7'James Almer2017-11-06
| | | | | | | | | | | * commit '857e26b655a769e5a56bada1a0d9adb44cc176b7': build: Add an option for passing linker flags to the shared library build See e34a3468f294f21878875e0f6ad5564cd52af70e. --extra-ldlibflags is left in place for compatibility reasons. Merged-by: James Almer <jamrial@gmail.com>
* Merge commit 'f960fd2fb1218d49866d0bf47cbf839233fb9904'James Almer2017-11-01
| | | | | | | * commit 'f960fd2fb1218d49866d0bf47cbf839233fb9904': build: Skip generating .version files when reconfiguring Merged-by: James Almer <jamrial@gmail.com>
* build: fix builds configured with a suffixJames Almer2017-10-12
| | | | | | | Regression since 6dfcbd80ad446ff163b47f2bf432bbf706436ea8 Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'James Almer2017-10-11
| | | | | | | | | | | * commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63': build: Fine-grained link-time dependency settings Also included are bug fix commits 5ff3b5cafcc685b6936d16602b0f80aa09a95870, d9da7151eef7fc469787e7298196cea291acfd82 and 5e27ef800bfa2be17a6353ddedac6b7400e4624f. Merged-by: James Almer <jamrial@gmail.com>
* build: prevent SDL2 from polluting global cflags and extralibsJames Almer2017-10-09
| | | | | | | | | Remove the SDL_main define from the global cflags but not from the ffplay cflags, and the -mwindows linker option from extralibs instead of overriding it with the addition of -mconsole. Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* build: Skip generating .version files when cleaningDiego Biurrun2017-09-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* build: Allow generating dependencies as a side-effect of assemblingDiego Biurrun2017-06-21
| | | | | | (Cherry-picked from libav commit 3c0efbd03349ae68d3a25a082222652a102e3fd4) Signed-off-by: James Almer <jamrial@gmail.com>
* build: Generalize yasm/nasm-related variable namesDiego Biurrun2017-06-21
| | | | | | | | None of them are specific to the YASM assembler. (Cherry-picked from libav commit 39e208f4d4756367c7cd2d581847e0c1b8a429c1) Signed-off-by: James Almer <jamrial@gmail.com>
* build: remove --enable-raise-major configure optionJames Almer2017-05-17
| | | | | | | | It's not used by anything, has dubious usefulness, the reasons for which it was introduced are no longer valid, and only serves to add complexity to the build system. Signed-off-by: James Almer <jamrial@gmail.com>
* build: add support for building .cu files via nvccTimo Rothenpieler2017-05-15
| | | | Original work by Yogender Gupta <ygupta@nvidia.com>
* library.mak: fix build rules that depend on pgk-config filesJames Almer2017-05-05
| | | | Regression since 6fdd35a312
* Merge commit '92db5083077a8b0f8e1050507671b456fd155125'James Almer2017-05-04
| | | | | | | | | | | | | | * commit '92db5083077a8b0f8e1050507671b456fd155125': build: Generate pkg-config files from Make and not from configure build: Store library version numbers in .version files Includes cherry-picked commits 8a34f3659371680ca523aecfd9098c28f0f809eb and ee164727dd64c199b87118917e674b17c25e0da3 to fix issues. Changes were also made to retain support for raise_major and build_suffix. Reviewed-by: ubitux Merged-by: James Almer <jamrial@gmail.com>
* Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'Clément Bœsch2017-05-03
* commit '11a9320de54759340531177c9f2b1e31e6112cc2': build: Move build-system-related helper files to a separate subdirectory "ffbuild" directory name is used instead of "avbuild". Merged-by: Clément Bœsch <u@pkh.me>