Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. .PHONY: default
  8. default: all
  9. include ../Makefile.Test
  10. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  11. CFLAGS-bootstrap_static = -static
  12. CFLAGS-bootstrap_pie = -fPIC -pie
  13. CFLAGS-shared_object = -fPIC -pie
  14. CFLAGS-syscall += -I$(PALDIR)/../include -I$(PALDIR)/host/$(PAL_HOST)
  15. CFLAGS-openmp = -fopenmp
  16. CFLAGS-multi_pthread = -pthread
  17. CFLAGS-exit_group = -pthread
  18. CFLAGS-abort_multithread = -pthread
  19. CFLAGS-eventfd = -pthread
  20. CFLAGS-futex_bitset = -pthread
  21. CFLAGS-futex_requeue = -pthread
  22. CFLAGS-futex_wake_op = -pthread
  23. CFLAGS-spinlock += -I$(PALDIR)/../lib -pthread
  24. CFLAGS-sigprocmask += -pthread
  25. %: %.c
  26. $(call cmd,csingle)
  27. %: %.cpp
  28. $(call cmd,cxxsingle)
  29. else
  30. .IGNORE: $(c_executables) $(cxx_executables)
  31. $(c_executables) $(cxx_executables):
  32. endif
  33. export PAL_LOADER = $(RUNTIME)/pal-$(PAL_HOST)
  34. export PYTHONPATH=../../../../Scripts
  35. .PHONY: regression
  36. regression: $(target)
  37. $(RM) libos-regression.xml
  38. $(MAKE) libos-regression.xml
  39. libos-regression.xml:
  40. python3 -m pytest --junit-xml $@ -v test_libos.py
  41. .PHONY: clean-tmp
  42. clean-tmp:
  43. rm -rf *.tmp *.cached *.manifest.sgx *~ *.sig *.token .cache __pycache__ libos-regression.xml testfile tmp/*