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 CC ?= gcc | 5 CC ?= gcc |
6 CXX ?= g++ | 6 CXX ?= g++ |
7 CFLAGS = -Wall -DNDEBUG | 7 CFLAGS = -Wall -DNDEBUG |
8 INCLUDES ?= -I../include/ | 8 INCLUDES ?= -I../include/ |
9 TOP ?= ../ | 9 TOP ?= ../ |
10 | 10 |
11 LIBS = firmware_image.o kernel_image.o signature_digest.o file_keys.o | 11 LIBS = firmware_image.o kernel_image.o signature_digest.o file_keys.o |
12 FIRMWARELIBS = $(TOP)/crypto/libcrypto.a $(TOP)/common/libcommon.a | 12 FIRMWARELIBS = $(TOP)/crypto/libcrypto.a $(TOP)/common/libcommon.a |
13 | 13 |
14 all: dumpRSAPublicKey verify_data file_keys.o signature_digest.o firmware_image.
o \ | 14 all: dumpRSAPublicKey verify_data file_keys.o signature_digest.o firmware_image.
o \ |
15 » kernel_image.o signature_digest.o firmware_utility | 15 » kernel_image.o signature_digest.o firmware_utility kernel_utility |
16 | 16 |
17 dumpRSAPublicKey: dumpRSAPublicKey.c | 17 dumpRSAPublicKey: dumpRSAPublicKey.c |
18 $(CC) $(CFLAGS) $< -o $@ -lcrypto | 18 $(CC) $(CFLAGS) $< -o $@ -lcrypto |
19 | 19 |
20 verify_data: verify_data.c $(LIBS) $(FIRMWARELIBS) | 20 verify_data: verify_data.c $(LIBS) $(FIRMWARELIBS) |
21 $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) $(FIRMWARELIBS) -lcrypto | 21 $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) $(FIRMWARELIBS) -lcrypto |
22 | 22 |
23 firmware_utility: firmware_utility.cc $(LIBS) $(FIRMWARELIBS) | 23 firmware_utility: firmware_utility.cc $(LIBS) $(FIRMWARELIBS) |
24 $(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \ | 24 $(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \ |
25 -o $@ $(FIRMWARELIBS) $(LIBS) -lcrypto | 25 -o $@ $(FIRMWARELIBS) $(LIBS) -lcrypto |
26 | 26 |
| 27 kernel_utility: kernel_utility.cc $(LIBS) $(FIRMWARELIBS) |
| 28 $(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \ |
| 29 -o $@ $(FIRMWARELIBS) $(LIBS) -lcrypto |
| 30 |
27 signature_digest.o: signature_digest.c | 31 signature_digest.o: signature_digest.c |
28 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ | 32 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ |
29 | 33 |
30 file_keys.o: file_keys.c | 34 file_keys.o: file_keys.c |
31 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ | 35 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ |
32 | 36 |
33 firmware_image.o: firmware_image.c | 37 firmware_image.o: firmware_image.c |
34 $(CC) $(CFLAGS) -ansi $(INCLUDES) -c $< -o $@ | 38 $(CC) $(CFLAGS) -ansi $(INCLUDES) -c $< -o $@ |
35 | 39 |
36 kernel_image.o: kernel_image.c | 40 kernel_image.o: kernel_image.c |
37 $(CC) $(CFLAGS) -ansi $(INCLUDES) -c $< -o $@ | 41 $(CC) $(CFLAGS) -ansi $(INCLUDES) -c $< -o $@ |
38 clean: | 42 clean: |
39 rm -f dumpRSAPublicKey verify_data signature_digest firmware_utility \ | 43 rm -f dumpRSAPublicKey verify_data signature_digest firmware_utility \ |
40 » $(LIBS) | 44 » kernel_utility $(LIBS) |
OLD | NEW |