Files
graphene/Scripts/Makefile.Host
T
Stefan Berger 06ec21be32 [Scripts] Set PAL_HOST to Linux if 'linux' is found in $(SYS)
Also check for unsupported architecture in Makefile.configs.
2020-05-21 07:08:47 +00:00

33 lines
714 B
Makefile

all_hosts = Skeleton Linux Linux-SGX
ifneq ($(MAKEFILE_CONFIGS_INCLUDED),y)
$(error do not include Makefile.Host directly. include Makefile.configs)
endif
ifeq ($(PAL_HOST),)
ifeq ($(findstring linux,$(SYS)),linux)
PAL_HOST := Linux
else
$(error Unsupported platform: $(SYS))
endif
endif
ifeq ($(SGX_RUN),1)
$(error "SGX_RUN has been removed. Always set SGX=1 if building for SGX and use the 'sgx-tokens' make target to build launch/EINIT tokens")
endif
ifeq ($(SGX),1)
PAL_HOST := $(patsubst %-SGX,%,$(PAL_HOST))-SGX
endif
ifeq ($(findstring $(PAL_HOST),$(all_hosts)),)
$(error Unsupported platform: $(PAL_HOST))
endif
export PAL_HOST
.DEFAULT_GOAL := all
.PHONY: print_host
print_host:
@echo $(PAL_HOST)