On Tue, Feb 12, 2008 at 02:37:37PM -0500, Clark Rawlins wrote:
> With this small change it is possible to build flashrom again when
> specifying custom CFLAGS from the make command line like:
> 
> make CFLAGS="..."
> 
> I need to do this when building flashrom in a cross compiler environment
> like buildroot for a foreign target. 
> 
> Signed-of-by: Clark Rawlins <[EMAIL PROTECTED]>
> 
> Please guide me if I have not completed all the required steps or if my
> patch isn't quite ready.

Untested yet, but looks good to me. Can you post another patch which
also does the same for LDFLAGS etc. while we're at it?


> Index: Makefile
> ===================================================================
> --- Makefile  (revision 3101)
> +++ Makefile  (working copy)
> @@ -32,7 +32,7 @@
>  # of the checked out flashrom files.
>  SVNDEF := -D'FLASHROM_VERSION="$(shell svnversion -cn . \
>            | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
> -CFLAGS += $(SVNDEF)
> +FLASHROM_CFLAGS = $(CFLAGS) $(SVNDEF)
>  
>  $(PROGRAM): $(OBJS)
>       $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
> @@ -69,3 +69,5 @@
>  
>  -include .dependencies
>  
> +%.o : %.c
> +     $(CC) -c $(FLASHROM_CFLAGS) $(CPPFLAGS) $< -o $@


Thanks, Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org

-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to