Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. level = ../
  10. include ../../../../Makefile.configs
  11. include ../../../../Makefile.rules
  12. include ../Makefile.Test
  13. ifeq ($(findstring x86_64,$(SYS))$(findstring linux,$(SYS)),x86_64linux)
  14. CFLAGS-bootstrap_static = -static
  15. CFLAGS-bootstrap_pie = -fPIC -pie
  16. CFLAGS-shared_object = -fPIC -pie
  17. CFLAGS-syscall += -I$(PALDIR)/../include -I$(PALDIR)/host/$(PAL_HOST)
  18. CFLAGS-openmp = -fopenmp
  19. CFLAGS-multi_pthread = -pthread
  20. %: %.c
  21. $(call cmd,csingle)
  22. %: %.cpp
  23. $(call cmd,cxxsingle)
  24. else
  25. .IGNORE: $(c_executables) $(cxx_executables)
  26. $(c_executables) $(cxx_executables):
  27. endif
  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:
  35. python3 -m pytest --junit-xml $@ -v test_libos.py
  36. .PHONY: clean-tmp
  37. clean-tmp:
  38. rm -rf *.tmp ../apps/ltp/*.csv *.cached *.manifest.sgx *~ *.sig *.token