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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 tlcl.o: tlcl.c tlcl_internal.h tlcl.h \ | 21 tlcl.o: tlcl.c tlcl_internal.h tlcl.h \ |
22 update-structures structures.h update-version version.h | 22 update-structures structures.h update-version version.h |
23 | 23 |
24 update-structures: generator | 24 update-structures: generator |
25 ./generator > structures.tmp | 25 ./generator > structures.tmp |
26 cmp -s structures.tmp structures.h || \ | 26 cmp -s structures.tmp structures.h || \ |
27 ( echo "%% Updating structures.h %%" && \ | 27 ( echo "%% Updating structures.h %%" && \ |
28 cp structures.tmp structures.h ) | 28 cp structures.tmp structures.h ) |
29 | 29 |
30 update-version: | 30 update-version: |
31 » find \( -name '*.[ch]' -o -name 'Makefile*' \) -a \! -name version.h \ | 31 » find \( -name '*.[ch]' -o -name 'Makefile' \) -a \! -name version.h \ |
32 | sort | xargs cat | md5sum | cut -c 25-32 > x.tmp | 32 | sort | xargs cat | md5sum | cut -c 25-32 > x.tmp |
33 echo "char* TlclVersion = \"TLCLv=$$(cat x.tmp)\";" > version.tmp | 33 echo "char* TlclVersion = \"TLCLv=$$(cat x.tmp)\";" > version.tmp |
34 cmp -s version.tmp version.h || \ | 34 cmp -s version.tmp version.h || \ |
35 ( echo "** Updating version.h **" && cp version.tmp version.h ) | 35 ( echo "** Updating version.h **" && cp version.tmp version.h ) |
36 | 36 |
37 generator: generator.c tlcl.h | 37 generator: generator.c tlcl.h |
38 $(HOSTCC) $(LOCAL_CFLAGS) -I$(ROOT)/usr/include \ | 38 $(HOSTCC) $(LOCAL_CFLAGS) -I$(ROOT)/usr/include \ |
39 -fpack-struct generator.c -o generator | 39 -fpack-struct generator.c -o generator |
40 | 40 |
41 clean: | 41 clean: |
42 rm -f generator *.o *.a version.tmp structures.tmp x.tmp *~ | 42 rm -f generator *.o *.a version.tmp structures.tmp x.tmp *~ |
OLD | NEW |