Makefile 1.2 KB

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