summaryrefslogtreecommitdiff
path: root/Template
AgeCommit message (Collapse)AuthorFilesLines
2019-03-06Build system: Use GZIP_ENV instead of GZIPDaniel Roggow1-1/+1
Older versions of gzip assume the GZIP environment variable contains flags[1]. Building netsniff-ng on a system with such a version of gzip will yield the following error: INST netsniff-ng/netsniff-ng gzip -9 -c netsniff-ng.8 > netsniff-ng/netsniff-ng.8.gz gzip: gzip: No such file or directory A practical alternative to redefining GZIP in the Makefile seems to be to use the GZIP_ENV make variable[2] instead. [1] The GZIP environment variable was deprecated in gzip version 1.7. See https://www.gnu.org/software/gzip/manual/html_node/Environment.html and https://git.savannah.gnu.org/cgit/gzip.git/tree/NEWS for more information. [2] https://www.gnu.org/software/automake/manual/automake.html#index-GZIP_005fENV Signed-off-by: Daniel Roggow <daniel.roggow@rockwellcollins.com>
2017-02-09make: Fix spelling yaac -> yaccTobias Klauser1-1/+1
The parser generator's name is yacc, not yaac. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-06-29make: Create containing directories for manpages if not existentTobias Klauser1-1/+1
When installing to the default DESTDIR /usr/local with non existent /usr/local/share/man/man8 (or any subpath of it), the installation of manpages fails with e.g. install: cannot create regular file `/usr/local/share/man/man8/netsniff-ng.8.gz': No such file or directory make: *** [netsniff-ng_do_install] Error 1 Thus, create any leading, non-existent directories by using the INST instead of the INSTX command which will call install -d on the path. Reported-by: James Burnett <James.Burnett@geant.org> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-05-02build: Make module build also depend on header fileTobias Klauser1-0/+3
If only a header file is changed, the corresponding module is not rebuilt. Thus, add a rule to make module build depend on the header file as well (where applicable) to circumvent this effect. Note: This will still not necessarily catch every dependency between modules, source and header files. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-09-09build: Don't overwrite CC variableTobias Klauser1-3/+3
Don't reset the variable CC in the Makefile, but set it to gcc by default (can be overriden when e.g. compiling with `make CC=clang'). This way we can also have non-verbose compiles with compilers other than gcc. Furthermore make sure that the CC variable is also respected for LD. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-08-15build: Add build flag to enable sparse checking of C source filesTobias Klauser1-0/+1
Similar to the 'make C=1' for the Linux kernel, wire up the sparse command for our build system in a similar fashion. Use 'make C=1 [tool]' to check the source files using sparse. Of course, the sparse tool needs to be installed and available in your $PATH for this to work. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-04-10build: add DESTDIR supportChristian Wiese1-5/+5
This change implements support for specifying an alternative installation destination directory by setting DESTDIR when calling 'make install'. Example: make DESTDIR=/alternative-rootfs install It is particularly useful when cross-compiling and installing in a dedicated directory where for example the rootfs or a build sandbox for the target architecture is mounted. By using DESTDIR you can avoid to mess with PREFIX to include the alternative installation directory! Signed-off-by: Christian Wiese <chris@opensde.org> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-30build: reduce Extra contents to bare minimumDaniel Borkmann1-1/+3
Improve the build system, so that configuration files are installed per tool basis. Also, introduce post_install targets, so that config files can be altered in some way, e.g. done by trafgen. Moreover, move custom targets from Extra to tool-specific Makefiles. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-07-24build: split build system into smaller manageable piecesDaniel Borkmann1-0/+23
Split the build system into smaller manageable pieces, grouped by context. In that sense, we can keep the most important information within the Makefile itself, and group out misc bits and pieces that we just include into it. E.g. 'Cmds' contains all defined commands that we call from other locations, 'Template' contains the generic build template for all tools, 'Extra' has pieces that need special treatment for the tools to build and 'Misc' contains help and release code. This makes it more manageable on the long run. While at it, I also simplified some code and removed all Wflags expect "-Wall" as we want to convert into "-Wall -Wextra -W" anyway. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>