Commit Graph

16 Commits

Author SHA1 Message Date
Gabriel Carrillo
f82fd96ae0 doc: add tags and cscope make targets to quick help
Update the "make help" output to reflect the additions
of make targets for tags database generation.

Fixes: aafaea3d3b ("devtools: add tags and cscope index generation")

Signed-off-by: Gabriel Carrillo <erik.g.carrillo@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2017-08-05 11:04:47 +02:00
David Hunt
bce6c42c4a mk: add sensible default target with defconfig
Users can now use 'make defconfig' to generate a configuration using
the most appropriate defaults for the current machine.

<arch-machine-execenv-toolchain>
  arch taken from uname -m
  machine defaults to native
  execenv is taken from uname, Linux=linuxapp, otherwise bsdapp
  toolchain is taken from $CC -v to see which compiler to use

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-08-05 10:27:04 +02:00
Ferruh Yigit
87676d20df doc: add test related rules in make help
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-02-28 16:13:22 +01:00
Thomas Monjalon
9822231572 doc: add default values of install variables
The variables DESTDIR and prefix are used with "make install"
to copy the files in $DESTDIR$prefix.
Their default values will be shown when calling "make help".

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-02-27 15:42:22 +01:00
Panu Matilainen
b2bb3a5daa mk: stop on warning only in developer build
Add RTE_DEVEL_BUILD make-variable which can be used to do things
differently when doing development vs building a release,
autodetected from source root .git presence and overridable via
commandline. It is used it to enable -Werror compiler flag and may
be extended to other checks.

Failing build on warnings is a useful developer tool but its bad
for release tarballs which can and do get built with newer
compilers than what was used/available during development. Compilers
routinely add new warnings so code which built silently with cc X
might no longer do so with X+1. This doesn't make the existing code
any more buggier and failing the build in this case does not help
to improve the quality of an already released version either.

This change the default flags which can be tuned with EXTRA_CFLAGS.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-03-03 11:33:14 +01:00
Thomas Monjalon
fae202e2e2 mk: introduce new install syntax
The old install command was:
	make install T=x86_64-native-linuxapp-gcc DESTDIR=install
It still works and can be replaced by these more standard commands:
	make config T=x86_64-native-linuxapp-gcc 0=x86_64-native-linuxapp-gcc
	make O=x86_64-native-linuxapp-gcc
	make install O=x86_64-native-linuxapp-gcc prefix= DESTDIR=install

It means the "make install" do not perform any compilation anymore when T
is not used. It is done only in pre_install to keep compatibility with the
old syntax based on T= option.

The default prefix /usr/local is empty in the T= case which is
used only for a local install.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
6b62a72a70 mk: install a standard cutomizable tree
The rule "install" follows these conventions:
http://gnu.org/prep/standards/html_node/Directory-Variables.html
http://gnu.org/prep/standards/html_node/DESTDIR.html

The variable sdkdir has been added to the more standards ones,
to configure the directory used with RTE_SDK when using the DPDK makefiles
to build an application.

It is still possible to build DPDK with the "install T=" rule without
specifying any DESTDIR. In such case there is no install, as before.

The old usage of an installed SDK is:
    make -C examples/helloworld RTE_SDK=$(readlink -m $DESTDIR) \
         RTE_TARGET=x86_64-native-linuxapp-gcc
RTE_TARGET can be specified but is useless now with an installed SDK.
The RTE_SDK directory must now point to a different path depending of
the installation.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Thomas Monjalon
27f356c48d mk: remove multi-target install
The multi-target install create some subdirectories with the target name
which is not standard for a "make install" procedure.

The uninstall procedure cannot be applied properly (without removing
all files in a directory). It would need to pre-compute paths.
As it is a packaging issue, it is removed from the build system capabilities.

The variable BUILD_DIR is also renamed to RTE_OUTPUT used in other files.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
2015-12-06 15:41:04 +01:00
Keith Wiles
6796db6f22 mk: introduce EXTRA_LDLIBS variable
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-05-14 23:33:38 +02:00
David Marchand
519f32279e config: rename "default" configurations as "native"
The "default" part in configuration filenames is misleading.
Rename this as "native", as this is the RTE_MACHINE that is set in these files.
This should make it clearer for people who build DPDK on a system then run it on
another one.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2014-05-21 16:25:06 +02:00
Olivier Matz
36d9324ed0 mk: add "make examples" target in root makefile
It is now possible to build all projects from the examples/ directory
using one command from root directory.

Some illustration of what is possible:

- build examples in the DPDK tree for one target

  # install the x86_64-default-linuxapp-gcc in
  # ${RTE_SDK}/x86_64-default-linuxapp-gcc directory
  user@droids:~/dpdk.org$ make install T=x86_64-default-linuxapp-gcc
  # build examples for this new installation in
  # ${RTE_SDK}/examples directory
  user@droids:~/dpdk.org$ make examples T=x86_64-default-linuxapp-gcc

- build examples outside DPDK tree for several targets

  # install all targets matching x86_64-*-linuxapp-gcc in
  # ${RTE_SDK}/x86_64-*-linuxapp-gcc directories
  user@droids:~/dpdk.org$ make install T=x86_64-*-linuxapp-gcc
  # build examples for these installations in /tmp/foobar
  user@droids:~/dpdk.org$ make examples T=x86_64-*-linuxapp-gcc O=/tmp/foobar

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-16 16:02:55 +02:00
David Marchand
2a315d6985 pcap: revert build patches
This reverts commits
a0cdfcf9 (use pcap-config to guess compilation flags),
ef5b2363 (fix build with empty LIBPCAP_CFLAGS) and
60191b89 (fix build when pcap_sendpacket is unavailable).

These patches are creating more problems than solving the initial one
(which was a build error with too old pcap libraries).
Since old pcap libraries are not that common, just revert them.

Reported-by: Meir Tseitlin <mirots@gmail.com>
Reported-by: Mats Liljegren <mats.liljegren@enea.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-03-19 14:33:52 +01:00
David Marchand
a0cdfcf936 pcap: use pcap-config to guess compilation flags
Use pcap-config to populate CFLAGS and LDFLAGS.
LIBPCAP_CFLAGS and LIBPCAP_LDFLAGS can be used to override this (useful when
cross-compiling).

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:07:28 +01:00
Olivier Matz
1fa0fd9d6b mk: allow to specify DESTDIR in build rule
This will install the binary sdk (bin + modules + libs + headers + mk)
in the specified directory.
This directory can be used as RTE_SDK by external applications.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Olivier Matz
713295f1e0 mk: allow to specify O= in install rule
This variable $(O) can be used to specify a build directory
when doing an "install" procedure. The default is ".", which
means that targets will be built in the source dpdk.

This option is useful to compile outside of the source tree that may be
read-only.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
Thomas Monjalon
5ee26f8722 doc: how to build
This is a cheat sheet to build DPDK and can be used for a "make help".
It is explicitly described as a build help in order to concatenate it
with other helps such as test commands.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-02-26 11:01:13 +01:00