@@ -6,6 +6,7 @@ ifndef OBJCOPY
OBJCOPY := $(CROSS_COMPILE)objcopy
endif
+INCLUDES := -I$(top_srcdir)/tools/include
HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC -z noexecstack
ENCL_CFLAGS := -Wall -Werror -static -nostdlib -nostartfiles -fPIC \
-fno-stack-protector -mrdrnd $(INCLUDES)
@@ -33,7 +34,7 @@ $(OUTPUT)/encl.ss: $(OUTPUT)/encl.bin
$(OUTPUT)/sgxsign signing_key.pem $(OUTPUT)/encl.bin $(OUTPUT)/encl.ss
$(OUTPUT)/sgxsign: sgxsign.c
- $(CC) -o $@ $< -lcrypto
+ $(CC) $(INCLUDES) -o $@ $< -lcrypto
EXTRA_CLEAN := \
$(OUTPUT)/encl.bin \
Define INCLUDES to reference the top-level tools/include when building SGX selftests in preparation of adding a missing linux/bits.h include in sgx/arch.h. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> --- tools/testing/selftests/x86/sgx/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)