Re: [cc65] Building with custom CC and CFLAGS

From: Groepaz <groepaz1gmx.net>
Date: 2009-09-10 23:31:14
On Donnerstag 10 September 2009, Ullrich von Bassewitz wrote:

> Maybe I'm not understanding this completely, but as already described in
> another mail, I'm not using the top level makefile when working on one of
> the tools (actually, the top level makefile is mostly used by the nightly
> build script). If the "normal" makefiles just contain "CFLAGS +=
> -I$(COMMON)" how do they get "-O4 -Wall -W -std=c89" when called directly
> (which is their main use)?

for such cases i have a global makefile.include in my projects, which is 
included by all makefiles in subdirectories

> Is it possible to do something like "if it's defined on the command line,
> then use it, else use what the makefile says" for a variable? If this is
> possible, then I can change the makefiles accordingly. You would then have
> to define your own variables on the command line when calling make.

ofcourse you could do some checks for variables in the above mentioned include 
script, and then call make like

MYCC="gcc" make

check "MYCC", use CC="gcc" if not defined etc pp

(both probably isnt an option if the makefiles must work with other tools than 
gnu make, i dont know =P)

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

Wir wissen alle, dass Fernsehen dick, dumm, traurig und gewalttätig macht. 
<Ursula von der Leyen, CDU>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Sep 10 23:31:20 2009

This archive was generated by hypermail 2.1.8 : 2009-09-10 23:31:23 CEST