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