Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: @Klaus Schmidinger: Suggestion for -O options in plugin-makefiles



Robert Schiele wrote:
> 
> ...
> Klaus, how about the following patch to calm this down?
> 
> --- ./Makefile~ 2002-12-12 20:23:29.000000000 +0100
> +++ ./Makefile  2002-12-12 20:26:12.000000000 +0100
> @@ -8,11 +8,19 @@
> 
>  .DELETE_ON_ERROR:
> 
> +ifndef CC
>  CC       = gcc
> +endif
> +ifndef CFLAGS
>  CFLAGS   = -O2
> +endif
> 
> +ifndef CXX
>  CXX      = g++
> +endif
> +ifndef CXXFLAGS
>  CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual
> +endif
> 
>  DVBDIR   = ../DVB
>  DTVDIR   = ./libdtv

Sounds reasonable. I believe it could be done even simpler, like this:

CC       ?= gcc
CFLAGS   ?= -O2

CXX      ?= g++
CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual

The '?=' operator sets the variable only if it has not been set yet.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index