Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. c_executables = $(patsubst %.c,%,$(wildcard *.c))
  2. cxx_executables = $(patsubst %.cpp,%,$(wildcard *.cpp))
  3. manifests = $(patsubst %.manifest.template,%.manifest,$(wildcard *.manifest.template)) manifest
  4. exec_target = $(c_executables) $(cxx_executables) file_check_policy_strict.manifest file_check_policy_allow_all_but_log.manifest
  5. target = $(exec_target) $(manifests)
  6. clean-extra += clean-tmp
  7. include ../../../../Scripts/Makefile.configs
  8. include ../../../../Scripts/Makefile.manifest
  9. include ../../../../Scripts/Makefile.Test
  10. CFLAGS-bootstrap_static = -static
  11. CFLAGS-bootstrap_pie = -fPIC -pie
  12. CFLAGS-shared_object = -fPIC -pie
  13. CFLAGS-syscall += -I$(PALDIR)/../include -I$(PALDIR)/host/$(PAL_HOST)
  14. CFLAGS-openmp = -fopenmp
  15. CFLAGS-multi_pthread = -pthread
  16. CFLAGS-exit_group = -pthread
  17. CFLAGS-abort_multithread = -pthread
  18. CFLAGS-eventfd = -pthread
  19. CFLAGS-futex_bitset = -pthread
  20. CFLAGS-futex_requeue = -pthread
  21. CFLAGS-futex_wake_op = -pthread
  22. CFLAGS-spinlock += -I$(PALDIR)/../include/lib -pthread
  23. CFLAGS-sigprocmask += -pthread
  24. %: %.c
  25. $(call cmd,csingle)
  26. %: %.cpp
  27. $(call cmd,cxxsingle)
  28. export PAL_LOADER = $(RUNTIME)/pal-$(PAL_HOST)
  29. export PYTHONPATH=../../../../Scripts
  30. .PHONY: regression
  31. regression: $(target)
  32. $(RM) libos-regression.xml
  33. $(MAKE) libos-regression.xml
  34. libos-regression.xml: test_libos.py $(call expand_target_to_token,$(target))
  35. python3 -m pytest --junit-xml $@ -v $<
  36. .PHONY: clean-tmp
  37. clean-tmp:
  38. $(RM) -r *.tmp *.cached *.manifest.sgx *~ *.sig *.token .cache __pycache__ libos-regression.xml testfile tmp/*