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 TOP ?= ../ |
5 CC ?= gcc | 6 CC ?= gcc |
6 CXX ?= g++ | 7 CXX ?= g++ |
7 CFLAGS ?= -Wall -DNDEBUG -O3 -Werror | 8 INCLUDES += -I./include \ |
8 INCLUDES ?= -I../include/ | 9 » » -I../cryptolib/include \ |
9 TOP ?= ../ | 10 » » -I../common/include \ |
| 11 » » -I../misclibs/include \ |
| 12 » » -I../vfirmware/include\ |
| 13 » » -I../vkernel/include |
| 14 CFLAGS ?= -Wall -DNDEBUG -O3 -Werror $(INCLUDES) |
| 15 LIBS = $(TOP)/misclibs/file_keys.o \ |
| 16 » $(TOP)/misclibs/signature_digest.o \ |
| 17 » $(TOP)/vfirmware/firmware_image.o \ |
| 18 » $(TOP)/vfirmware/firmware_image_fw.o \ |
| 19 » $(TOP)/vkernel/kernel_image.o \ |
| 20 » $(TOP)/vkernel/kernel_image_fw.o |
| 21 FIRMWARELIBS = $(TOP)/cryptolib/libcrypto.a $(TOP)/common/libcommon.a |
10 | 22 |
11 LIBS = file_keys.o \ | 23 TARGET_BINS = dumpRSAPublicKey \ |
12 » firmware_image.o \ | |
13 » firmware_image_fw.o \ | |
14 » kernel_image.o \ | |
15 » kernel_image_fw.o \ | |
16 » rollback_index.o \ | |
17 » signature_digest.o | |
18 | |
19 FIRMWARELIBS = $(TOP)/crypto/libcrypto.a $(TOP)/common/libcommon.a | |
20 | |
21 TARGET_BINS = $(LIBS) \ | |
22 » » dumpRSAPublicKey \ | |
23 firmware_utility \ | 24 firmware_utility \ |
24 kernel_utility \ | 25 kernel_utility \ |
25 signature_digest_utility \ | 26 signature_digest_utility \ |
26 verify_data | 27 verify_data |
27 | 28 |
28 all: $(TARGET_BINS) | 29 all: $(TARGET_BINS) |
29 | 30 |
30 .c.o: | |
31 $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ | |
32 | |
33 dumpRSAPublicKey: dumpRSAPublicKey.c | 31 dumpRSAPublicKey: dumpRSAPublicKey.c |
34 » $(CC) $(CFLAGS) $< -o $@ -lcrypto | 32 » $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ -lcrypto |
35 | |
36 firmware_image_fw.o: firmware_image_fw.c | |
37 » $(CC) $(CFLAGS) -ansi $(INCLUDES) -c $^ -o $@ | |
38 | 33 |
39 firmware_utility: firmware_utility.cc $(LIBS) $(FIRMWARELIBS) | 34 firmware_utility: firmware_utility.cc $(LIBS) $(FIRMWARELIBS) |
40 $(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \ | 35 $(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \ |
41 -o $@ $(FIRMWARELIBS) $(LIBS) $(TOP)/common/libcommon.a \ | 36 -o $@ $(FIRMWARELIBS) $(LIBS) $(TOP)/common/libcommon.a \ |
42 -lcrypto | 37 -lcrypto |
43 | 38 |
44 kernel_image_fw.o: kernel_image_fw.c | |
45 $(CC) $(CFLAGS) -ansi $(INCLUDES) -c $< -o $@ | |
46 | |
47 kernel_utility: kernel_utility.cc $(LIBS) $(FIRMWARELIBS) | 39 kernel_utility: kernel_utility.cc $(LIBS) $(FIRMWARELIBS) |
48 $(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \ | 40 $(CXX) $(CFLAGS) $(INCLUDES) -ggdb -D__STDC_LIMIT_MACROS $< \ |
49 -o $@ $(FIRMWARELIBS) $(LIBS) $(TOP)/common/libcommon.a \ | 41 -o $@ $(FIRMWARELIBS) $(LIBS) $(TOP)/common/libcommon.a \ |
50 -lcrypto | 42 -lcrypto |
51 | 43 |
52 signature_digest_utility: signature_digest_utility.c $(LIBS) $(FIRMWARELIBS) | 44 signature_digest_utility: signature_digest_utility.c $(LIBS) $(FIRMWARELIBS) |
53 $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) $(FIRMWARELIBS) -lcrypto | 45 $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) $(FIRMWARELIBS) -lcrypto |
54 | 46 |
55 verify_data: verify_data.c $(LIBS) $(FIRMWARELIBS) | 47 verify_data: verify_data.c $(LIBS) $(FIRMWARELIBS) |
56 $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) $(FIRMWARELIBS) -lcrypto | 48 $(CC) $(CFLAGS) $(INCLUDES) $< -o $@ $(LIBS) $(FIRMWARELIBS) -lcrypto |
57 | 49 |
58 clean: | 50 clean: |
59 » rm -f $(TARGET_BINS) $(LIBS) | 51 » rm -f $(TARGET_BINS) |
60 | 52 |
OLD | NEW |