Re: [cc65] Building with custom CC and CFLAGS

From: Greg King <>
Date: 2009-09-25 21:31:27
From: "Per Olofsson"; on Friday, September 25, 2009; at 11:16 AM -0400
> Specifying CC/CFLAGS on the command-line doesn't work:
> Invader:cc65 $ make CC=clang CFLAGS=-O4 -f make/gcc.mak
> ... snip ...
> gcc -g -O2 -Wall -W -std=c89 -MM abend.c addrsize.c bitops.c
> ... etc.
> The variables aren't inherited when make is called again
> inside the makefile.  Setting them like so:
> CC=clang CFLAGS=-O4
> in the makefile works, however (yay!).

As Oliver pointed out, I had disabled that feature because I wanted to be
able to give this kind of command line:

    make -f make/gcc.mak SYS=c128

I wanted that "SYS" variable to be passed down to the samples and test
sub-makes.  I did not want it to be passed down to the "libsrc/" sub-makes.

But, I am willing to disable my disable of that GNU feature.  Therefore,
you will be able to do what you want to do on the command line.

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Sep 25 21:32:07 2009

This archive was generated by hypermail 2.1.8 : 2009-09-25 21:32:09 CEST