Skip to content

Commit

Permalink
Makefile: De-couple KBS init sources from SEV-SNP
Browse files Browse the repository at this point in the history
KBS sources are used for attestation of any TEE. De-coupling these
sources now will allow for easier Makefile building when other TEEs
(such as TDX, etc) are built.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
  • Loading branch information
tylerfanelli authored and slp committed Dec 11, 2023
1 parent 79d993c commit fddb70e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ ABI_VERSION=1
FULL_VERSION=1.6.0

INIT_SRC = init/init.c
SNP_INIT_SRC = init/tee/snp_attest.c \
init/tee/snp_attest.h \
init/tee/kbs/kbs.h \
KBS_INIT_SRC = init/tee/kbs/kbs.h \
init/tee/kbs/kbs_util.c \
init/tee/kbs/kbs_types.c \
init/tee/kbs/kbs_curl.c \
init/tee/kbs/kbs_crypto.c \

SEV_LD_FLAGS = -lcurl -lidn2 -lssl -lcrypto -lzstd -lz -lbrotlidec-static \
SNP_INIT_SRC = init/tee/snp_attest.c \
init/tee/snp_attest.h \
$(KBS_INIT_SRC) \

KBS_LD_FLAGS = -lcurl -lidn2 -lssl -lcrypto -lzstd -lz -lbrotlidec-static \
-lbrotlicommon-static

INIT_DEFS =
ifeq ($(SEV),1)
VARIANT = -sev
FEATURE_FLAGS := --features amd-sev
INIT_DEFS += -DSEV=1
INIT_DEFS += $(SEV_LD_FLAGS)
INIT_DEFS += $(KBS_LD_FLAGS)
INIT_SRC += $(SNP_INIT_SRC)
endif
ifeq ($(NET),1)
Expand Down

0 comments on commit fddb70e

Please sign in to comment.