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
30 OBJ_A = test/ast-test.o
31 OBJ_I = test/ir-test.o
32 OBJ_C = main.o lexer.o parser.o
33 OBJ_X = exec-standalone.o util.o
35 #default is compiler only
38 $(CC) -c $< -o $@ $(CFLAGS)
40 exec-standalone.o: exec.c
41 $(CC) -c $< -o $@ $(CFLAGS) -DQCVM_EXECUTOR=1
44 test_ast: $(OBJ_A) $(OBJ)
45 $(CC) -o $@ $^ $(CFLAGS)
46 test_ir: $(OBJ_I) $(OBJ)
47 $(CC) -o $@ $^ $(CFLAGS)
49 $(CC) -o $@ $^ $(CFLAGS) -lm
51 exec-standalone.o: execloop.h
52 test: test_ast test_ir
55 gmqcc: $(OBJ_C) $(OBJ)
56 $(CC) -o $@ $^ $(CFLAGS) $(LIBS)
58 #all target is test and all
62 rm -f *.o gmqcc qcvm test_ast test_ir test/*.o