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.

Clark
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 $@
-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to