| 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 INCLUDEDIRS = -I../../../../third_party/tpm-emulator/tpmd/unix | 5 INCLUDEDIRS = -I../../../../third_party/tpm-emulator/tpmd/unix |
| 6 LOCAL_CFLAGS = -g -Wall -Werror $(INCLUDEDIRS) | 6 LOCAL_CFLAGS = -g -Wall -Werror $(INCLUDEDIRS) |
| 7 CFLAGS += $(LOCAL_CFLAGS) | 7 CFLAGS += $(LOCAL_CFLAGS) |
| 8 # CFLAGS += -ansi -pedantic | 8 # CFLAGS += -ansi -pedantic |
| 9 ifeq ($(USE_TPM_EMULATOR),1) | 9 ifeq ($(USE_TPM_EMULATOR),1) |
| 10 CFLAGS += -DUSE_TPM_EMULATOR=1 | 10 CFLAGS += -DUSE_TPM_EMULATOR=1 |
| 11 else | 11 else |
| 12 CFLAGS += -DUSE_TPM_EMULATOR=0 | 12 CFLAGS += -DUSE_TPM_EMULATOR=0 |
| 13 endif | 13 endif |
| 14 | 14 |
| 15 CC ?= cc | 15 CC ?= cc |
| 16 HOSTCC = cc | 16 HOSTCC = cc |
| 17 | 17 |
| 18 libtlcl.a: tlcl.o | 18 libtlcl.a: tlcl.o |
| 19 ar rcs libtlcl.a tlcl.o | 19 ar rcs libtlcl.a tlcl.o |
| 20 | 20 |
| 21 tlcl.o: tlcl.c tlcl_internal.h tlcl.h structures.h | 21 tlcl.o: tlcl.c tlcl_internal.h tlcl.h structures.h |
| 22 | 22 |
| 23 structures.h: generator | 23 structures.h: generator |
| 24 ./generator > structures.h | 24 ./generator > structures.h |
| 25 sed -e '0,/This file is automatically/d' < structures.h > x.tmp |
| 26 sed -e '0,/This file is automatically/d' < saved-structures.h > y.tmp |
| 27 cmp -s x.tmp y.tmp || \ |
| 28 (echo "Please update saved-structures.h" && false) |
| 25 | 29 |
| 26 generator: generator.c tlcl.h | 30 generator: generator.c tlcl.h |
| 27 $(HOSTCC) $(LOCAL_CFLAGS) -I$(ROOT)/usr/include \ | 31 $(HOSTCC) $(LOCAL_CFLAGS) -I$(ROOT)/usr/include \ |
| 28 -fpack-struct generator.c -o generator | 32 -fpack-struct generator.c -o generator |
| 29 | 33 |
| 30 clean: | 34 clean: |
| 31 » rm -f generator *.o *.a structures.h *~ | 35 » rm -f generator *.o *.a structures.h x.tmp y.tmp *~ |
| OLD | NEW |