Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: firmware/Makefile

Issue 5301004: Add firmware build mode to Makefiles (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Add arch/ into in README Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile ('k') | firmware/README » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/Makefile
diff --git a/firmware/Makefile b/firmware/Makefile
index ea1f183bc02070af69cd9e5789d4dd824edebf0d..bc7b3a0b760bdf50f84ace95e31da471aa52e80f 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -11,15 +11,22 @@ LIBS = $(FWLIB) # Firmware library must be self-contained
# Disable rollback TPM when compiling locally, since otherwise
# load_kernel_test attempts to talk to the TPM.
+ifeq ($(FIRMWARE_ARCH),)
CFLAGS += -DDISABLE_ROLLBACK_TPM
+endif
INCLUDES = \
-I$(FWTOP)/include \
-I$(LIBDIR)/include \
-I$(LIBDIR)/cgptlib/include \
-I$(LIBDIR)/cryptolib/include \
- -I$(LIBDIR)/tpm_lite/include \
- -I$(STUBDIR)/include
+ -I$(LIBDIR)/tpm_lite/include
+
+ifeq ($(FIRMWARE_ARCH),)
+INCLUDES += -I$(STUBDIR)/include
+else
+INCLUDES += -I$(FWDIR)/arch/$(FIRMWARE_ARCH)/include
+endif
# find ./lib -iname '*.c' | sort
LIB_SRCS = \
@@ -52,9 +59,13 @@ STUB_OBJS = $(STUB_SRCS:%.c=${BUILD_ROOT}/%.o)
ALL_SRCS = ${LIB_SRCS} ${STUB_SRCS} version.c
+ifeq ($(FIRMWARE_ARCH),)
test : $(STUB_OBJS) $(FWLIB) update-version
$(CC) $(CFLAGS) $(INCLUDES) -o $(BUILD_ROOT)/a.out \
$(TESTDIR)/main.c $(STUB_OBJS) $(LIBS)
+else
+test : $(FWLIB)
+endif
# This is executed at every make, to see if anything has changed
update-version :
« no previous file with comments | « Makefile ('k') | firmware/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698