| 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 :
|
|
|