blob: 853bfbfa4c23e6a2e3516508bd8c85ef402eb178 [file] [log] [blame]
Gaurav Shah322536d2010-01-28 15:01:23 -08001# 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
3# found in the LICENSE file.
4
Gaurav Shah27bfc8b2010-02-17 14:19:24 -08005export CC ?= gcc
Bill Richardsonf1372d92010-06-11 09:15:55 -07006export CXX ?= g++
Gaurav Shah456678b2010-03-10 18:38:45 -08007export CFLAGS = -Wall -DNDEBUG -O3 -Werror
Gaurav Shah7ca31f32010-02-16 19:04:11 -08008export TOP = $(shell pwd)
Bill Richardson0b8f35c2010-05-26 09:18:38 -07009export FWDIR=$(TOP)/vboot_firmware
Randall Spanglerd1836442010-06-10 09:59:04 -070010export HOSTDIR=$(TOP)/host
Gaurav Shahfc70d722010-03-31 13:26:55 -070011export INCLUDES = \
Bill Richardson0b8f35c2010-05-26 09:18:38 -070012 -I$(FWDIR)/include \
Randall Spangler3003c1d2010-05-27 09:20:11 -070013 -I$(TOP)/misclibs/include
Gaurav Shah322536d2010-01-28 15:01:23 -080014
Bill Richardson0b8f35c2010-05-26 09:18:38 -070015export FWLIB=$(FWDIR)/vboot_fw.a
Randall Spanglerd1836442010-06-10 09:59:04 -070016export HOSTLIB=$(HOSTDIR)/vboot_host.a
Bill Richardson0b8f35c2010-05-26 09:18:38 -070017
Bill Richardsonf1372d92010-06-11 09:15:55 -070018SUBDIRS=vboot_firmware misclibs host vfirmware vkernel utility cgpt tests
Gaurav Shah322536d2010-01-28 15:01:23 -080019
20all:
Louis Yung-Chieh Lob31ddce2010-05-21 16:35:44 +080021 set -e; \
Gaurav Shah322536d2010-01-28 15:01:23 -080022 for i in $(SUBDIRS); do \
Louis Yung-Chieh Lob31ddce2010-05-21 16:35:44 +080023 make -C $$i; \
Gaurav Shah322536d2010-01-28 15:01:23 -080024 done
25
26clean:
Louis Yung-Chieh Lob31ddce2010-05-21 16:35:44 +080027 set -e; \
Gaurav Shah322536d2010-01-28 15:01:23 -080028 for i in $(SUBDIRS); do \
Louis Yung-Chieh Lob31ddce2010-05-21 16:35:44 +080029 make -C $$i clean; \
Gaurav Shah322536d2010-01-28 15:01:23 -080030 done
Bill Richardson371df8b2010-05-27 14:19:47 -070031
32install:
33 $(MAKE) -C utility install
Bill Richardsonf1372d92010-06-11 09:15:55 -070034 $(MAKE) -C cgpt install
Gaurav Shahe6421982010-06-03 07:49:32 -070035
36runtests:
37 $(MAKE) -C tests runtests