Mail Archives: djgpp/1997/10/13/11:53:48
On Sat, 11 Oct 1997, Rik Blok wrote:
> I have a makefile with the line
>
> CFLAGS += -I$(INCLUDE_LIBS)
>
> and I sometimes want to call the makefile with CFLAGS preset
>
> make CFLAGS=-g
>
> but this seems to override CFLAGS instead of just initializing it. How
> can I make this result in
>
> CFLAGS = -g -I$(INCLUDE_DIRS)
In your makefile, initialize CFLAGS=$(CFINIT) and CFINIT=-O2 (or
somesuch) then you can change the initial value of CFLAGS with:
make CFINIT=-g
and your append command will still work.
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -