Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. copy_execs = \
  2. copy_mmap_rev \
  3. copy_mmap_seq \
  4. copy_mmap_whole \
  5. copy_rev \
  6. copy_seq \
  7. copy_whole
  8. execs = \
  9. $(copy_execs) \
  10. delete \
  11. open_close \
  12. read_write \
  13. seek_tell \
  14. stat \
  15. truncate
  16. manifests = manifest
  17. exec_target = $(execs)
  18. target = \
  19. $(exec_target) \
  20. $(manifests)
  21. clean-extra += clean-tmp
  22. .PHONY: default
  23. default: all
  24. include ../../../../Scripts/Makefile.configs
  25. include ../../../../Scripts/Makefile.manifest
  26. include ../../../../Scripts/Makefile.Test
  27. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  28. $(execs): common.o
  29. $(copy_execs): common_copy.o
  30. %.o: %.c
  31. $(call cmd,cc_o_c)
  32. else
  33. .IGNORE: $(execs)
  34. $(execs)
  35. endif
  36. export PAL_LOADER = $(RUNTIME)/pal-$(PAL_HOST)
  37. export PYTHONPATH = ../../../../Scripts
  38. .PHONY: test
  39. test: $(target)
  40. $(RM) fs-test.xml
  41. $(MAKE) fs-test.xml
  42. fs-test.xml: test_fs.py $(call expand_target_to_token,$(target))
  43. python3 -m pytest --junit-xml $@ -v $<
  44. .PHONY: clean-tmp
  45. clean-tmp:
  46. $(RM) -r *.tmp *.cached *.manifest.sgx *~ *.sig *.token *.o __pycache__ .pytest_cache .cache *.xml