]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
'make qcvm' now builds exec-standalone.o from exec.c with -DQCVM_EXECUTOR=1
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 27 Jun 2012 12:56:43 +0000 (14:56 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 27 Jun 2012 12:56:43 +0000 (14:56 +0200)
Makefile
exec.c

index eaa10a0f114ec07aca89531469ef47b55873d72d..ba8f7984c01c2183ca1f1c5ea33107a179e73116 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,13 +28,16 @@ OBJ     = lex.o       \
 OBJ_A = test/ast-test.o
 OBJ_I = test/ir-test.o
 OBJ_C = main.o
-OBJ_X = exec.o util.o
+OBJ_X = exec-standalone.o util.o
 
 #default is compiler only
 default: gmqcc
 %.o: %.c
        $(CC) -c $< -o $@ $(CFLAGS)
 
+exec-standalone.o: exec.c
+       $(CC) -c $< -o $@ $(CFLAGS) -DQCVM_EXECUTOR=1
+
 # test targets
 test_ast: $(OBJ_A) $(OBJ)
        $(CC) -o $@ $^ $(CFLAGS)
@@ -43,6 +46,7 @@ test_ir:  $(OBJ_I) $(OBJ)
 qcvm:     $(OBJ_X)
        $(CC) -o $@ $^ $(CFLAGS)
 exec.o: qcvm_execprogram.h
+exec-standalone.o: qcvm_execprogram.h
 test: test_ast test_ir
 
 # compiler target
diff --git a/exec.c b/exec.c
index a56d400a251e9ce9a1a9d6b2cce59ee3bbe17f28..9aef5f2b923b4148d988d54754b411e034b7ea3b 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -2,8 +2,6 @@
 
 #include "exec.h"
 
-#define QCVM_EXECUTOR
-
 qc_program* prog_load(const char *filename)
 {
     qc_program *prog;