Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
|
gauravsh
2011/02/10 20:02:05
2011
Che-Liang Chiou
2011/02/14 02:27:53
Done.
| |
| 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 HOSTTOP := $(shell pwd) | 5 HOSTTOP := $(shell pwd) |
| 6 TESTDIR = $(HOSTTOP)/linktest | 6 TESTDIR = $(HOSTTOP)/linktest |
| 7 BUILD_ROOT := ${BUILD}/$(shell basename ${HOSTTOP}) | 7 BUILD_ROOT := ${BUILD}/$(shell basename ${HOSTTOP}) |
| 8 | 8 |
| 9 INCLUDES += \ | 9 INCLUDES += \ |
| 10 -I$(HOSTTOP)/include \ | 10 -I$(HOSTTOP)/include \ |
| 11 -I$(FWDIR)/lib/include \ | 11 -I$(FWDIR)/lib/include \ |
| 12 -I$(FWDIR)/lib/cgptlib/include \ | 12 -I$(FWDIR)/lib/cgptlib/include \ |
| 13 -I$(FWDIR)/lib/cryptolib/include | 13 -I$(FWDIR)/lib/cryptolib/include |
| 14 | 14 |
| 15 # find ./lib -iname '*.c' | sort | 15 # find ./lib -iname '*.c' | sort |
| 16 LIB_SRCS = \ | 16 LIB_SRCS = \ |
| 17 ./lib/crossystem.c \ | 17 ./lib/crossystem.c \ |
| 18 ./lib/file_keys.c \ | 18 ./lib/file_keys.c \ |
| 19 ./lib/fmap.c \ | |
| 19 ./lib/host_common.c \ | 20 ./lib/host_common.c \ |
| 20 ./lib/host_key.c \ | 21 ./lib/host_key.c \ |
| 21 ./lib/host_keyblock.c \ | 22 ./lib/host_keyblock.c \ |
| 22 ./lib/host_misc.c \ | 23 ./lib/host_misc.c \ |
| 23 ./lib/host_signature.c \ | 24 ./lib/host_signature.c \ |
| 24 ./lib/signature_digest.c | 25 ./lib/signature_digest.c |
| 25 | 26 |
| 26 STUB_SRCS = \ | 27 STUB_SRCS = \ |
| 27 ../firmware/stub/boot_device_stub.c \ | 28 ../firmware/stub/boot_device_stub.c \ |
| 28 ../firmware/stub/load_firmware_stub.c \ | 29 ../firmware/stub/load_firmware_stub.c \ |
| 29 ../firmware/stub/tpm_lite_stub.c \ | 30 ../firmware/stub/tpm_lite_stub.c \ |
| 30 ../firmware/stub/utility_stub.c | 31 ../firmware/stub/utility_stub.c |
| 31 | 32 |
| 32 ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS} | 33 ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS} |
| 33 | 34 |
| 34 test : $(HOSTLIB) | 35 test : $(HOSTLIB) |
| 35 $(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out $(TESTDIR)/main.c \ | 36 $(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out $(TESTDIR)/main.c \ |
| 36 $(HOSTLIB) -lcrypto | 37 $(HOSTLIB) -lcrypto |
| 37 | 38 |
| 38 include ../common.mk | 39 include ../common.mk |
| 39 | 40 |
| 40 $(HOSTLIB) : $(ALL_OBJS) $(FWLIB) | 41 $(HOSTLIB) : $(ALL_OBJS) $(FWLIB) |
| 41 rm -rf $@ $(BUILD_ROOT)/.tmp | 42 rm -rf $@ $(BUILD_ROOT)/.tmp |
| 42 mkdir -p $(BUILD_ROOT)/.tmp | 43 mkdir -p $(BUILD_ROOT)/.tmp |
| 43 cd $(BUILD_ROOT)/.tmp ; ar x $(FWLIB) | 44 cd $(BUILD_ROOT)/.tmp ; ar x $(FWLIB) |
| 44 ar qc $@ $^ $(BUILD_ROOT)/.tmp/*.o | 45 ar qc $@ $^ $(BUILD_ROOT)/.tmp/*.o |
| OLD | NEW |