OLD | NEW |
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 test : $(FWLIB) update-version | 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 | 48 # This is executed at every make, to see if anything has changed |
49 update-version : | 49 update-version : |
50 find \( -name '*.[ch]' -o -name 'Makefile*' \) -a \! -name version.c \ | 50 find \( -name '*.[ch]' -o -name 'Makefile*' \) -a \! -name version.c \ |
51 | sort | xargs cat | md5sum | cut -c 25-32 > \ | 51 | sort | xargs cat | md5sum | cut -c 25-32 > \ |
52 ${BUILD_ROOT}/x.tmp && \ | 52 ${BUILD_ROOT}/x.tmp && \ |
53 echo "char* VbootVersion = \"VBOOv=$$(cat ${BUILD_ROOT}/x.tmp)\";" > \ | 53 echo "char* VbootVersion = \"VBOOv=$$(cat ${BUILD_ROOT}/x.tmp)\";" > \ |
54 » » ${BUILD_ROOT}\version.tmp && \ | 54 » » ${BUILD_ROOT}/version.tmp && \ |
55 » (cmp -s ${BUILD_ROOT}\version.tmp version.c || \ | 55 » (cmp -s ${BUILD_ROOT}/version.tmp version.c || \ |
56 ( echo "** Updating version.c **" && \ | 56 ( echo "** Updating version.c **" && \ |
57 » » cp ${BUILD_ROOT}\version.tmp version.c)) | 57 » » cp ${BUILD_ROOT}/version.tmp version.c)) |
58 | 58 |
59 include ../common.mk | 59 include ../common.mk |
60 | 60 |
61 $(FWLIB) : $(ALL_OBJS) | 61 $(FWLIB) : $(ALL_OBJS) |
62 rm -f $@ | 62 rm -f $@ |
63 ar qc $@ $^ | 63 ar qc $@ $^ |
OLD | NEW |