Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 = -pthread
  21. CFLAGS-spinlock += -I$(PALDIR)/../lib -pthread
  22. CFLAGS-sigprocmask += -pthread
  23. %: %.c
  24. $(call cmd,csingle)
  25. %: %.cpp
  26. $(call cmd,cxxsingle)
  27. else
  28. .IGNORE: $(c_executables) $(cxx_executables)
  29. $(c_executables) $(cxx_executables):
  30. endif
  31. export PAL_LOADER = $(RUNTIME)/pal-$(PAL_HOST)
  32. export PYTHONPATH=../../../../Scripts
  33. .PHONY: regression
  34. regression: $(target)
  35. $(RM) libos-regression.xml
  36. $(MAKE) libos-regression.xml
  37. libos-regression.xml:
  38. python3 -m pytest --junit-xml $@ -v test_libos.py
  39. .PHONY: clean-tmp
  40. clean-tmp:
  41. rm -rf *.tmp *.cached *.manifest.sgx *~ *.sig *.token .cache __pycache__ libos-regression.xml testfile tmp/*