2 CFLAGS += -Wall -I. -fomit-frame-pointer -fno-stack-protector -O3
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
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) -lm
49 test: test_ast test_ir
52 gmqcc: $(OBJ_C) $(OBJ)
53 $(CC) -o $@ $^ $(CFLAGS)
55 #all target is test and all
59 rm -f *.o gmqcc qcvm test_ast test_ir test/*.o