Implementation of a restricted execution engine to safely process untrusted code. Implemented in C to sandbox LUA scripts. Described in deliverable 3.3

Makefile 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. pwd := $(shell pwd)
  2. luasand := ${pwd}/build/lua_sandbox
  3. musl := ${pwd}/build/musl
  4. musl-gcc := ${musl}/obj/musl-gcc
  5. all: bootstrap-check patches luasandbox luanacha
  6. make -C src
  7. bootstrap-check:
  8. @if ! [ -r ${musl-gcc} ]; then echo "\nRun 'make bootstrap' first to build the compiler.\n" && exit 1; fi
  9. patches:
  10. ./build/apply-patches
  11. bootstrap:
  12. if ! [ -r ${musl-gcc} ]; then mkdir -p ${musl} && cd ${musl} && ${pwd}/lib/musl/configure; fi
  13. make -j2 -C ${musl}
  14. luasandbox:
  15. if ! [ -r ${luasand}/CMakeCache.txt ]; then mkdir -p ${luasand} && cd ${luasand} && CC=${musl-gcc} cmake ${pwd}/lib/lua_sandbox -DCMAKE_C_FLAGS="-static -Os" ; fi
  16. make -C ${luasand} luasandbox
  17. luanacha:
  18. make -C ${pwd}/build/luanacha
  19. # needed for yices2, in case useful (WIP)
  20. # gmp:
  21. # if ! [ -r lib/gmp/Makefile ]; then cd lib/gmp && CC=${musl-gcc} ./configure --disable-shared --enable-static; fi
  22. # make -C lib/gmp -j2
  23. check:
  24. src/decode-exec -c src/decode-exec.conf test/test_luanacha.lua
  25. clean:
  26. rm -rf ${luasand}
  27. make -C src clean
  28. make -C ${pwd}/build/luanacha clean
  29. distclean:
  30. rm -rf ${musl}