2 CFLAGS += -Wall -I. -pedantic-errors -std=c90
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
24 OBJ_A = test/ast-test.o
25 OBJ_I = test/ir-test.o
26 OBJ_C = main.o lexer.o parser.o
27 OBJ_X = exec-standalone.o util.o
29 #default is compiler only
32 $(CC) -c $< -o $@ $(CFLAGS)
34 exec-standalone.o: exec.c
35 $(CC) -c $< -o $@ $(CFLAGS) -DQCVM_EXECUTOR=1
38 test_ast: $(OBJ_A) $(OBJ)
39 $(CC) -o $@ $^ $(CFLAGS)
40 test_ir: $(OBJ_I) $(OBJ)
41 $(CC) -o $@ $^ $(CFLAGS)
43 $(CC) -o $@ $^ $(CFLAGS)
45 exec-standalone.o: execloop.h
46 test: test_ast test_ir
49 gmqcc: $(OBJ_C) $(OBJ)
50 $(CC) -o $@ $^ $(CFLAGS)
52 #all target is test and all
56 rm -f *.o gmqcc qcvm test_ast test_ir test/*.o