2 CFLAGS += -Wall -I. -fomit-frame-pointer -fno-stack-protector
3 #turn on tons of warnings if clang is present
7 -Wno-missing-prototypes \
8 -Wno-unused-parameter \
10 -Wno-implicit-fallthrough \
11 -Wno-sign-conversion \
13 -Wno-disabled-macro-expansion \
15 -Wno-format-nonliteral
28 OBJ_A = test/ast-test.o
29 OBJ_I = test/ir-test.o
30 OBJ_C = main.o lexer.o parser.o
31 OBJ_X = exec-standalone.o util.o con.o
33 #default is compiler only
36 $(CC) -c $< -o $@ $(CFLAGS)
38 exec-standalone.o: exec.c
39 $(CC) -c $< -o $@ $(CFLAGS) -DQCVM_EXECUTOR=1
42 test_ast: $(OBJ_A) $(OBJ)
43 $(CC) -o $@ $^ $(CFLAGS)
44 test_ir: $(OBJ_I) $(OBJ)
45 $(CC) -o $@ $^ $(CFLAGS)
47 $(CC) -o $@ $^ $(CFLAGS) -lm
48 test: test_ast test_ir
51 gmqcc: $(OBJ_C) $(OBJ)
52 $(CC) -o $@ $^ $(CFLAGS)
54 #all target is test and all
58 rm -f *.o gmqcc qcvm test_ast test_ir test/*.o