| 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 FIRMWARE_ARCH | 5 export FIRMWARE_ARCH |
| 6 | 6 |
| 7 export CC ?= gcc | 7 export CC ?= gcc |
| 8 export CXX ?= g++ | 8 export CXX ?= g++ |
| 9 export CFLAGS = -Wall -Werror | 9 export CFLAGS = -Wall -Werror |
| 10 | 10 |
| 11 ifeq (${DEBUG},) | 11 ifeq (${DEBUG},) |
| 12 CFLAGS += -O3 | 12 CFLAGS += -O3 |
| 13 else | 13 else |
| 14 CFLAGS += -O0 -g | 14 CFLAGS += -O0 -g |
| 15 endif | 15 endif |
| 16 | 16 |
| 17 # Override CC and CFLAGS only if FIRMWARE_CONFIG_PATH is not empty, but we | 17 # Override CC and CFLAGS only if FIRMWARE_CONFIG_PATH is not empty, but we |
| 18 # wish to preserve -D flags (so move all -D flags after this). | 18 # wish to preserve -D flags (so move all -D flags after this). |
| 19 ifneq (${FIRMWARE_CONFIG_PATH},) | 19 ifneq (${FIRMWARE_CONFIG_PATH},) |
| 20 include ${FIRMWARE_CONFIG_PATH} | 20 include ${FIRMWARE_CONFIG_PATH} |
| 21 endif | 21 endif |
| 22 | 22 |
| 23 # Fix compiling directly on host (outside of emake) |
| 24 ifeq ($(ARCH),) |
| 25 export ARCH=amd64 |
| 26 endif |
| 27 |
| 23 ifeq ($(FIRMWARE_ARCH),) | 28 ifeq ($(FIRMWARE_ARCH),) |
| 24 CFLAGS += -DCHROMEOS_ENVIRONMENT | 29 CFLAGS += -DCHROMEOS_ENVIRONMENT |
| 25 endif | 30 endif |
| 26 | 31 |
| 27 ifneq (${DEBUG},) | 32 ifneq (${DEBUG},) |
| 28 CFLAGS += -DVBOOT_DEBUG | 33 CFLAGS += -DVBOOT_DEBUG |
| 29 endif | 34 endif |
| 30 | 35 |
| 31 ifeq (${DISABLE_NDEBUG},) | 36 ifeq (${DISABLE_NDEBUG},) |
| 32 CFLAGS += -DNDEBUG | 37 CFLAGS += -DNDEBUG |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 $(MAKE) -C cgpt install | 78 $(MAKE) -C cgpt install |
| 74 | 79 |
| 75 runtests: | 80 runtests: |
| 76 $(MAKE) -C tests runtests | 81 $(MAKE) -C tests runtests |
| 77 | 82 |
| 78 rbtest: | 83 rbtest: |
| 79 $(MAKE) -C tests rbtest | 84 $(MAKE) -C tests rbtest |
| 80 | 85 |
| 81 runbmptests: | 86 runbmptests: |
| 82 $(MAKE) -C tests runbmptests | 87 $(MAKE) -C tests runbmptests |
| OLD | NEW |