Closed rainwoodman closed 6 years ago
If you want to add anything to CFLAGS
, then simply edit that line in common.mk
. Other potential option is to set CFLAGS ?=
. That way even command-line options are honoured
common.mk could have used CFLAGS ?=
-- then CFLAGS is honored by default as usually done in packages. I remember autotools decided to use AM_CFLAGS
internally to avoid messing with user supplied CFLAGS completely -- might be useful to follow a similar pattern here? Similar arguments were made for LDFLAGS too.
I remember having had that previously but something didn't work quite correctly. But I didn't find anything this time. Does this work for you? Since the CC
variable is often set to an old /usr/bin/cc
, Corrfunc
does not honour the CC
variable by default. Let me know if this solves your issue.
Corrfunc
uses a different CLINK
variable for linker flags and does not use the LDFLAGS
variable at all.
@rainwoodman - is it okay to close this issue?
Sure!
CFLAGS is ignored by the Makefile because common.mk purges it at the top with
:=
.This choice is unconventional. Is it intentional? Is there a way to add arguments to the compiler options?