Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e2ad1bb0
Commit
e2ad1bb0
authored
Jul 04, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contrib: update documentation
parent
2bed93ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
24 deletions
+58
-24
contrib/src/README
contrib/src/README
+58
-24
No files found.
contrib/src/README
View file @
e2ad1bb0
...
@@ -48,40 +48,74 @@ source code is fully ready. Otherwise Makefile dependencies will break
...
@@ -48,40 +48,74 @@ source code is fully ready. Otherwise Makefile dependencies will break
cd $< && $(MAKE) install
cd $< && $(MAKE) install
touch $@
touch $@
Conditional builds
-------------------
As far as possible, build rules should determine automatically whether
a package is useful (for VLC media player) or not. Useful packages
should be listed in the PKGS special variable. See some examples:
# FFmpeg is always useful
PKGS += ffmpeg
# DirectX headers are useful only on Windows
ifdef HAVE_WIN32
PKGS += directx
endif
# x264 is only useful when stream output is enabled
ifdef BUILD_ENCODERS
PKGS += x264
endif
Some packages may be provided by the target system. This is especially
common when building natively on Linux or BSD. When this situation is
detected, the package name should be added to the PKGS_FOUND special
variable. The build system will then skip building this package:
# Asks pkg-config if foo version 1.2.3 or later is present:
ifeq ($(call need_pkg,'foo >= 1.2.3'),)
PKGS_FOUND += foo
endif
Note: The need_pkg function always return 1 during cross-compilation.
This is a bug.
Dependencies
Dependencies
-------------
-------------
If package bar depends on package foo, a Makefile dependency can ensure
If package bar depends on package foo, the special DEPS_bar variable
that bar will be built after foo. It will also ensure that foo will be
should be defined as follow:
built even if it was not selected explicitly in the $(PKGS) variable:
.bar: libbar .foo
DEPS_bar = foo $(DEPS_foo)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
cd $< && $(MAKE) install
touch $@
Note that dependency resolution is unfortunately _not_ recursive.
Therefore $(DEPS_foo) really should be specified explicitly as shown
above. (In practice, this will not make any difference insofar as there
are no pure second-level nested dependencies. For instance, libass
depends on FontConfig, which depends on FreeType, but libass depends
directly on FreeType anyway.)
Conditional builds
Also note that DEPS_bar is set "recursively" with =, rather than
-------------------
"immediately" with :=. This is so that $(DEPS_foo) is expanded
correctly, even if DEPS_foo it is defined after DEPS_bar.
Some packages may be provided by the target system. This is especially
Implementation note:
common when building natively on Linux or BSD. A dummy build rule can
be used conditionally.
NEED_FOO := $(call need_pkg,'foo >= 1.2.3')
If you must know, the main.mak build hackery will automatically
emit a dependency from .bar onto .dep-foo:
ifeq ($(NEED_FOO),)
.bar: .dep-foo
.foo:
else
.foo: libfoo
### foo compilation rules here ###
endif
touch $@
If pkg-config finds foo.pc with version 1.2.3 or larger, this will be
...whereby .dep-foo will depend on .foo:
equivalent to:
.foo: ; touch .foo
.dep-foo: .foo
touch $@
Note: The need_pkg function always return 1 during cross-compilation.
...unless foo was detected in the target distribution:
.dep-foo:
touch $@
So you really only need to set DEPS_bar.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment