Makefile 894 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 ../Makefile.Test
  10. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  11. $(execs): common.o
  12. $(copy_execs): common_copy.o
  13. %.o: %.c
  14. $(call cmd,cc_o_c)
  15. else
  16. .IGNORE: $(execs)
  17. $(execs)
  18. endif
  19. export PAL_LOADER = $(RUNTIME)/pal-$(PAL_HOST)
  20. export PYTHONPATH = ../../../../Scripts
  21. .PHONY: test
  22. test: $(target)
  23. $(RM) fs-test.xml
  24. $(MAKE) fs-test.xml
  25. fs-test.xml:
  26. python3 -m pytest --junit-xml $@ -v test_fs.py
  27. .PHONY: clean-tmp
  28. clean-tmp:
  29. rm -rf *.tmp *.cached *.manifest.sgx *~ *.sig *.token *.o __pycache__ .pytest_cache .cache *.xml