all_hosts = Skeleton Linux Linux-SGX SYS ?= $(shell gcc -dumpmachine) ifeq ($(PAL_HOST),) ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux) 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 SYS export PAL_HOST export PAL_HOST_MACRO = $(shell echo $(PAL_HOST) | tr '[:lower:]' '[:upper:]' | tr '-' '_') .DEFAULT_GOAL := all .PHONY: print_host print_host: @echo $(PAL_HOST)