ast.o \
ir.o \
con.o
+
+OBJ_T = test.o util.o con.o
OBJ_C = main.o lexer.o parser.o
OBJ_X = exec-standalone.o util.o con.o
exec-standalone.o: exec.c
$(CC) -c $< -o $@ $(CFLAGS) -DQCVM_EXECUTOR=1
-qcvm: $(OBJ_X)
+qcvm: $(OBJ_X)
$(CC) -o $@ $^ $(CFLAGS) -lm
-# compiler target
gmqcc: $(OBJ_C) $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
-all: gmqcc qcvm
+test: $(OBJ_T)
+ $(CC) -o $@ $^ $(CFLAGS)
+
+runtests:
+ ./test
+
+#all target is test and all
+all: gmqcc qcvm test
clean:
- rm -f *.o gmqcc qcvm
+ rm -f *.o gmqcc qcvm test *.dat
-
+ $(OBJ) $(OBJ_C) $(OBJ_X): gmqcc.h
+ main.o: lexer.h
+ parser.o: ast.h lexer.h
+ ast.o: ast.h ir.h
+ ir.o: ir.h