Commit Graph

15 Commits

Author SHA1 Message Date
Martin Storsjö
bea841a743 Fix libversion.sh for split version headers, to unbreak shared library builds
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-17 11:11:17 +02:00
Andreas Rheinhardt
20b0d24c2f Makefile: Redo duplicating object files in shared builds
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>
2022-01-04 05:01:04 +01:00
James Almer
ccf7bca1c9 Merge commit '17b6c7efb471e8ff1b8a7271f6531ba1d52bf69c'
* commit '17b6c7efb471e8ff1b8a7271f6531ba1d52bf69c':
  build: Add missing config.sh dependency for pkg-config files

Merged-by: James Almer <jamrial@gmail.com>
2017-11-12 01:02:02 -03:00
James Almer
e0087a5624 Merge commit '7ebe7e8e7a76c0ce302f4f583ef0d14220031214'
* commit '7ebe7e8e7a76c0ce302f4f583ef0d14220031214':
  build: Remove pkg-config files on clean instead of on distclean

Merged-by: James Almer <jamrial@gmail.com>
2017-11-12 00:59:58 -03:00
James Almer
6458137200 Merge commit 'fbf77b5ac37bf2a807d8336450801d7aecf2e359'
* commit 'fbf77b5ac37bf2a807d8336450801d7aecf2e359':
  build: Add uninstall-pkgconfig target to match install-lib*-pkgconfig

Merged-by: James Almer <jamrial@gmail.com>
2017-11-12 00:56:25 -03:00
James Almer
87865bf6c7 Merge commit 'abf1c058d1bd0ed1b820ea5e501a4484756f00b0'
* commit 'abf1c058d1bd0ed1b820ea5e501a4484756f00b0':
  msvc: Properly specify dllexport for data symbols shared across dll boundaries

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 11:29:16 -03:00
James Almer
88d6f79ac0 Merge commit '857e26b655a769e5a56bada1a0d9adb44cc176b7'
* commit '857e26b655a769e5a56bada1a0d9adb44cc176b7':
  build: Add an option for passing linker flags to the shared library build

See e34a3468f2.

--extra-ldlibflags is left in place for compatibility reasons.

Merged-by: James Almer <jamrial@gmail.com>
2017-11-06 17:57:53 -03:00
James Almer
8e8d4cf832 Merge commit 'f960fd2fb1218d49866d0bf47cbf839233fb9904'
* commit 'f960fd2fb1218d49866d0bf47cbf839233fb9904':
  build: Skip generating .version files when reconfiguring

Merged-by: James Almer <jamrial@gmail.com>
2017-11-01 17:38:30 -03:00
James Almer
6dfcbd80ad Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'
* commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63':
  build: Fine-grained link-time dependency settings

Also included are bug fix commits 5ff3b5cafc,
d9da7151ee and
5e27ef800b.

Merged-by: James Almer <jamrial@gmail.com>
2017-10-11 17:55:25 -03:00
James Almer
fde3bb16f9 build: prevent SDL2 from polluting global cflags and extralibs
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>
2017-10-09 21:41:11 -03:00
Diego Biurrun
cbe181c8e1 build: Skip generating .version files when cleaning
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-10 01:22:57 -03:00
James Almer
3e295e633c build: remove --enable-raise-major configure option
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>
2017-05-17 22:52:59 -03:00
James Almer
a5fdda79ee library.mak: fix build rules that depend on pgk-config files
Regression since 6fdd35a312
2017-05-05 00:50:20 -03:00
James Almer
6fdd35a312 Merge commit '92db5083077a8b0f8e1050507671b456fd155125'
* 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 8a34f36593 and
ee164727dd 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>
2017-05-04 19:59:30 -03:00
Clément Bœsch
3f17751eeb Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'
* 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>
2017-05-03 16:49:12 +02:00