From f1ca1d91708a96870a9dc8e6bea8270d13ef0b25 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 15 May 2008 11:34:46 +0200 Subject: [PATCH] Moved sandbox to box/. --- Makefile | 4 +--- box/Makefile | 11 +++++++++++ {src => box}/box.c | 2 +- {src => box}/mk-syscall-table | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 box/Makefile rename {src => box}/box.c (99%) rename {src => box}/mk-syscall-table (89%) diff --git a/Makefile b/Makefile index 9f83051..1d2b6cb 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,7 @@ include $(s)/lib/Makefile include $(s)/sherlock/Makefile endif -# Programs we want to compile -#PROGS+=$(o)/test -#$(o)/test: $(o)/test.o $(LIBUCW) $(LIBLANG) $(LIBCHARSET) $(LIBIMAGES) +include $(s)/box/Makefile # And finally the default rules of the build system include $(s)/build/Makebottom diff --git a/box/Makefile b/box/Makefile new file mode 100644 index 0000000..8cc8716 --- /dev/null +++ b/box/Makefile @@ -0,0 +1,11 @@ +# Makefile for MO-Eval sandbox +# (c) 2008 Martin Mares + +DIRS+=box +PROGS+=$(o)/box/box + +$(o)/box/box: $(o)/box/box.o +$(o)/box/box.o: $(o)/box/syscall-table.h + +$(o)/box/syscall-table.h: $(s)/box/mk-syscall-table + sh $^ >$@ diff --git a/src/box.c b/box/box.c similarity index 99% rename from src/box.c rename to box/box.c index c3598b4..6fcb66e 100644 --- a/src/box.c +++ b/box/box.c @@ -116,7 +116,7 @@ xmalloc(size_t size) /*** Syscall rules ***/ static const char * const syscall_names[] = { -#include "syscall-table.h" +#include "box/syscall-table.h" }; #define NUM_SYSCALLS ARRAY_SIZE(syscall_names) #define NUM_ACTIONS (NUM_SYSCALLS+64) diff --git a/src/mk-syscall-table b/box/mk-syscall-table similarity index 89% rename from src/mk-syscall-table rename to box/mk-syscall-table index a2252b8..c4b1e9e 100755 --- a/src/mk-syscall-table +++ b/box/mk-syscall-table @@ -6,4 +6,4 @@ echo echo '#include ' | gcc -E -dM - | sed 's/^#define __NR_\([^ ]\+\).*/[ __NR_\1 ] = "\1",/;t;d' -) >src/syscall-table.h +) -- 2.39.2