I have some project with alot of files and i want to compile them all with -Wall
,
how can I do it on linux, without changing makefile
.
make -Wall
doesn't help.
Any help appreciated.
I have some project with alot of files and i want to compile them all with -Wall
,
how can I do it on linux, without changing makefile
.
make -Wall
doesn't help.
Any help appreciated.
You might be able to do something like
make CC='gcc -Wall' CXX='g++ -Wall'
which will tell make to use 'gcc -Wall' as the C compiler and g++ -Wall
as the C++ compiler
This assumes all the sources are C and C++ and that the makefile uses the CC
and CXX
variables, and that it uses GCC as the compiler, and probably several other assumptions.
Typically compilation flags are stored in make variables such as CFLAGS
and CXXFLAGS
but if you override them you might replace existing options that are necessary for correct operation, so adding options to CC
and/or CXX
is sometimes safer.