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

Side by Side Diff: firmware/Makefile

Issue 6883040: Add option to use mocked TPM driver (Closed) Base URL: ssh://gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Code review Created 9 years, 8 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 | Annotate | Revision Log
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 LIBS = $(FWLIB) # Firmware library must be self-contained 10 LIBS = $(FWLIB) # Firmware library must be self-contained
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 LIB_SRCS = \ 50 LIB_SRCS = \
51 ./lib/cgptlib/cgptlib.c \ 51 ./lib/cgptlib/cgptlib.c \
52 ./lib/cgptlib/cgptlib_internal.c \ 52 ./lib/cgptlib/cgptlib_internal.c \
53 ./lib/cgptlib/crc32.c \ 53 ./lib/cgptlib/crc32.c \
54 ./lib/cryptolib/padding.c \ 54 ./lib/cryptolib/padding.c \
55 ./lib/cryptolib/rsa.c \ 55 ./lib/cryptolib/rsa.c \
56 ./lib/cryptolib/rsa_utility.c \ 56 ./lib/cryptolib/rsa_utility.c \
57 ./lib/cryptolib/sha1.c \ 57 ./lib/cryptolib/sha1.c \
58 ./lib/cryptolib/sha2.c \ 58 ./lib/cryptolib/sha2.c \
59 ./lib/cryptolib/sha_utility.c \ 59 ./lib/cryptolib/sha_utility.c \
60 ./lib/rollback_index.c \
61 ./lib/tpm_bootmode.c \
62 ./lib/stateful_util.c \ 60 ./lib/stateful_util.c \
63 ./lib/tpm_lite/tlcl.c \
64 ./lib/utility.c \ 61 ./lib/utility.c \
65 ./lib/vboot_common.c \ 62 ./lib/vboot_common.c \
66 ./lib/vboot_firmware.c \ 63 ./lib/vboot_firmware.c \
67 ./lib/vboot_kernel.c \ 64 ./lib/vboot_kernel.c \
68 ./lib/vboot_nvstorage.c 65 ./lib/vboot_nvstorage.c
69 66
67 ifeq ($(MOCK_TPM),)
68 LIB_SRCS += \
69 ./lib/rollback_index.c \
70 ./lib/tpm_bootmode.c \
71 ./lib/tpm_lite/tlcl.c
72 else
73 LIB_SRCS += \
74 ./lib/mocked_rollback_index.c \
75 ./lib/mocked_tpm_bootmode.c \
76 ./lib/tpm_lite/mocked_tlcl.c
77 endif
78
70 LIB_OBJS = $(LIB_SRCS:%.c=${BUILD_ROOT}/%.o) 79 LIB_OBJS = $(LIB_SRCS:%.c=${BUILD_ROOT}/%.o)
71 80
72 STUB_SRCS = \ 81 STUB_SRCS = \
73 ./stub/boot_device_stub.c \ 82 ./stub/boot_device_stub.c \
74 ./stub/load_firmware_stub.c \ 83 ./stub/load_firmware_stub.c \
75 ./stub/tpm_lite_stub.c \ 84 ./stub/tpm_lite_stub.c \
76 ./stub/utility_stub.c 85 ./stub/utility_stub.c
77 86
78 STUB_OBJS = $(STUB_SRCS:%.c=${BUILD_ROOT}/%.o) 87 STUB_OBJS = $(STUB_SRCS:%.c=${BUILD_ROOT}/%.o)
79 88
80 ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS} 89 ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS}
81 90
82 ifeq ($(FIRMWARE_ARCH),) 91 ifeq ($(FIRMWARE_ARCH),)
83 test : $(STUB_OBJS) $(FWLIB) 92 test : $(STUB_OBJS) $(FWLIB)
84 $(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out \ 93 $(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out \
85 $(TESTDIR)/main.c $(STUB_OBJS) $(LIBS) 94 $(TESTDIR)/main.c $(STUB_OBJS) $(LIBS)
86 else 95 else
87 test : $(FWLIB) 96 test : $(FWLIB)
88 endif 97 endif
89 98
90 include ../common.mk 99 include ../common.mk
91 100
92 $(FWLIB) : $(LIB_OBJS) 101 $(FWLIB) : $(LIB_OBJS)
93 rm -f $@ 102 rm -f $@
94 ar qc $@ $^ 103 ar qc $@ $^
OLDNEW
« Makefile ('K') | « Makefile ('k') | firmware/lib/mocked_rollback_index.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698