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 export CC ?= gcc | 5 export CC ?= gcc |
6 export CXX ?= g++ | 6 export CXX ?= g++ |
7 export CFLAGS = -Wall -DNDEBUG -O3 -Werror | 7 export CFLAGS = -Wall -DNDEBUG -O3 -Werror |
8 export TOP = $(shell pwd) | 8 export TOP = $(shell pwd) |
9 export FWDIR=$(TOP)/vboot_firmware | 9 export FWDIR=$(TOP)/firmware |
10 export HOSTDIR=$(TOP)/host | 10 export HOSTDIR=$(TOP)/host |
11 export INCLUDES = \ | 11 export INCLUDES = -I$(FWDIR)/include |
12 » -I$(FWDIR)/include \ | |
13 » -I$(TOP)/misclibs/include | |
14 | 12 |
15 export BUILD = ${TOP}/build | 13 export BUILD = ${TOP}/build |
16 export FWLIB = ${BUILD}/vboot_fw.a | 14 export FWLIB = ${BUILD}/vboot_fw.a |
17 export HOSTLIB= ${BUILD}/vboot_host.a | 15 export HOSTLIB= ${BUILD}/vboot_host.a |
18 | 16 |
19 SUBDIRS = vboot_firmware misclibs host vkernel utility cgpt tests | 17 SUBDIRS = firmware host utility cgpt tests |
20 | 18 |
21 all: | 19 all: |
22 set -e; \ | 20 set -e; \ |
23 for d in $(shell find ${SUBDIRS} -name '*.c' -exec dirname {} \; |\ | 21 for d in $(shell find ${SUBDIRS} -name '*.c' -exec dirname {} \; |\ |
24 sort -u); do \ | 22 sort -u); do \ |
25 newdir=${BUILD}/$$d; \ | 23 newdir=${BUILD}/$$d; \ |
26 if [ ! -d $$newdir ]; then \ | 24 if [ ! -d $$newdir ]; then \ |
27 mkdir -p $$newdir; \ | 25 mkdir -p $$newdir; \ |
28 fi; \ | 26 fi; \ |
29 done && \ | 27 done && \ |
30 for i in $(SUBDIRS); do \ | 28 for i in $(SUBDIRS); do \ |
31 make -C $$i; \ | 29 make -C $$i; \ |
32 done | 30 done |
33 | 31 |
34 clean: | 32 clean: |
35 /bin/rm -rf ${BUILD} | 33 /bin/rm -rf ${BUILD} |
36 | 34 |
37 install: | 35 install: |
38 $(MAKE) -C utility install | 36 $(MAKE) -C utility install |
39 $(MAKE) -C cgpt install | 37 $(MAKE) -C cgpt install |
40 | 38 |
41 runtests: | 39 runtests: |
42 $(MAKE) -C tests runtests | 40 $(MAKE) -C tests runtests |
OLD | NEW |