With the current change the link arguments are $(LDFLAGS) -L..
An alternative could be to have LDFLAGS+=.L and then use $(LDFLAGS) afterwards.
There are these conditional LIBS+=-fsanitize=* lines.
Those got me a little confused; these should be compiler flags and having them in CFLAGS should suffice, shouldn't it?
How do you feel about changing CPPFLAGS=-DHAVE_KALLOC to CPPFLAGS+=-DHAVE_KALLOC?
This way CPPFLAGS from the environment can be reused but the user still has the possibility to override via make CPPFLAGS=....
(Less important) How do you feel about changing CFLAGS=... to CFLAGS?=...?
With that, custom CFLAGS don't have to be explicitly passed on as make arguments.
Adds
LDFLAGS
to the linking step.A couple of further suggestions/questions:
$(LDFLAGS) -L.
. An alternative could be to haveLDFLAGS+=.L
and then use$(LDFLAGS)
afterwards.LIBS+=-fsanitize=*
lines. Those got me a little confused; these should be compiler flags and having them inCFLAGS
should suffice, shouldn't it?CPPFLAGS=-DHAVE_KALLOC
toCPPFLAGS+=-DHAVE_KALLOC
? This wayCPPFLAGS
from the environment can be reused but the user still has the possibility to override viamake CPPFLAGS=...
.CFLAGS=...
toCFLAGS?=...
? With that, customCFLAGS
don't have to be explicitly passed on asmake
arguments.