Makefile 1.3 KB

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