Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. c_executables = \
  2. abort \
  3. abort_multithread \
  4. bootstrap \
  5. bootstrap_pie \
  6. bootstrap_static \
  7. cpuid \
  8. epoll_wait_timeout \
  9. eventfd \
  10. exec \
  11. exec_invalid_args \
  12. exec_same \
  13. exec_victim \
  14. exit \
  15. exit_group \
  16. fdleak \
  17. file_check_policy \
  18. file_size \
  19. fopen_cornercases \
  20. fork_and_exec \
  21. fstat_cwd \
  22. futex_bitset \
  23. futex_requeue \
  24. futex_timeout \
  25. futex_wake_op \
  26. getcwd \
  27. getdents \
  28. getsockopt \
  29. host_root_fs \
  30. init_fail \
  31. large-mmap \
  32. large_dir_read \
  33. mmap-file \
  34. mprotect_file_fork \
  35. multi_pthread \
  36. openmp \
  37. poll \
  38. poll_many_types \
  39. ppoll \
  40. proc \
  41. proc-path \
  42. proc_cpuinfo \
  43. pselect \
  44. readdir \
  45. sched \
  46. select \
  47. shared_object \
  48. sigaltstack \
  49. sigprocmask \
  50. spinlock \
  51. stat_invalid_args \
  52. str_close_leak \
  53. syscall \
  54. tcp_ipv6_v6only \
  55. tcp_msg_peek \
  56. udp \
  57. unix \
  58. vfork_and_exec
  59. cxx_executables = bootstrap-c++
  60. manifests = \
  61. manifest \
  62. eventfd.manifest \
  63. exec_victim.manifest \
  64. exit_group.manifest \
  65. file_check_policy_allow_all_but_log.manifest \
  66. file_check_policy_strict.manifest \
  67. futex_bitset.manifest \
  68. futex_requeue.manifest \
  69. futex_wake_op.manifest \
  70. getdents.manifest \
  71. host_root_fs.manifest \
  72. init_fail.manifest \
  73. large-mmap.manifest \
  74. mmap-file.manifest \
  75. multi_pthread.manifest \
  76. openmp.manifest \
  77. proc-path.manifest \
  78. shared_object.manifest
  79. exec_target = \
  80. $(c_executables) \
  81. $(cxx_executables) \
  82. file_check_policy_strict.manifest \
  83. file_check_policy_allow_all_but_log.manifest
  84. target = \
  85. $(exec_target) \
  86. $(manifests)
  87. clean-extra += clean-tmp
  88. include ../../../../Scripts/Makefile.configs
  89. include ../../../../Scripts/Makefile.manifest
  90. include ../../../../Scripts/Makefile.Test
  91. CFLAGS-bootstrap_static = -static
  92. CFLAGS-bootstrap_pie = -fPIC -pie
  93. CFLAGS-shared_object = -fPIC -pie
  94. CFLAGS-syscall += -I$(PALDIR)/../include -I$(PALDIR)/host/$(PAL_HOST)
  95. CFLAGS-openmp = -fopenmp
  96. CFLAGS-multi_pthread = -pthread
  97. CFLAGS-exit_group = -pthread
  98. CFLAGS-abort_multithread = -pthread
  99. CFLAGS-eventfd = -pthread
  100. CFLAGS-futex_bitset = -pthread
  101. CFLAGS-futex_requeue = -pthread
  102. CFLAGS-futex_wake_op = -pthread
  103. CFLAGS-spinlock += -I$(PALDIR)/../include/lib -pthread
  104. CFLAGS-sigprocmask += -pthread
  105. %: %.c
  106. $(call cmd,csingle)
  107. %: %.cpp
  108. $(call cmd,cxxsingle)
  109. export PAL_LOADER = $(RUNTIME)/pal-$(PAL_HOST)
  110. export PYTHONPATH=../../../../Scripts
  111. .PHONY: regression
  112. regression: $(target)
  113. $(RM) libos-regression.xml
  114. $(MAKE) libos-regression.xml
  115. libos-regression.xml: test_libos.py $(call expand_target_to_token,$(target))
  116. python3 -m pytest --junit-xml $@ -v $<
  117. .PHONY: clean-tmp
  118. clean-tmp:
  119. $(RM) -r *.tmp *.cached *.manifest.sgx *~ *.sig *.token .cache __pycache__ libos-regression.xml testfile tmp/*