Re: [dwm] improve config.mk

From: Cedric Krier <ced_AT_ced.homedns.org>
Date: Thu, 7 Sep 2006 10:21:40 +0200

On 07/09/06 08:12 +0200, Anselm R. Garbe wrote:
> On Wed, Sep 06, 2006 at 06:07:45PM +0200, Cedric Krier wrote:
> > Hi, I'm working on an ebuild for dwm.
> > (http://gentoo-sunrise.org/svn/reviewed/x11-wm/dwm/)
> Cool.
>
> > It will be great if you can apply this patch on config.mk.
> > It allows to specify compilation option from command line.
> No.
>
> > +++ dwm-1.4/config.mk 2006-09-06 17:47:22.000000000 +0200
> > @@ -4,8 +4,8 @@
> > # Customize below to fit your system
> >
> > # paths
> > -PREFIX = /usr/local
> > -MANPREFIX = ${PREFIX}/share/man
> > +PREFIX ?= /usr/local
> > +MANPREFIX ?= ${PREFIX}/share/man
> >
> > X11INC = /usr/X11R6/include
> > X11LIB = /usr/X11R6/lib
> > @@ -15,11 +15,11 @@
> > LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
> >
> > # flags
> > -CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
> > +CFLAGS += -g -Wall ${INCS} -DVERSION=\"${VERSION}\"
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Why that in a release?
>
> > LDFLAGS = ${LIBS}
> > #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> It's already there.
>
> > #LDFLAGS = -g ${LIBS}
> >
> > # compiler and linker
> > -CC = cc
> > +CC ?= cc
> > LD = ${CC}
>
> Besides this, you can override any variable defined in config.mk
> using make in this way:
>
> make <var1>=<value> <var2>=<value>
>
> So I really see no need for using the ?= operator (dunno how
> portable it is btw. The Makefile's work out of the box
> with GNU and BSD make and are still quite readable
> (compared to that stupid junk called automake).
>

And what about this patch ? Because I think it must be better if you can
compile dwm with optimisation like that :

make CFLAGS="-O3 -march=athlon-xp"

C├ędric

Received on Thu Sep 07 2006 - 10:22:32 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:31:03 UTC