aboutsummaryrefslogtreecommitdiff
path: root/util/flashrom/Makefile
diff options
context:
space:
mode:
authorBernhard Walle <bernhard.walle@gmx.de>2008-01-21 15:24:22 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-01-21 15:24:22 +0000
commit679c62c083d4e4edbc292160d441dbfe6ae3cd40 (patch)
tree160f77d972437c32697c9e30a3ea7161ce77158e /util/flashrom/Makefile
parent8ce4a19b20f22f74573a93566d4a202e58f00758 (diff)
This patch adds version information to flashrom. Because 'v' and 'V'
are already in use, the patch uses 'R' (for release) and, of course, '--version'. Signed-off-by: Bernhard Walle <bernhard.walle@gmx.de> Acked-by: Ulf Jordan <jordan@chalmers.se> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3067 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/Makefile')
-rw-r--r--util/flashrom/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/flashrom/Makefile b/util/flashrom/Makefile
index 4b2fbbd161..708c077459 100644
--- a/util/flashrom/Makefile
+++ b/util/flashrom/Makefile
@@ -28,6 +28,12 @@ OBJS = chipset_enable.o board_enable.o udelay.o jedec.o sst28sf040.o \
all: pciutils dep $(PROGRAM)
+# Set the flashrom version string from the highest revision number
+# 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)