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

Side by Side Diff: src/tlcl/Makefile

Issue 2864018: Detect out-of-date saved-structures.h (Closed) Base URL: ssh://git@chromiumos-git/tpm_lite.git
Patch Set: . Created 10 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 *~
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698