[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sub makefile does not use correct value of CFLAGS from top make file
Re: sub makefile does not use correct value of CFLAGS from top make file,
Fri, 3 Sep 2021 22:54:25 -0400
On Fri, Sep 3, 2021 at 5:58 PM Jeffrey.Fellin--- via Bug reports and
discussion for GNU make <email@example.com> wrote:
> I have a project that compiles .S and .c files, and the value of CFLAGS in
> the sub makefile is not the same for the compile lines
> The compile of bug.S succeeds, but doesn’t have the correct value of CFLAGS,
> as in the annotated output below. The compile of hello.c has the correct
> value of CFLAGS, but the compile fails due to the unsupported options to the
> cc. The extra options are for use by the project specific compiler.
I believe you should use ASFLAGS for assembly source, not CFLAGS.
Also see "Variables Used by Implicit Rules"
in the manual.