mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-26 01:37:24 +00:00
This CL also includes a biosincludes.h for ARM platform. The changes to ebuilds are in a separated CL:5352002. BUG=None TEST=Run 'make' and 'make FIRMWARE_ARCH=arm' successfully Review URL: http://codereview.chromium.org/5301004 Change-Id: I76738972a8215e346910a76a664a91f6f6927747
70 lines
1.4 KiB
Makefile
70 lines
1.4 KiB
Makefile
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
export FIRMWARE_ARCH
|
|
|
|
export CC ?= gcc
|
|
export CXX ?= g++
|
|
ifeq ($(FIRMWARE_ARCH),)
|
|
export CFLAGS = -Wall -Werror -DCHROMEOS_ENVIRONMENT
|
|
else
|
|
export CFLAGS = -Wall -Werror
|
|
endif
|
|
|
|
ifeq (${DEBUG},)
|
|
CFLAGS += -O3
|
|
else
|
|
CFLAGS += -O0 -g -DVBOOT_DEBUG
|
|
endif
|
|
|
|
ifeq (${DISABLE_NDEBUG},)
|
|
CFLAGS += -DNDEBUG
|
|
endif
|
|
|
|
export TOP = $(shell pwd)
|
|
export FWDIR=$(TOP)/firmware
|
|
export HOSTDIR=$(TOP)/host
|
|
ifeq ($(FIRMWARE_ARCH),)
|
|
export INCLUDES = -I$(FWDIR)/include -I$(FWDIR)/stub/include
|
|
else
|
|
export INCLUDES = -I$(FWDIR)/include -I$(FWDIR)/arch/$(FIRMWARE_ARCH)/include
|
|
endif
|
|
|
|
export BUILD = ${TOP}/build
|
|
export FWLIB = ${BUILD}/vboot_fw.a
|
|
export HOSTLIB = ${BUILD}/vboot_host.a
|
|
|
|
ifeq ($(FIRMWARE_ARCH),)
|
|
SUBDIRS = firmware host utility cgpt tests tests/tpm_lite
|
|
else
|
|
SUBDIRS = firmware
|
|
endif
|
|
|
|
all:
|
|
set -e; \
|
|
for d in $(shell find ${SUBDIRS} -name '*.c' -exec dirname {} \; |\
|
|
sort -u); do \
|
|
newdir=${BUILD}/$$d; \
|
|
if [ ! -d $$newdir ]; then \
|
|
mkdir -p $$newdir; \
|
|
fi; \
|
|
done; \
|
|
[ -z "$(FIRMWARE_ARCH)" ] && make -C utility update_tlcl_structures; \
|
|
for i in $(SUBDIRS); do \
|
|
make -C $$i; \
|
|
done
|
|
|
|
clean:
|
|
/bin/rm -rf ${BUILD}
|
|
|
|
install:
|
|
$(MAKE) -C utility install
|
|
$(MAKE) -C cgpt install
|
|
|
|
runtests:
|
|
$(MAKE) -C tests runtests
|
|
|
|
rbtest:
|
|
$(MAKE) -C tests rbtest
|