Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Side by Side Diff: firmware/Makefile

Issue 2817025: Automated version generation for vboot firmware. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Version ochange due to merging Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | firmware/version.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 FWTOP := $(shell pwd) 5 FWTOP := $(shell pwd)
6 LIBDIR = $(FWTOP)/lib 6 LIBDIR = $(FWTOP)/lib
7 STUBDIR = $(FWTOP)/stub 7 STUBDIR = $(FWTOP)/stub
8 TESTDIR = $(FWTOP)/linktest 8 TESTDIR = $(FWTOP)/linktest
9 BUILD_ROOT := ${BUILD}/$(shell basename ${FWTOP}) 9 BUILD_ROOT := ${BUILD}/$(shell basename ${FWTOP})
10 10
(...skipping 21 matching lines...) Expand all
32 ./lib/vboot_common.c \ 32 ./lib/vboot_common.c \
33 ./lib/vboot_firmware.c \ 33 ./lib/vboot_firmware.c \
34 ./lib/vboot_kernel.c 34 ./lib/vboot_kernel.c
35 35
36 STUB_SRCS = \ 36 STUB_SRCS = \
37 ./stub/boot_device_stub.c \ 37 ./stub/boot_device_stub.c \
38 ./stub/load_firmware_stub.c \ 38 ./stub/load_firmware_stub.c \
39 ./stub/tlcl.c \ 39 ./stub/tlcl.c \
40 ./stub/utility_stub.c 40 ./stub/utility_stub.c
41 41
42 ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS} 42 ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS} version.c
43 43
44 test : $(FWLIB) 44 test : $(FWLIB) update-version
45 $(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out \ 45 $(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out \
46 $(TESTDIR)/main.c $(FWLIB) 46 $(TESTDIR)/main.c $(FWLIB)
47 47
48 # This is executed at every make, to see if anything has changed
49 update-version :
50 find \( -name '*.[ch]' -o -name 'Makefile*' \) -a \! -name version.c \
51 | sort | xargs cat | md5sum | cut -c 25-32 > x.tmp
52 echo "char* VbootVersion = \"VBOOv=$$(cat x.tmp)\";" > version.tmp
53 cmp -s version.tmp version.c || \
54 ( echo "** Updating version.c **" && \
55 cp version.tmp version.c )
56
57
48 include ../common.mk 58 include ../common.mk
49 59
50 $(FWLIB) : $(ALL_OBJS) 60 $(FWLIB) : $(ALL_OBJS)
51 rm -f $@ 61 rm -f $@
52 ar qc $@ $^ 62 ar qc $@ $^
OLDNEW
« no previous file with comments | « no previous file | firmware/version.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698