]> mj.ucw.cz Git - pciutils.git/commit
Makefile: Append EXEEXT variable to executable filename rules
authorPali Rohár <pali@kernel.org>
Sun, 26 Dec 2021 17:42:35 +0000 (18:42 +0100)
committerMartin Mareš <mj@ucw.cz>
Sun, 26 Dec 2021 21:51:59 +0000 (22:51 +0100)
commitec1fe05c4811a1946ab42979e714a6515aef792a
treeee4a82b0653c626b7aecc78a06de792ca75b5742
parent79978004b854ad7cf38ef87aeaeab8550ce83d26
Makefile: Append EXEEXT variable to executable filename rules

If x86_64-w64-mingw32-gcc compiler is called with -o filename option
without any file extension then compiler automatically appends suffix
".exe" to output filename.

This behavior of x86_64-w64-mingw32-gcc compiler basically breaks pattern
rule of type '%: %.o' as x86_64-w64-mingw32-gcc compiler cannot generate
arbitrary output file via -o option just by stripping .o extension from
filename.

When generating executables by x86_64-w64-mingw32-gcc compiler it is
really the best option to specify .exe suffix in -o option.

So introduce a new makefile variable EXEEXT which will be automatically
appended to any executable filename. For Windows and DOS systems set it
to ".exe". For other systems set it just to empty string "".

GNU automake uses same makefile variable for same purpose.
.gitignore
Makefile
lib/configure