]> mj.ucw.cz Git - eval.git/blobdiff - box/Makefile
Isolate: Updating TODO
[eval.git] / box / Makefile
index bb9e2d6cd8287e5db690a70ee6b8c2ddb26e296d..c5d6b2a612402c8388ef9abaa8b9e22ed5963cb5 100644 (file)
@@ -1,14 +1,22 @@
 # Makefile for MO-Eval sandbox
-# (c) 2008 Martin Mares <mj@ucw.cz>
+# (c) 2008--2010 Martin Mares <mj@ucw.cz>
 
 DIRS+=box
 PROGS+=$(o)/box/box
 
+BOX_CFLAGS=
+ifdef CONFIG_BOX_KERNEL_AMD64
+BOX_CFLAGS += -m64
+endif
+
 $(o)/box/box: $(o)/box/box.o
 $(o)/box/box.o: $(o)/box/syscall-table.h
 
+$(o)/box/box: LDFLAGS+=$(BOX_CFLAGS)
+$(o)/box/box.o: CFLAGS+=$(BOX_CFLAGS)
+
 $(o)/box/syscall-table.h: $(s)/box/mk-syscall-table
-       sh $^ >$@
+       sh $^ >$@ $(CFLAGS) $(BOX_CFLAGS)
 
 box-tests: $(addprefix $(o)/box/test-sys,32-int80 64-int80 32-syscall 64-syscall 32-sysenter 64-sysenter)