diff --git a/vvm/Makefile b/vvm/Makefile index 9d43343..9d793f3 100644 --- a/vvm/Makefile +++ b/vvm/Makefile @@ -1,5 +1,5 @@ override CFLAGS+=-Werror -Wall -g -fPIC -O2 -DNDEBUG -ftrapv -Wfloat-equal -Wundef -Wwrite-strings -Wconversion -Wuninitialized -DEBUG+=-DDEBUG=1 +DEBUG+=-DDEBUG_ON PREFIX=/usr/bin BUILDDIR=bin/ diff --git a/vvm/src/vm.c b/vvm/src/vm.c index ee2617b..780017f 100644 --- a/vvm/src/vm.c +++ b/vvm/src/vm.c @@ -1,10 +1,5 @@ #include "vm.h" -#define MAX_SIZE 4096 -#define TRUE 1 -#define FALSE 0 -#define DEBUG FALSE - /** * @brief disassemble * @param sp -> stack pointer diff --git a/vvm/src/vm.h b/vvm/src/vm.h index cb2ebae..d64c09a 100644 --- a/vvm/src/vm.h +++ b/vvm/src/vm.h @@ -8,6 +8,15 @@ #include "util.h" #include "opcode.h" +#define MAX_SIZE 4096 +#define TRUE 1 +#define FALSE 0 +#ifdef DEBUG_ON + #define DEBUG TRUE +#else + #define DEBUG FALSE +#endif + typedef struct{ unsigned long length; int entrypoint;