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. |
| 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 LIBTLCL = ../tlcl/libtlcl.a | 5 LIBTLCL = ../tlcl/libtlcl.a |
| 6 | 6 |
| 7 USE_TPM_EMULATOR ?= 0 | |
| 8 | |
| 7 ifeq ($(USE_TPM_EMULATOR),1) | 9 ifeq ($(USE_TPM_EMULATOR),1) |
| 8 ifeq ($(LOCAL_COMPILATION),1) | 10 ifeq ($(LOCAL_COMPILATION),1) |
| 9 LIBTPM = ../../../../third_party/tpm-emulator/build/tpm/libtpm.a | 11 LIBTPM = ../../../../third_party/tpm-emulator/build/tpm/libtpm.a |
| 10 LIBCRYPTO = ../../../../third_party/tpm-emulator/build/crypto/libcrypto.a | 12 LIBCRYPTO = ../../../../third_party/tpm-emulator/build/crypto/libcrypto.a |
| 11 LIBTPMEMU = ../../../../third_party/tpm-emulator/build/tpmd/unix/libtpmemu.a | 13 LIBTPMEMU = ../../../../third_party/tpm-emulator/build/tpmd/unix/libtpmemu.a |
| 12 else | 14 else |
| 13 LIBTPM = ${ROOT}/usr/lib/tpmemu/libtpm.a | 15 LIBTPM = ${ROOT}/usr/lib/tpmemu/libtpm.a |
| 14 LIBCRYPTO = ${ROOT}/usr/lib/tpmemu/libcrypto.a | 16 LIBCRYPTO = ${ROOT}/usr/lib/tpmemu/libcrypto.a |
| 15 LIBTPMEMU = ${ROOT}/usr/lib/tpmemu/libtpmemu.a | 17 LIBTPMEMU = ${ROOT}/usr/lib/tpmemu/libtpmemu.a |
| 16 endif | 18 endif |
| 17 LIBGMP = -lgmp | 19 LIBGMP = -lgmp |
| 18 endif | 20 endif |
| 19 | 21 |
| 20 LIBS = $(LIBTLCL) $(LIBTPMEMU) $(LIBTPM) $(LIBCRYPTO) $(LIBGMP) | 22 LIBS = $(LIBTLCL) $(LIBTPMEMU) $(LIBTPM) $(LIBCRYPTO) $(LIBGMP) |
| 21 | 23 |
| 22 CC ?= cc | 24 CC ?= cc |
| 23 CFLAGS += -Werror -Wall | 25 CFLAGS += -Werror -Wall -DUSE_TPM_EMULATOR=$(USE_TPM_EMULATOR) |
| 24 #CFLAGS += -pedantic -ansi | 26 #CFLAGS += -pedantic -ansi |
| 25 | 27 |
| 26 TESTS = tpmtest_clear \ | 28 TESTS = tpmtest_clear \ |
| 27 tpmtest_enable \ | 29 tpmtest_enable \ |
| 28 tpmtest_globallock \ | 30 tpmtest_globallock \ |
| 29 tpmtest_lock \ | 31 tpmtest_lock \ |
| 30 tpmtest_readonly \ | 32 tpmtest_readonly \ |
| 31 tpmtest_writelimit \ | 33 tpmtest_writelimit \ |
| 34 tpmtest_redefine \ | |
|
gauravsh
2010/06/08 07:53:43
nit: alpha order
| |
| 35 tpmtest_earlynvram \ | |
| 36 tpmtest_earlynvram2 \ | |
| 37 tpmtest_earlyextend \ | |
| 32 | 38 |
| 33 all: $(TESTS) | 39 all: $(TESTS) |
| 34 | 40 |
| 35 $(TESTS): tpmtest_%: %.o $(LIBS) | 41 $(TESTS): tpmtest_%: %.o $(LIBS) |
| 36 $(CC) $(LDFLAGS) -g $< -o $@ $(LIBS) | 42 $(CC) $(LDFLAGS) -g $< -o $@ $(LIBS) |
| 37 | 43 |
| 38 .c.o: | 44 .c.o: |
| 39 $(CC) $(CFLAGS) -g -c $< -I../tlcl/ | 45 $(CC) $(CFLAGS) -g -c $< -I../tlcl/ |
| 40 | 46 |
| 41 clean: | 47 clean: |
| 42 rm -f $(TESTS) *.o *~ | 48 rm -f $(TESTS) *.o *~ |
| OLD | NEW |