Makefile.Host 831 B

123456789101112131415161718192021222324252627282930313233
  1. all_hosts = Skeleton Linux Linux-SGX
  2. ifneq ($(MAKEFILE_CONFIGS_INCLUDED),y)
  3. $(error Makfile.configs must be included before Makefile.Host)
  4. endif
  5. ifeq ($(PAL_HOST),)
  6. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  7. PAL_HOST := Linux
  8. else
  9. $(error Unsupported platform: $(SYS))
  10. endif
  11. endif
  12. ifeq ($(SGX_RUN),1)
  13. $(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")
  14. endif
  15. ifeq ($(SGX),1)
  16. PAL_HOST := $(patsubst %-SGX,%,$(PAL_HOST))-SGX
  17. endif
  18. ifeq ($(findstring $(PAL_HOST),$(all_hosts)),)
  19. $(error Unsupported platform: $(PAL_HOST))
  20. endif
  21. export PAL_HOST
  22. export PAL_HOST_MACRO = $(shell echo $(PAL_HOST) | tr '[:lower:]' '[:upper:]' | tr '-' '_')
  23. .DEFAULT_GOAL := all
  24. .PHONY: print_host
  25. print_host:
  26. @echo $(PAL_HOST)