mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
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: Clark Rawlins <clark@bit63.org> Acked-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
parent
3697ac75d5
commit
02016f742c
4
Makefile
4
Makefile
@ -32,12 +32,14 @@ all: pciutils dep $(PROGRAM)
|
|||||||
# of the checked out flashrom files.
|
# of the checked out flashrom files.
|
||||||
SVNDEF := -D'FLASHROM_VERSION="$(shell svnversion -cn . \
|
SVNDEF := -D'FLASHROM_VERSION="$(shell svnversion -cn . \
|
||||||
| sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
|
| sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"'
|
||||||
CFLAGS += $(SVNDEF)
|
|
||||||
|
|
||||||
$(PROGRAM): $(OBJS)
|
$(PROGRAM): $(OBJS)
|
||||||
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
|
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
|
||||||
$(STRIP) $(STRIP_ARGS) $(PROGRAM)
|
$(STRIP) $(STRIP_ARGS) $(PROGRAM)
|
||||||
|
|
||||||
|
flashrom.o: flashrom.c
|
||||||
|
$(CC) -c $(CFLAGS) $(SVNDEF) $(CPPFLAGS) $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *~
|
rm -f *.o *~
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user