Commit 02016f74 authored by Clark Rawlins's avatar Clark Rawlins Committed by Uwe Hermann
Browse files

Fix compilation with custom CFLAGS


With this small change it is possible to build flashrom again when
specifying custom CFLAGS/LDFLAGS from the make command line like.

  make CFLAGS="..." LDFLAGS="..."

I need to do this when building flashrom in a cross compiler environment
like buildroot for a foreign target.

Corresponding to flashrom svn r196 and coreboot v2 svn r3102.
Signed-off-by: default avatarClark Rawlins <clark@bit63.org>
Acked-by: default avatarRonald G. Minnich <rminnich@gmail.com>
Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
parent 3697ac75
......@@ -32,12 +32,14 @@ all: pciutils dep $(PROGRAM)
# of the checked out flashrom files.
SVNDEF := -D'FLASHROM_VERSION="$(shell svnversion -cn . \
| sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
CFLAGS += $(SVNDEF)
$(PROGRAM): $(OBJS)
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
$(STRIP) $(STRIP_ARGS) $(PROGRAM)
flashrom.o: flashrom.c
$(CC) -c $(CFLAGS) $(SVNDEF) $(CPPFLAGS) $< -o $@
clean:
rm -f *.o *~
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment