Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. execs = $(filter-out common common_copy,$(patsubst %.c,%,$(wildcard *.c)))
  2. copy_execs = $(filter copy_%,$(execs))
  3. manifests = $(patsubst %.manifest.template,%.manifest,$(wildcard *.manifest.template)) manifest
  4. exec_target = $(execs)
  5. target = $(exec_target) $(manifests)
  6. clean-extra += clean-tmp
  7. .PHONY: default
  8. default: all
  9. include ../../../../Scripts/Makefile.configs
  10. include ../../../../Scripts/Makefile.manifest
  11. include ../../../../Scripts/Makefile.Test
  12. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  13. $(execs): common.o
  14. $(copy_execs): common_copy.o
  15. %.o: %.c
  16. $(call cmd,cc_o_c)
  17. else
  18. .IGNORE: $(execs)
  19. $(execs)
  20. endif
  21. export PAL_LOADER = $(RUNTIME)/pal-$(PAL_HOST)
  22. export PYTHONPATH = ../../../../Scripts
  23. .PHONY: test
  24. test: $(target)
  25. $(RM) fs-test.xml
  26. $(MAKE) fs-test.xml
  27. fs-test.xml: test_fs.py $(call expand_target_to_token,$(target))
  28. python3 -m pytest --junit-xml $@ -v $<
  29. .PHONY: clean-tmp
  30. clean-tmp:
  31. $(RM) -r *.tmp *.cached *.manifest.sgx *~ *.sig *.token *.o __pycache__ .pytest_cache .cache *.xml