2 CFLAGS += -Wall -I. -pedantic-errors
4 #turn on tons of warnings if clang is present
8 -Wno-missing-prototypes \
9 -Wno-unused-parameter \
11 -Wno-implicit-fallthrough \
12 -Wno-sign-conversion \
14 -Wno-disabled-macro-expansion \
16 -Wno-format-nonliteral
29 OBJ_A = test/ast-test.o
30 OBJ_I = test/ir-test.o
31 OBJ_C = main.o lexer.o parser.o
32 OBJ_X = exec-standalone.o util.o
34 #default is compiler only
37 $(CC) -c $< -o $@ $(CFLAGS)
39 exec-standalone.o: exec.c
40 $(CC) -c $< -o $@ $(CFLAGS) -DQCVM_EXECUTOR=1
43 test_ast: $(OBJ_A) $(OBJ)
44 $(CC) -o $@ $^ $(CFLAGS)
45 test_ir: $(OBJ_I) $(OBJ)
46 $(CC) -o $@ $^ $(CFLAGS)
48 $(CC) -o $@ $^ $(CFLAGS)
50 exec-standalone.o: execloop.h
51 test: test_ast test_ir
54 gmqcc: $(OBJ_C) $(OBJ)
55 $(CC) -o $@ $^ $(CFLAGS)
57 #all target is test and all
61 rm -f *.o gmqcc qcvm test_ast test_ir test/*.o